I have a rather simple problem, but I am unable to get my head around it…
I have a class that inherits from UserControl. It has an AxisColor DependencyProperty of type Color. In the XAML structure of the class I have <ms3DTools:ScreenSpaceLines3D Thickness="2" Points="0,0,0 100,0,0" Color="{Binding Mode=OneWay, Path=AxisColor}".
The binding does not work. What am I doing wrong?
I have a rather simple problem, but I am unable to get my head
Share
If you have a UserControl that needs to get a Property
AxisColorfrom a class, you need to set your DataContext of that UserControl to the class that contains AxisColor.Otherwise, your user control does not know where to grab the property from.