How do I bind a property of a class that is in another assembly in WPF?
1 answer
Yes you can reference this assembly to your wpf project than add namespace to xaml like this
<UserControl xmlns:custom="clr-namespace:SampleClass;assembly=SampleLibrary"...
than adding this class to UserControl resources
<UserControl.Resources>
<custom:SampleClass x:Key="myClass"/>
</UserControl.Resources>
than to bind a property to it
<TextBox Text={Binding Source={StaticResource myClass},Path=MyProperty}/>
+8
source to share