In this tutorial i will show you how you can add a button control in xmarin main layour in axml file.
File we will create a new Blank android application and
select the main.axml file and open it.
Now as you open the .axml file below mention screen will
open.
Now remove all the content from the above screen and go to
toolbar, and under Form Widget add the Button control.
Now lets change the label of the button control. For this go
to property of the button control and change the text property.
After change your layout will look as shown below.
You xml code will look as shown below.
xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="25px"
android:minHeight="25px">
<Button
android:text="Click Me"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/button1" />
</LinearLayout>
|
You can also make changes through the xml code.
0 comments:
Please let me know your view