本文整理汇总了C#中UIButton.SetStyleId方法的典型用法代码示例。如果您正苦于以下问题:C# UIButton.SetStyleId方法的具体用法?C# UIButton.SetStyleId怎么用?C# UIButton.SetStyleId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIButton
的用法示例。
在下文中一共展示了UIButton.SetStyleId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad();
View.Frame = UIScreen.MainScreen.Bounds;
View.BackgroundColor = UIColor.White;
View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
_button = UIButton.FromType(UIButtonType.RoundedRect);
_button.Frame = new RectangleF(
View.Frame.Width / 2 - ButtonWidth / 2,
200,
ButtonWidth,
ButtonHeight);
_button.SetTitle("Click me", UIControlState.Normal);
_button.SetStyleId("button1");
_button.TouchUpInside += (sender, e) => _button.SetTitle(String.Format("clicked {0} times", _numClicks++), UIControlState.Normal);
_button.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin |
UIViewAutoresizing.FlexibleBottomMargin;
View.AddSubview(_button);
}
示例2: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad ();
_button = UIButton.FromType (UIButtonType.Custom);
_button.SetStyleId ("sample-button");
_button.SetTitle ("Hello, world!", UIControlState.Normal);
View.AddSubview (_button);
View.SetStyleClass ("sample-background");
}
示例3: ProductListViewController
public ProductListViewController ()
{
Title = "Xamarin Store";
// Hide the back button text when you leave this View Controller.
NavigationItem.BackBarButtonItem = new UIBarButtonItem ("", UIBarButtonItemStyle.Plain, handler: null);
btnRefresh = new UIButton ();//new RectangleF(10,400,200,30));
//btnRefresh.SetTitle ("Refresh", UIControlState.Normal);
btnRefresh.SetStyleId ("refresh");
View.AddSubview (btnRefresh);
GetData ();
View.BackgroundColor = UIColor.White;
btnRefresh.TouchUpInside += (object sender, EventArgs e) => {
carousel.RemoveFromSuperview();
GetData();
};
}