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


<!-- 
//********************************************************* 
// 
// 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.ProximityDeviceScenario" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="using:$rootsnamespace$" 
    xmlns:common="using:ProximityCPP.Common" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d"> 
 
    <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Left" VerticalAlignment="Top"> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="Auto"/> 
            <RowDefinition Height="*"/> 
        </Grid.RowDefinitions> 
        <Grid x:Name="Input" Grid.Row="0"> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="Auto"/> 
                <RowDefinition Height="Auto"/> 
                <RowDefinition Height="*"/> 
            </Grid.RowDefinitions> 
            <TextBlock x:Name="InputTextBlock1"  TextWrapping="Wrap" Grid.Row="0" Style="{StaticResource BasicTextStyle}" HorizontalAlignment="Left" > 
                When running this sample on two PCs with Proximity devices installed, you can use the ProximityDevice to publish messages  
                to the other PC and/or subscribe to messages from the other PC. Click 'Publish message' on one PC, and click 'Subscribe for  
                message' on the other PC and enter proximity with the other PC. The published message will be received on the PC that subscribed. 
            </TextBlock> 
            <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Row="1"> 
                <Button x:Name="ProximityDevice_PublishMessageButton" Content="Publish message" Visibility="Collapsed" Margin="0,0,10,0"/> 
                <TextBox x:Name="ProximityDevice_PublishMessageText" Visibility="Collapsed" Width="400"/> 
            </StackPanel> 
            <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Row="2"> 
                <Button x:Name="ProximityDevice_SubscribeForMessageButton" Content="Subscribe for message" Visibility="Collapsed" Margin="0,0,10,0"/> 
            </StackPanel> 
        </Grid> 
 
        <Grid x:Name="Output" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1"> 
            <TextBlock x:Name="ProximityDeviceOutputText" Style="{StaticResource BasicTextStyle}" TextWrapping="Wrap" /> 
        </Grid> 
         
        <!-- Add Storyboards to the visual states below as necessary for supporting the various layouts --> 
        <VisualStateManager.VisualStateGroups> 
            <VisualStateGroup> 
                <VisualState x:Name="FullScreenLandscape"/> 
                <VisualState x:Name="Filled"/> 
                <VisualState x:Name="FullScreenPortrait"/> 
                <VisualState x:Name="Snapped"/> 
            </VisualStateGroup> 
        </VisualStateManager.VisualStateGroups> 
    </Grid> 
</common:LayoutAwarePage>