首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

式样

2012-09-02 
样式phone:PhoneApplicationPagex:ClassPhoneApp1.样式Page1xmlnshttp://schemas.microsoft.com/win

样式

<phone:PhoneApplicationPage
    x:Class="PhoneApp1.样式Page1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
    <phone:PhoneApplicationPage.Resources>
        <Style TargetType="Image" >
            <Setter Property="Width" Value="200" > </Setter>
            <Setter Property="Height" Value="200"></Setter>
        </Style>
        <Style TargetType="Image" x:Name="img">
            <Setter Property="Source" Value="/PhoneApp1;component/Images/AnTing.jpg"></Setter>
        </Style>
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <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">
         
            <Image Source="/PhoneApp1;component/Images/AnTing.jpg" Margin="100,500,100,0"></Image>
            <Image Margin="0,0,0,300" Style="{StaticResource img}" ></Image>
           
        </Grid>
    </Grid>
 

</phone:PhoneApplicationPage>

式样

 

 

热点排行