本文整理汇总了C#中UIAlertView.SetValueForKey方法的典型用法代码示例。如果您正苦于以下问题:C# UIAlertView.SetValueForKey方法的具体用法?C# UIAlertView.SetValueForKey怎么用?C# UIAlertView.SetValueForKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIAlertView
的用法示例。
在下文中一共展示了UIAlertView.SetValueForKey方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
private void Initialize()
{
Root = new RootElement("Events")
{
new Section("Normal Events")
{
new Element("Log Single Event").Bind(this, "SelectedCommand LogNormalEventCommand"),
new Element("Log Parametrized Event").Bind(this, "SelectedCommand LogParametrizedEventCommand"),
},
new Section("Timed Events")
{
new Element("Log Single Event").Bind(this, "SelectedCommand LogNormalTimedEventCommand"),
new Element("Log Parametrized Timed Event").Bind(this, "SelectedCommand LogParametrizedTimedEventCommand"),
new Element("Log Updated Parametrized Timed Event").Bind(this,
"SelectedCommand LogParametrizedTimedEventWithEndParametersCommand"),
},
new Section("Errors")
{
new Element("Log Error").Bind(this, "SelectedCommand LogErrorCommand")
},
};
// show a progress box if there is some work
var events = ViewModel as EventsViewModel;
if (events != null)
{
UIAlertView progress = null;
events.PropertyChanged += (sender, e) =>
{
if (e.PropertyName == "IsWorking")
{
if (events.IsWorking)
{
if (progress == null)
{
progress = new UIAlertView("Working...", "Doing absolutely nothing in the background...", null, null, null);
UIActivityIndicatorView indicator = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray);
indicator.StartAnimating();
progress.SetValueForKey(indicator, (NSString)"accessoryView");
progress.Show();
}
}
else
{
if (progress != null)
{
progress.DismissWithClickedButtonIndex(0, true);
progress = null;
}
}
}
};
}
}