www.pudn.com > Proximity-sample.zip > MainPage.xaml, change:2012-06-01,size:9724b


<!-- 
//********************************************************* 
// 
// Copyright (c) Microsoft. All rights reserved. 
// This code is licensed under the Microsoft Public License. 
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. 
// 
//********************************************************* 
--> 
 
<common:LayoutAwarePage  
    x:Class="ProximityCPP.MainPage" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:common="using:ProximityCPP.Common" 
    mc:Ignorable="d" 
    x:Name="RootPage"> 
 
    <common:LayoutAwarePage.Resources> 
        <Style x:Key="BaseStatusStyle" TargetType="TextBlock"> 
            <Setter Property="FontFamily" Value="Segoe UI Semilight"/> 
            <Setter Property="FontSize" Value="14.667"/> 
            <Setter Property="Margin" Value="0,0,0,5"/> 
        </Style> 
        <Style x:Key="StatusStyle" BasedOn="{StaticResource BaseStatusStyle}" TargetType="TextBlock"> 
            <Setter Property="Foreground" Value="Green"/> 
        </Style> 
        <Style x:Key="ErrorStyle" BasedOn="{StaticResource BaseStatusStyle}" TargetType="TextBlock"> 
            <Setter Property="Foreground" Value="Blue"/> 
        </Style> 
    </common:LayoutAwarePage.Resources> 
 
 
    <Grid x:Name="LayoutRoot" Background="White"> 
         
        <Grid x:Name="ContentRoot" Background="White" Margin="100,20,100,20"> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="Auto"/> 
                <RowDefinition Height="*"/> 
                <RowDefinition Height="Auto"/> 
            </Grid.RowDefinitions> 
 
            <!-- Header --> 
            <StackPanel Orientation="Horizontal" Grid.Row="0"> 
                <Image x:Name="WindowsLogo" Stretch="None" Source="Assets/windows-sdk.png" AutomationProperties.Name="Windows Logo" HorizontalAlignment="Left" Grid.Column="0"/> 
                <TextBlock  Text="Windows 8 SDK Samples" VerticalAlignment="Bottom" Style="{StaticResource TitleTextStyle}" TextWrapping="Wrap" Grid.Column="1"/> 
            </StackPanel> 
            <ScrollViewer x:Name="MainScrollViewer" Grid.Row="1" ZoomMode="Disabled" IsTabStop="False" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,0,20" > 
                <Grid> 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="Auto"/> 
                        <RowDefinition Height="*"/> 
                    </Grid.RowDefinitions> 
                    <TextBlock x:Name="FeatureName" Grid.Row="0"  Text="Add Sample Title Here" Style="{StaticResource HeaderTextStyle}" TextWrapping="Wrap"/> 
 
                    <!-- Content --> 
                    <Grid Grid.Row="1"> 
 
                        <!-- All XAML in this section is purely for design time so you can see sample content in the designer. --> 
                        <!-- This will be repaced at runtime by live content.                                                  --> 
                        <Grid> 
                            <Grid.RowDefinitions> 
                                <RowDefinition Height="Auto"/> 
                                <RowDefinition Height="Auto"/> 
                                <RowDefinition Height="Auto"/> 
                                <RowDefinition Height="Auto"/> 
                                <RowDefinition Height="Auto"/> 
                                <RowDefinition Height="Auto"/> 
                                <RowDefinition Height="Auto"/> 
                                <RowDefinition Height="*"/> 
                            </Grid.RowDefinitions> 
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition Width="Auto"/> 
                                <ColumnDefinition Width="*"/> 
                            </Grid.ColumnDefinitions> 
                            <TextBlock Grid.Row="0" Text="Input" Style="{StaticResource H2Style}"/> 
 
                            <TextBlock x:Name="ScenarioListLabel" Text="Select Scenario:" Grid.Row="1"  Style="{StaticResource SubheaderTextStyle}" Margin="0,5,0,0" /> 
                            <ListBox x:Name="Scenarios" Margin="0,0,20,0" Grid.Row="2" AutomationProperties.Name="Scenarios" HorizontalAlignment="Left"  
                                         VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                                         AutomationProperties.LabeledBy="{Binding ElementName=ScenarioListLabel}" MaxHeight="125"> 
                                <ListBox.ItemTemplate> 
                                    <DataTemplate> 
                                        <TextBlock Text="{Binding Name}"/> 
                                    </DataTemplate> 
                                </ListBox.ItemTemplate> 
                            </ListBox> 
                            <TextBlock x:Name="DescriptionText" Margin="0,5,0,0" Text="Description:" Style="{StaticResource SubheaderTextStyle}" Grid.Row="1" Grid.Column="1"/> 
                            <!-- Input Scenarios --> 
                            <UserControl x:Name="InputSection" Margin="0,5,0,0" IsTabStop="False" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top"/> 
                                 
                            <!-- Output section --> 
                            <TextBlock Text="Output" Grid.Row="5"  Margin="0,25,0,20" Style="{StaticResource H2Style}" Grid.ColumnSpan="2"/> 
                            <TextBlock x:Name="StatusBlock" Grid.Row="6" Margin="0,0,0,5" Grid.ColumnSpan="2"/> 
 
                            <!-- Output Scenarios --> 
                            <UserControl x:Name="OutputSection" Grid.Row="7" Grid.ColumnSpan="2" BorderThickness="0"/> 
                        </Grid> 
                    </Grid> 
                </Grid> 
            </ScrollViewer> 
 
            <!-- Footer --> 
            <Grid x:Name="Footer"  Grid.Row="3" Margin="0,10,0,10" VerticalAlignment="Bottom" > 
                <Grid.RowDefinitions> 
                    <RowDefinition Height="Auto"/> 
                    <RowDefinition Height="Auto"/> 
                    <RowDefinition Height="Auto"/> 
                </Grid.RowDefinitions> 
 
                <Grid.ColumnDefinitions> 
                    <ColumnDefinition Width="Auto"/> 
                    <ColumnDefinition Width="*"/> 
                </Grid.ColumnDefinitions> 
                <Image Grid.Row="0"  Source="Assets/microsoft-sdk.png" AutomationProperties.Name="Microsoft Logo" Stretch="None" HorizontalAlignment="Left"/> 
                <TextBlock Style="{StaticResource FooterStyle}" Text="© 2011 Microsoft Corporation. All rights reserved." TextWrapping="Wrap" Grid.Row="1" HorizontalAlignment="Left"/> 
                <StackPanel x:Name="FooterPanel" Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right"> 
                    <HyperlinkButton Content="Terms of use" Tag="http://www.microsoft.com/About/Legal/EN/US/IntellectualProperty/Copyright/default.aspx" 
                        Click="Footer_Click" FontSize="12" Style="{StaticResource HyperlinkStyle}"/> 
                    <TextBlock Text="|" Style="{StaticResource SeparatorStyle}" VerticalAlignment="Center"/> 
                    <HyperlinkButton Content="Trademarks" Tag="http://www.microsoft.com/About/Legal/EN/US/IntellectualProperty/Trademarks/EN-US.aspx" 
                        Click="Footer_Click" FontSize="12" Style="{StaticResource HyperlinkStyle}"/> 
                    <TextBlock Text="|"  Style="{StaticResource SeparatorStyle}" VerticalAlignment="Center"/> 
                    <HyperlinkButton Content="Privacy Statement" Tag="http://privacy.microsoft.com" Click="Footer_Click" FontSize="12" Style="{StaticResource HyperlinkStyle}"/> 
                </StackPanel> 
            </Grid> 
 
 
        </Grid> 
 
        <VisualStateManager.VisualStateGroups> 
            <!-- Visual states reflect the application's view state --> 
            <VisualStateGroup> 
                <VisualState x:Name="FullScreenLandscape"> 
                    <Storyboard> 
                    </Storyboard> 
                </VisualState> 
                <VisualState x:Name="Filled"> 
                    <Storyboard> 
                    </Storyboard> 
                </VisualState> 
 
                <VisualState x:Name="FullScreenPortrait"> 
                    <Storyboard> 
                    </Storyboard> 
                </VisualState> 
 
                <VisualState x:Name="Snapped"> 
                    <Storyboard> 
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="ContentRoot"> 
                            <DiscreteObjectKeyFrame KeyTime="0"> 
                                <DiscreteObjectKeyFrame.Value> 
                                    <Thickness>20,20,20,20</Thickness> 
                                </DiscreteObjectKeyFrame.Value> 
                            </DiscreteObjectKeyFrame> 
                        </ObjectAnimationUsingKeyFrames> 
                    </Storyboard> 
                </VisualState> 
            </VisualStateGroup> 
        </VisualStateManager.VisualStateGroups> 
    </Grid> 
</common:LayoutAwarePage>