You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ElementName binding on a UserControl does not work #3218
WASM Binding on a User control does not work but the same code on a page works fine.
Works on UWP.
Expected behavior
Binding to work like UWP.
How to reproduce it (as minimally and precisely as possible)
build a user control with binding. I used dependency property ienumerable
and bound to a combobox. I use the same code on a page vs user control and page works but user control does not.
I have a default page and I added the new page and new user control to the page and the page code works but not usercontrol
Create WASM project.
Create new page
Create new usercontrol
add binding code to both.
Add page to main page.
add usercontrol to main page.
Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.
Activity
jeromelaban commentedon May 26, 2020
Looks like this issue is related to #61. Could you apply the workaround specified there and let us know ?
andrewD123 commentedon May 28, 2020
UnoSkipUserControlsInVisualTree did not work.
jeromelaban commentedon May 28, 2020
Could you provide a full sample of your project ?
andrewD123 commentedon May 28, 2020
yes but its large.
https://drive.google.com/open?id=1agZz1AXJzUNW40wfq8w-jxhLx35rYft9
jeromelaban commentedon May 28, 2020
Thanks for the update. This looks like there's something specific with the binding engine.
As a workaround, and better way to do so, you can write the following:
There's still an issue with ElementName binding for some reason, but you'll be able to get your binding working properly.
[-]User Control binding not working.[/-][+]ElementName binding on a UserControl does not work[/+]andrewD123 commentedon May 28, 2020
other than chaning to x:bind did you do anything else? I still can't get it to work with this change.
andrewD123 commentedon May 28, 2020
Looks like it does not work with a DP but it does work with ObservableCollection for a string but does not work for a class ObservableCollection
andrewD123 commentedon Jun 2, 2020
Looks like if you use a class and binding by name the values still does not work.
https://drive.google.com/file/d/1DVqTfE5Y2hw9M902Ps5MgkL7zy3wsOkg/view?usp=sharing
andrewD123 commentedon Jun 2, 2020
Also if it helps I have mainpage with a Frame control that has a page. In that page has a user control.
x:bind does not work unlike the demo app I put on this ticket. I am not sure due the the layers of pages and controls this is causing an issue.
demo app with Frame
https://drive.google.com/file/d/1_9gE7FT-GKHhwgw_B0x02NenGi6ordxs/view?usp=sharing
jeromelaban commentedon Jun 2, 2020
A new build of the package has been published, can you revalidate ? x:Bind may still be needed.