Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

wpf binding ancestor codebehind

      Binding b = new Binding();

      b.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor,this.GetType(),1);

      b.Path = new PropertyPath("MyDP");

      MyLable.SetBinding(ContentProperty, b);
Source by social.msdn.microsoft.com #
 
PREVIOUS NEXT
Tagged: #wpf #binding #ancestor #codebehind
ADD COMMENT
Topic
Name
4+5 =