Answers for "wpf binding ancestor codebehind"

C#
0

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);
Posted by: Guest on April-16-2020

C# Answers by Framework

Browse Popular Code Answers by Language