我有一个RootElement
声明并设置了我想要的方式DialogViewController
,使用element-based API
而不是reflection API
. 看起来很棒。
但是,我正在努力弄清楚如何才能获得这些价值。使用基于反射的 API 这很容易,但我不知道如何使用BindingContext.Fetch()
显式声明的RootElement
.
我在示例中找不到示例,我自己也无法弄清楚如何做到这一点。
var root = new RootElement(null){
new Section(){
new StringElement("Title here"),
new FloatElement(null, null, 5f)
}
};
var dv = new DialogViewController(root, true);
dv.ViewDisappearing += delegate {
// what goes here to get at the value of the FloatElement?
};
NavigationController.PushViewController(dv, true);
任何帮助表示赞赏。