Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x:Bind TwoWay is not reflected back to binded property if binding to method and setting ConvertBack #19122

Open
FrozDark opened this issue Dec 24, 2024 · 0 comments
Labels
area/xBind 🪢 Categorizes an issue or PR as relevant to x:Bind kind/bug Something isn't working project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools

Comments

@FrozDark
Copy link

Current behavior

Using bind like this
Text="{x:Bind ConvertToString(TextNumber2), BindBack=ConvertToNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"

Text change is not reflected to a property TextNumber2 but BindBack method ConvertToNumber is invoking. It behaves like OneWay bind

In the repro it's second TextBox control

Expected behavior

Reflect changes from controls back to binded property

How to reproduce it (as minimally and precisely as possible)

UnoIssue.zip

Workaround

Not use of method or TwoWay bind

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

Uno.Sdk: 5.5.56

Affected platforms

WebAssembly, Android, iOS, Mac Catalyst, Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK)

IDE

Visual Studio 2022

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

Tested on android but I think it's related to codegeneration of xaml and affects all uno platforms

@FrozDark FrozDark added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Dec 24, 2024
@MartinZikmund MartinZikmund added area/xBind 🪢 Categorizes an issue or PR as relevant to x:Bind project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/xBind 🪢 Categorizes an issue or PR as relevant to x:Bind kind/bug Something isn't working project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools
Projects
None yet
Development

No branches or pull requests

2 participants