for a fun just Consider we have a linear layout in android *.xml and we wants to convert it correspondingly to windows phone layout at*.xaml
<?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"
>
<TextView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
"Android Tip Calculator"
/>
<EditText
android:id=
"@+id/mealprice"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:autoText=
"true"
/>
<Button
android:id=
"@+id/calculate"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Calculate Tip"
/>
<TextView
android:id=
"@+id/message"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
""
/>
</LinearLayout>
Now we can make a layout correspondingly in windows phone dev. process as follows
<StackPanel
Grid.Row=
"1"
HorizontalAlignment=
"Stretch"
VerticalAlignment=
"Stretch"
>
<TextBlock
HorizontalAlignment=
"Stretch"
Text=
"Tip Calculator"
/>
<TextBox
Name=
"mealprice"
HorizontalAlignment=
"Stretch"
/>
<Button
Name=
"Calculate"
HorizontalAlignment=
"Center"
Content=
"Calculate Tip"
/>
<TextBlock
Name=
"Message"
/>
</StackPanel>
No comments:
Post a Comment