Advertisement
Guest User

winfityfasz

a guest
Sep 16th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.91 KB | None | 0 0
  1. <phone:PhoneApplicationPage
  2.     x:Class="HelloWorldApp.MainPage"
  3.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5.     xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6.     xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  7.     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8.     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9.     mc:Ignorable="d"
  10.     FontFamily="{StaticResource PhoneFontFamilyNormal}"
  11.     FontSize="{StaticResource PhoneFontSizeNormal}"
  12.     Foreground="{StaticResource PhoneForegroundBrush}"
  13.     SupportedOrientations="Portrait" Orientation="Portrait"
  14.     shell:SystemTray.IsVisible="True">
  15.  
  16.     <!--LayoutRoot is the root grid where all page content is placed-->
  17.     <Grid x:Name="LayoutRoot" Background="Transparent">
  18.         <Grid.RowDefinitions>
  19.             <RowDefinition Height="Auto"/>
  20.             <RowDefinition Height="*"/>
  21.         </Grid.RowDefinitions>
  22.  
  23.         <!-- LOCALIZATION NOTE:
  24.             To localize the displayed strings copy their values to appropriately named
  25.             keys in the app's neutral language resource file (AppResources.resx) then
  26.            replace the hard-coded text value between the attributes' quotation marks
  27.             with the binding clause whose path points to that string name.
  28.  
  29.             For example:
  30.  
  31.                 Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
  32.  
  33.             This binding points to the template's string resource named "ApplicationTitle".
  34.  
  35.            Adding supported languages in the Project Properties tab will create a
  36.            new resx file per language that can carry the translated values of your
  37.            UI strings. The binding in these examples will cause the value of the
  38.            attributes to be drawn from the .resx file that matches the
  39.            CurrentUICulture of the app at run time.
  40.         -->
  41.  
  42.        <!--TitlePanel contains the name of the application and page title-->
  43.        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
  44.            <TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
  45.            <TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
  46.        </StackPanel>
  47.  
  48.        <!--ContentPanel - place additional content here-->
  49.        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
  50.            <Canvas Width="200" Height="200" VerticalAlignment="Top">
  51.                <Ellipse Fill="Yellow" Width="40" Height="40"
  52.                         Canvas.Left="20"
  53.                         Canvas.Top="50"></Ellipse>
  54.            </Canvas>
  55.            <TextBlock Text="Hello World" HorizontalAlignment="Right"></TextBlock>
  56.            <TextBlock>Sziasztok</TextBlock>
  57.            <TextBlock HorizontalAlignment="Center">
  58.                <TextBlock.Text>Hello</TextBlock.Text>
  59.            </TextBlock>
  60.            <Ellipse Width="300" Height="300" Fill="Orange"></Ellipse>
  61.            <Ellipse Width="200" Height="200">
  62.                <Ellipse.Fill>
  63.                    <LinearGradientBrush>
  64.                        <GradientStop Color="Green" Offset="0"></GradientStop>
  65.                        <GradientStop Color="Blue" Offset="0.8"></GradientStop>
  66.                    </LinearGradientBrush>
  67.                </Ellipse.Fill>
  68.            </Ellipse>
  69.            <Button Background="Black" Width="auto" Height="auto" HorizontalAlignment="Center" VerticalAlignment="Center">
  70.                <Button.Content>
  71.                    <StackPanel Orientation="Horizontal">
  72.                        <Grid>
  73.                            <Ellipse Width="30" Height="30" Fill="Red"></Ellipse>
  74.                            <Ellipse Width="20" Height="20" Fill="Aquamarine"></Ellipse>
  75.                        </Grid>
  76.                        <TextBox Width="150"></TextBox>
  77.                        <Button x:Name="okButton" Content="Ok" Click="okButtonClick"/>
  78.                    </StackPanel>
  79.                </Button.Content>
  80.            </Button>
  81.            <Grid Width="400" Height="200" VerticalAlignment="Bottom" HorizontalAlignment="Center">
  82.                <Grid.RowDefinitions>
  83.                    <RowDefinition Height="1*"></RowDefinition>
  84.                    <RowDefinition></RowDefinition>
  85.                </Grid.RowDefinitions>
  86.                <Grid.ColumnDefinitions>
  87.                    <ColumnDefinition Width="50"></ColumnDefinition>
  88.                    <ColumnDefinition Width="Auto"></ColumnDefinition>
  89.                    <ColumnDefinition></ColumnDefinition>
  90.                    <ColumnDefinition></ColumnDefinition>
  91.                </Grid.ColumnDefinitions>
  92.                <Rectangle
  93.                    Fill="CadetBlue"
  94.                    Grid.Row="1"
  95.                    Grid.Column="1"
  96.                    Width="50"
  97.                    Height="50">
  98.                </Rectangle>
  99.                <Button Content="Ok"
  100.                        Background="Red"
  101.                        Grid.Row="1"
  102.                        Grid.Column="2"
  103.                        Grid.ColumnSpan="2">
  104.                    
  105.                </Button>
  106.            </Grid>
  107.        </Grid>
  108.  
  109.        <!--Uncomment to see an alignment grid to help ensure your controls are
  110.            aligned on common boundaries.  The image has a top margin of -32px to
  111.            account for the System Tray. Set this to 0 (or remove the margin altogether)
  112.            if the System Tray is hidden.
  113.  
  114.            Before shipping remove this XAML and the image itself.-->
  115.        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
  116.    </Grid>
  117.  
  118. </phone:PhoneApplicationPage>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement