Search found 5 matches

by yuyoyuppe
21 Aug 2021, 01:45
Forum: General Discussion
Replies: 8
Views: 17018

Re: Binding to a UserControl's property which is bound to VM

Oh, right, that makes sense, I guess it was too late that day :) It'd be still nice to have some warning/trace that the property would be overwritten though?
by yuyoyuppe
19 Aug 2021, 00:02
Forum: General Discussion
Replies: 8
Views: 17018

Re: Binding to a UserControl's property which is bound to VM

Ok, I've just stumbled upon a case when the binding silently fails: <UserControl.Resources> <Style TargetType="{x:Type ContentControl}"> <Style.Triggers> <DataTrigger ...> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <Grid> <Control x:Name="Something&quo...
by yuyoyuppe
04 Aug 2021, 11:01
Forum: General Discussion
Replies: 8
Views: 17018

Re: Binding to a UserControl's property which is bound to VM

Sorry for the late reply. We do not use the application framework and our callback is set to log everything. So I guess I've already seen some output from that channel, but there were definitely cases with silent failures. At the moment, all of those issues are fixed, and I couldn't reproduce any tr...
by yuyoyuppe
24 Jul 2021, 00:21
Forum: General Discussion
Replies: 8
Views: 17018

Re: Binding to a UserControl's property which is bound to VM

Thanks, that did the trick. I've also spent an unnecessarily big amount of time fiddling with setting DataContext properties to get all my bindings work with deeply nested VMs etc. Usually a binding would just fail silently without any logging, perhaps that's due to some of them being DataTemplates ...
by yuyoyuppe
23 Jul 2021, 17:43
Forum: General Discussion
Replies: 8
Views: 17018

Binding to a UserControl's property which is bound to VM

Hi folks, I'm investigating bindings mechanics rn and don't understand why it doesn't play nicely with UserControls. Here's my simplified code: My View: <Grid DataContext="{Binding TheVM}"> <!-- THIS WORKS --> <!-- <TextBox Text="{Binding Scale}" /> --> <!-- THIS DOESN"T WOR...