I have the following code
public static class StaticClass
{
public static Instance Inst { get; set; }
}
public class Instance
{
public Button Butt { get; set; }
}
I need to bind to Grid.Row property attached to Butt button. I tried this:
{Binding Source={x:Static local:StaticClass.Inst.Butt}, Path=(Grid.Row)}
But it doesn’t work because Butt is not static property. Usually I use x:Static to bind to static property and write the rest in Path, but in this case Path contains attached property. I don’t know how to do this.
You need this, because, as you said,
Buttis not static:That is, make
Buttpart of yourPath, not part of theSource.