xamarin - Programaticly positioning UI elements in C# -


i've started xamarin , i'm having great difficulty programmatically placing ui elements want them.

currently i'm using sort of method:

            label apptitle = new label         {             verticaltextalignment = textalignment.end,             horizontaltextalignment = textalignment.center,             text = "fishbike gps"         };         button menubutton = new button         {             image = "images/hamburger_icon.bmp",             horizontaloptions = layoutoptions.start,             verticaloptions = layoutoptions.start         };          title = "fishbike gps";          content = new stacklayout         {             children = {                     apptitle,                     menubutton                 }         }; 

however leaves lot desired. 1 thing, want label , button on same 'line' were. puts them 1 under other. i'd have more choice how far left / right label appears.

while i'm here can tell me how set image button. need display hamburger menu icon. (something looks equals line in middle) struggling implement programmatically.

if want chain elements 1 near other, , think must horizontly, use orientation property of stacklayout. set "horizontal" , have want. can use layout relative. hamburger. in xamarin.forms does'n exist button image. in https://github.com/xlabs/xamarin-forms-labs/wiki/imagebutton . there things too. or can use gestures in xamarin.forms can't put button in action bar or toolbar. in xamarin.forms must toolbar element. can use appcompat : https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/ . few month ago spent time figure out. so, read , try more , more , catch this.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -