我想綁定MVVMCross對話框的Visible屬性。使用MVVMCross和Monotouch,你可以綁定到Dialog.Section Visible屬性嗎?
var refillSection = new Section() {
new StringElement("Refill").Bind(this, "SelectedCommand OpenExternal")
}.Bind(this, "Visible IsExternal,Converter=Visibility");
root.Add(refillSection);
我也曾嘗試綁定直接可見的元素,但也不管用。
var refillSection = new Section() {
new StringElement("Refill").Bind(this, "SelectedCommand OpenExternal;Visible IsExternal,Converter=Visibility")
};
root.Add(refillSection);
我做錯了什麼?我安裝了可見性插件。
我實際上使用了一個StyledStringElement的子類,它似乎不使用Visible。我添加了一個問題:https://github.com/slodge/MvvmCross/issues/403。我會看看隱藏部分。 –