ほら <Window x:Class="WpfFrist.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" XMLns:x="http://schemas.microsoft.com/winfx/2006/xaml" WindowStyle="None" AllowsTransparency="True" Background="{x:Null}" title="MainWindow" height="300" width="300" WindowStartuplocatio{filter}n="CenterScreen"> <Grid width="{Binding Width, ElementName=w}" height="{Binding Height, ElementName=w}"> <グリッド.Row定義> <RowDefinition Height="150" /> <RowDefinition Height="50" /> <RowDefinition Height="50" /> <RowDefinition /> </Grid.RowDefinitions> <Border Grid.RowSpan="4" BorderBrush="Gray" BorderThickness="3" CornerRadius="20" margin="10" Opacity="1" Background="White"></Border> <Button Style="{StaticResource BtnCloseStyle}" name="btnClose" Grid.Row="0" Click="Button_Click" ></Button> <Image Grid.Row="0" VerticalAlignment="Center" width="120" height="120" source="/resources/QQ screenshot 20161123091013.png" /> <TextBox x:Name="UserTextBox" Grid.Row="1" width="200" VerticalAlignment="Center" BorderThickness="0,0,0,1" height="23"></TextBox> <TextBlock foreground="DarkGray" Grid.Row="1" IsHitTestVisible="False" HorizontalAlignment="Center" Height="23" Text="ユーザー名を入力してください" VerticalAlignment="Center" width="90" FontFamily="Microsoft YaHei"> <TextBlock.Style> <Style TargetType="{x:Type TextBlock}"> <Setter Property="Visibility" value="collopsed"/> <スタイル・トリガー> <DataTrigger binding="{binding text, elementName=UserTextBox}" value=""> <Setter Property="Visibility" 値="Visible"/> </DataTrigger> </Style.Triggers> </Style> </TextBlock.Style> </TextBlock> <TextBox x:Name="PwdTextBox" Grid.Row="2" width="200" VerticalAlignment="Center" BorderThickness="0,0,0,1" 高さ="23"></TextBox> <TextBlock foreground="DarkGray" Grid.Row="2" IsHitTestVisible="False" HorizontalAlignment="Center" height="23" Text="Please enter password" verticalAlignment="Center" width="90" fontFamily="Microsoft YaHei"> <TextBlock.Style> <Style TargetType="{x:Type TextBlock}"> <Setter Property="Visibility" value="collopsed"/> <スタイル・トリガー> <DataTrigger binding="{binding text, elementName=pwdTextBox}" value=""> <Setter Property="Visibility" 値="Visible"/> </DataTrigger> </Style.Triggers> </Style> </TextBlock.Style> </TextBlock> <Button name="btnlogin" click="btnlogin_Click" Grid.Row="2" Style="{StaticResource BtnLoginStyle}" > <!--<ボタン。背景> <ImageBrush ImageSource="/Resources/LoginBtn.jpg" Stretch="Fill"/> </Button.背景>--> </Button> </Grid> </Window>
|