本文整理汇总了C#中Button.SetY方法的典型用法代码示例。如果您正苦于以下问题:C# Button.SetY方法的具体用法?C# Button.SetY怎么用?C# Button.SetY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button.SetY方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var mLayout = new FrameLayout(this);
surface = UrhoSurface.CreateSurface(this, typeof(MySample));
//surface.Background.SetAlpha(10);
TextView txtView = new TextView(this);
txtView.SetBackgroundColor(Color.Violet);
txtView.SetWidth(10);
txtView.SetHeight(10);
txtView.Text = "HAHAH";
//txtView.Text = surface.Background.ToString();
Button btn = new Button(this);
btn.SetBackgroundColor(Color.Transparent);
btn.Text = "Button";
btn.SetHeight(100);
btn.SetWidth(100);
btn.SetX(30);
btn.SetY(30);
btn.TextAlignment = TextAlignment.Center;
mLayout.AddView(txtView);
mLayout.AddView(btn);
mLayout.AddView(surface);
SetContentView(mLayout);
}
示例2: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.allstatia);
myListView = FindViewById<ListView> (Resource.Id.listView1);
textbox = FindViewById<EditText> (Resource.Id.editText1);
textbox.Visibility = ViewStates.Invisible;
textbox.SetY (-210);
Search = FindViewById<Button> (Resource.Id.button1);
Search.SetY (-160);
Search.Click += Search_Click;
myListView.SetY (0);
var metrics = Resources.DisplayMetrics;
myListView.SetMinimumHeight (metrics.HeightPixels);
string IdStatya = Intent.GetStringExtra ("IdJournal");
NameStatya = new List<string> ();
Statya = new List<statya> ();
Statya = PrasingJournalJSON (IdStatya);
Themes = new List<string> ();
SectionName = new List<string> ();
foreach (statya ST in Statya) {
if (Themes == null) {
Themes.Add (ST.Section);
} else {
for (int i = 0; i < Themes.Count; i++) {
if (ST.Section == Themes [i]) {
sravn = true;
}
}
if (sravn == false) {
Themes.Add (ST.Section);
} else {
sravn = false;
}
}
}
string Section;
Section = null;
for (int i = 0; i < Statya.Count; i++) {
if (Section == Statya [i].Section) {
NameStatya.Add (Statya [i].ArticleTitle);
} else {
NameStatya.Add (Statya [i].Section);
NameStatya.Add (Statya [i].ArticleTitle);
Section = Statya [i].Section;
SectionName.Add (Statya [i].Section);
}
}
ArrayAdapter<String> adapter = new ArrayAdapter<string> (this, Resource.Layout.List_item, NameStatya);
myListView.Adapter = adapter;
myListView.ItemClick += MyListView_ItemClick;
}