2
如何綁定到Xamarin Forms XAML中的附加屬性?綁定到Xamarin Forms中的附加屬性
這並不工作,但它編譯和最有意義:
BindingContext="{x:Binding Source={x:Reference ControlName}, Path=(XMLNameSpace:ClassName.AttachedPropertyName)}"
如何綁定到Xamarin Forms XAML中的附加屬性?綁定到Xamarin Forms中的附加屬性
這並不工作,但它編譯和最有意義:
BindingContext="{x:Binding Source={x:Reference ControlName}, Path=(XMLNameSpace:ClassName.AttachedPropertyName)}"
不能使用附加BindableProperty
爲綁定源,因爲沒有物業備份,英國石油公司在控制你參考作爲來源。我想不出任何直接與綁定有關的工作。
什麼工作正在經歷某種形式的視圖模型(可以被定義爲靜態資源),並結合ControlName.AttachedProperty
到虛擬機的性能(使用OneWayToSource
模式),然後綁定到該臨時VM的該屬性。