当前位置: 首页>>代码示例>>C#>>正文


C# Spinner.SetMinimumHeight方法代码示例

本文整理汇总了C#中Spinner.SetMinimumHeight方法的典型用法代码示例。如果您正苦于以下问题:C# Spinner.SetMinimumHeight方法的具体用法?C# Spinner.SetMinimumHeight怎么用?C# Spinner.SetMinimumHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Spinner的用法示例。


在下文中一共展示了Spinner.SetMinimumHeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetPropertyWindowLayout

		public override View GetPropertyWindowLayout (Android.Content.Context context)
		{
			LinearLayout linear = new LinearLayout (context);
			linear.Orientation = Orientation.Horizontal;
			TextView txt = new TextView (context);
			txt.Text = "Select Theme";
			txt.SetPadding (10, 10, 10, 10);
			txt.TextSize = 15f;
			Spinner themeDropDown = new Spinner (context);
			List<String> adapter = new List<String> (){"Default","Dark","Blue","Red","Green" };
			ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>
				(context, Android.Resource.Layout.SimpleSpinnerItem,adapter);
			themeDropDown.Adapter = dataAdapter; 
			themeDropDown.SetPadding (10, 10, 10, 10);
            themeDropDown.SetSelection(1);
			themeDropDown.ItemSelected += OnGridThemeChanged;
			themeDropDown.SetMinimumHeight (70);
			linear.AddView (txt);
			linear.AddView (themeDropDown);
			return linear;
		}
开发者ID:IanLeatherbury,项目名称:tryfsharpforms,代码行数:21,代码来源:Styles.cs

示例2: GetSampleContent

		public override View GetSampleContent (Context con)
		{
			spinner = new Spinner(con);
			spinner.SetMinimumHeight(60);
			spinner.DropDownWidth = 500;
			spinner.SetBackgroundColor(Color.Gray);
		
			List<String> list = new List<String>();
			list.Add("Ball");
			list.Add("Battery");
			list.Add("DoubleCircle");
			list.Add("ECG");
			list.Add("Globe");
			list.Add("HorizontalPulsingBox");
			list.Add("MovieTimer");
			list.Add("Print");
			list.Add("Rectangle");
			list.Add("RollingBall");
			list.Add("SingleCircle");
			list.Add("SlicedCircle");
			list.Add("ZoomingTarget");

			ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>
				(con, Android.Resource.Layout.SimpleSpinnerItem, list);
			dataAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
			spinner.Adapter = dataAdapter;
			spinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (spinner_ItemSelected);

			TextView textView = new TextView(con);
			textView.TextSize = 20;
			textView.Text = "Animation Type";
			TextView textView1 = new TextView(con);
			textView1.TextSize = 10;
			textView.SetTextColor(Color.Black);

			TextView textView2 = new TextView(con);
			textView2.TextSize = 10;
			textView2.SetTextColor(Color.Black);

			LinearLayout linearLayout = new LinearLayout(con);
			linearLayout.SetPadding(20, 20, 20, 30);
			linearLayout.SetBackgroundColor(Color.Rgb(236,235,242));
			linearLayout.LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WrapContent,
				LinearLayout.LayoutParams.WrapContent);
			linearLayout.Orientation = Orientation.Vertical;
			linearLayout.AddView(textView);
			linearLayout.AddView(textView2);
			linearLayout.AddView(spinner);
			linearLayout.AddView(textView1);

			sfBusyIndicator = new SfBusyIndicator(con);
			sfBusyIndicator.IsBusy = true;
			sfBusyIndicator.TextColor = Color.Rgb(62,101,254);
			sfBusyIndicator.AnimationType = AnimationTypes.DoubleCircle;
			sfBusyIndicator.ViewBoxWidth = 200;
			sfBusyIndicator.ViewBoxHeight = 200;
			sfBusyIndicator.TextSize = 60;
			sfBusyIndicator.Title = "";
			sfBusyIndicator.SetBackgroundColor(Color.Rgb(255,255,255));
			linearLayout.AddView(sfBusyIndicator);
			// Set our view from the "main" layout resource
			return linearLayout;
		}
开发者ID:IanLeatherbury,项目名称:tryfsharpforms,代码行数:63,代码来源:BusyIndicator.cs


注:本文中的Spinner.SetMinimumHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。