Notes/Notes.UI/Views/AboutView.axaml

44 lines
1.9 KiB
XML

<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Notes.Views"
xmlns:viewModels="clr-namespace:Notes.ViewModels;assembly=Notes.Data"
xmlns:notes="clr-namespace:Notes"
x:DataType="viewModels:AboutViewModel">
<Design.PreviewWith>
<Border Width="500" Height="400">
<StackPanel>
<Button Width="100" Height="100" VerticalContentAlignment="Bottom">aaaaaa</Button>
<ContentPresenter>
<ContentPresenter.Content>
<viewModels:AboutViewModel/>
</ContentPresenter.Content>
<ContentPresenter.ContentTemplate>
<notes:ViewSelector />
</ContentPresenter.ContentTemplate>
</ContentPresenter>
</StackPanel>
</Border>
</Design.PreviewWith>
<Design.DataContext>
<viewModels:AboutViewModel />
</Design.DataContext>
<Style Selector="controls|AboutView">
<!-- Set Defaults -->
<Setter Property="Template">
<ControlTemplate>
<DockPanel Margin="10">
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="10">
<Label FontSize="22" FontWeight="Bold" Content="{Binding Title}" />
<Label FontSize="22" Content="{Binding Version}" />
</StackPanel>
<Label DockPanel.Dock="Top" Content="{Binding Message}" />
<Button DockPanel.Dock="Bottom"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="开始使用" Command="{Binding ShowAllNotesCommand}" />
</DockPanel>
</ControlTemplate>
</Setter>
</Style>
</Styles>