tags:

views:

25

answers:

1

Hi,

In WPF, is it possible to bind a property of class which is other assembly to the control which is in different assembly .Please help. Thanks

+4  A: 

Yea, you can reference that assembly to your wpf project, than add a namespace in xaml like this

<UserControl xmlns:custom="clr-namespace:SampleClass;assembly=SampleLibrary"...

than add that class to UserControl's resources

<UserControl.Resources>
  <custom:SampleClass x:Key="myClass"/>
</UserControl.Resources>

than bind to it's property

 <TextBox Text={Binding Source={StaticResource myClass},Path=MyProperty}/>
ArsenMkrt
Thank you Arsen
Ershad
you are welcome,just don't forgot to mark as answer if I answered to question
ArsenMkrt