mirror of
https://github.com/PacktPublishing/Learn-WinUI-3-Second-Edition.git
synced 2026-06-20 12:23:09 +00:00
68 lines
2.7 KiB
XML
68 lines
2.7 KiB
XML
<!-- Copyright (c) Microsoft Corporation and Contributors. -->
|
|
<!-- Licensed under the MIT License. -->
|
|
|
|
<Window
|
|
x:Class="WinUI3.SimpleSample.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:WinUI3.SimpleSample"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid x:Name="ParentGrid"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top"
|
|
Padding="2">
|
|
<Grid.Resources>
|
|
<Style TargetType="Button">
|
|
<Setter Property="BorderThickness"
|
|
Value="2"/>
|
|
<Setter Property="Foreground"
|
|
Value="LightGray"/>
|
|
<Setter Property="BorderBrush"
|
|
Value="GhostWhite"/>
|
|
<Setter Property="Background"
|
|
Value="DarkBlue"/>
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
Text="Name:"
|
|
Margin="0,0,2,0"
|
|
VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1"
|
|
Text="{x:Bind Path=ViewModel.Name, Mode=TwoWay}"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
Text="Actual Width:"
|
|
Margin="0,0,2,0"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="1"
|
|
Text="{Binding ElementName=ParentGrid, Path=ActualWidth}"/>
|
|
<StackPanel Grid.Row="2" Grid.Column="1"
|
|
Margin="0,4,0,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Orientation="Horizontal">
|
|
<PersonPicture Initials="MS" Margin="0,0,8,0"/>
|
|
<DropDownButton Content="Submit" Margin="0,0,4,0">
|
|
<DropDownButton.Flyout>
|
|
<MenuFlyout Placement="Bottom">
|
|
<MenuFlyoutItem Text="Submit + Print"/>
|
|
<MenuFlyoutItem Text="Submit + Email"/>
|
|
</MenuFlyout>
|
|
</DropDownButton.Flyout>
|
|
</DropDownButton>
|
|
<Button Content="Cancel"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window> |