コメント |
https://lh5.googleusercontent.com/-Ta4dZdiAaeE/UYLY6i7smVI/AAAAAAAANNk/HakFklBG6qU/s600/_img.jpg
[[MainPage.xaml]]
@DIV
<Page
x:Class="LBOX_AppBar.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:LBOX_AppBar"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<local:TextResource
x:Key="GlobalText"
@C:red(PageTitle)="AppBar テンプレート" />
</Page.Resources>
@C:green(<!--AppBar の定義-->)
<Page.BottomAppBar>
<AppBar>
<Grid x:Name="AppBarGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel
x:Name="LeftBar"
Orientation="Horizontal"
HorizontalAlignment="Left"
>
<!--StandardStyles に定義されたスタイルをそのまま適用する-->
<!--設定ボタン-->
<Button
x:Name="SettingButton"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Style="{StaticResource SettingsAppBarButtonStyle}"
Click="SettingButton_Click"
/>
<!--削除ボタン-->
<Button
x:Name="DeleteButton"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Style="{StaticResource DeleteAppBarButtonStyle}"
Click="DeleteButton_Click"
/>
<!--お気に入りボタン-->
<Button
x:Name="FavoriteButton"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Style="{StaticResource FavoriteAppBarButtonStyle}"
Click="FavoriteButton_Click"
/>
</StackPanel>
<StackPanel x:Name="RightBar"
Grid.Column="1"
HorizontalAlignment="Right"
Orientation="Horizontal"
>
<!-- 保存ボタンを定義時に、表示文字列を変更する-->
<Button
x:Name="SaveButton"
@c:red(AutomationProperties.Name="保存")
Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Style="{StaticResource SaveAppBarButtonStyle}"
Click="SaveButton_Click"
/>
<!--メールボタン-->
<Button
x:Name="MailButton"
Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Style="{StaticResource MailAppBarButtonStyle}"
Loaded="MailButton_Loaded" Click="MailButton_Click"
/>
</StackPanel>
</Grid>
</AppBar>
</Page.BottomAppBar>
@C:green(<!--画面定義-->)
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Border BorderBrush="#FF999999" BorderThickness="3" HorizontalAlignment="Left" Height="546" Margin="76,126,0,0" VerticalAlignment="Top" Width="1122" Background="#FF323232" CornerRadius="20"/>
<TextBlock
HorizontalAlignment="Left"
Height="61"
Margin="76,60,0,0"
TextWrapping="Wrap"
Text="{@C:red(Binding Source={StaticResource GlobalText},Path=PageTitle)}"
VerticalAlignment="Top"
Width="1090"
FontSize="40"
FontWeight="Bold"
FontFamily="Meiryo"
/>
</Grid>
</Page>
@END |