top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Explain a sample of the XAML code that defines a Windows Phone page?

+1 vote
300 views
Explain a sample of the XAML code that defines a Windows Phone page?
posted Dec 4, 2014 by Karthi Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

XAML is the acronym for Extensible Application Markup Language. It’s a markup language based on XML, and its purpose and philosophy are very similar to HTML. Every control that can be placed on a page, whether a button, text box, or custom controls, is identified by a specific XML tag. Like XML, the structure is hierarchical; you can place tags inside other tags. For example, this hierarchical structure is how you can define the layout of a page, thanks to some controls that act as a container for other controls, like Grid or StackPanel.

The following is a sample of the XAML that defines a Windows Phone page:

<phone:PhoneApplicationPage     x:Class="FirstApp.MainPage"       
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"      
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     
xmlns:phone="clrnamespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"     
xmlns:shell="clrnamespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"     
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"     
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"     mc:Ignorable="d"     
FontFamily="{StaticResource PhoneFontFamilyNormal}"     FontSize="{StaticResource 
PhoneFontSizeNormal}"     Foreground="{StaticResource PhoneForegroundBrush}"     SupportedOrientations="Portrait" Orientation="Portrait"     shell:SystemTray.IsVisible="True">  
<Grid x:Name="LayoutRoot" Background="Transparent">       
<Grid.RowDefinitions>         
   <RowDefinition Height="Auto"/>      
   <RowDefinition Height="*"/>      
 </Grid.RowDefinitions>  
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">          
     <StackPanel>
             <TextBlock Text="This is a page" />        
    </StackPanel>     
       </Grid>    
    </Grid>
</phone:PhoneApplicationPage> 
answer Dec 8, 2014 by Jdk
Similar Questions
+5 votes

can any one help how to ****Basic and simple application for windows phone 8 app** with code and explain step by step to achieve the project ...

Thanks in advance..............

+2 votes

I often see while developing phone app in grid they using Asterisk(*) and Auto , i cant identify its use any people pls kindly give some suggestions....

...