132 lines
6.4 KiB
Plaintext
132 lines
6.4 KiB
Plaintext
|
|
<ui:FluentWindow
|
||
|
|
x:Class="WPFUIAPP.MainWindow"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:local="clr-namespace:WPFUIAPP"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||
|
|
xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta"
|
||
|
|
Title="MainWindow"
|
||
|
|
Width="800"
|
||
|
|
Height="450"
|
||
|
|
ui:Design.Background="#252525"
|
||
|
|
ui:Design.Foreground="#252525"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<Grid>
|
||
|
|
<StackPanel>
|
||
|
|
<ui:TitleBar />
|
||
|
|
<ui:Button Click="Button_Click" Content="Toast" />
|
||
|
|
<ui:Button Content="Show Flyout">
|
||
|
|
<ui:FlyoutService.Flyout>
|
||
|
|
<ui:Flyout Placement="Bottom">
|
||
|
|
<StackPanel>
|
||
|
|
<TextBlock HorizontalAlignment="Left" Text="Show the flyout message here" />
|
||
|
|
<Button Command="{Binding GotItCommand}" Content="Got it" />
|
||
|
|
</StackPanel>
|
||
|
|
</ui:Flyout>
|
||
|
|
</ui:FlyoutService.Flyout>
|
||
|
|
</ui:Button>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<StackPanel.Resources>
|
||
|
|
<vio:ToggleButtonGroup x:Key="ToggleButtonGroup" />
|
||
|
|
</StackPanel.Resources>
|
||
|
|
<ToggleButton
|
||
|
|
vio:ToggleButtonGroup.Group="{DynamicResource ToggleButtonGroup}"
|
||
|
|
Content="1st"
|
||
|
|
IsChecked="True" />
|
||
|
|
<ToggleButton vio:ToggleButtonGroup.Group="{DynamicResource ToggleButtonGroup}" Content="2nd" />
|
||
|
|
</StackPanel>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<StackPanel.Resources>
|
||
|
|
<vio:RadioButtonGroup x:Key="RadioButtonGroup" />
|
||
|
|
</StackPanel.Resources>
|
||
|
|
<RadioButton
|
||
|
|
vio:RadioButtonGroup.Group="{DynamicResource RadioButtonGroup}"
|
||
|
|
Content="1st"
|
||
|
|
IsChecked="True" />
|
||
|
|
<Grid>
|
||
|
|
<RadioButton
|
||
|
|
Margin="8,0,0,0"
|
||
|
|
vio:RadioButtonGroup.Group="{DynamicResource RadioButtonGroup}"
|
||
|
|
Content="2nd" />
|
||
|
|
</Grid>
|
||
|
|
</StackPanel>
|
||
|
|
<ui:TreeListView ItemsSource="{Binding StaffList}">
|
||
|
|
<ui:TreeListView.DataContext>
|
||
|
|
<local:ViewModel />
|
||
|
|
</ui:TreeListView.DataContext>
|
||
|
|
<ui:TreeListView.Columns>
|
||
|
|
<GridViewColumnCollection>
|
||
|
|
<ui:GridViewColumn Width="400" Header="Name">
|
||
|
|
<ui:GridViewColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<ui:TreeRowExpander Content="{Binding Name}" />
|
||
|
|
</DataTemplate>
|
||
|
|
</ui:GridViewColumn.CellTemplate>
|
||
|
|
</ui:GridViewColumn>
|
||
|
|
<ui:GridViewColumn
|
||
|
|
Width="80"
|
||
|
|
DisplayMemberBinding="{Binding Age}"
|
||
|
|
Header="Age" />
|
||
|
|
<ui:GridViewColumn
|
||
|
|
Width="80"
|
||
|
|
DisplayMemberBinding="{Binding Sex}"
|
||
|
|
Header="Sex" />
|
||
|
|
<ui:GridViewColumn
|
||
|
|
Width="100"
|
||
|
|
DisplayMemberBinding="{Binding Duty}"
|
||
|
|
Header="Duty" />
|
||
|
|
<ui:GridViewColumn Width="250" Header="IsChecked">
|
||
|
|
<ui:GridViewColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<ui:ToggleSwitch IsChecked="{Binding IsChecked}" />
|
||
|
|
</DataTemplate>
|
||
|
|
</ui:GridViewColumn.CellTemplate>
|
||
|
|
</ui:GridViewColumn>
|
||
|
|
</GridViewColumnCollection>
|
||
|
|
</ui:TreeListView.Columns>
|
||
|
|
<ui:TreeListView.ItemTemplate>
|
||
|
|
<HierarchicalDataTemplate ItemsSource="{Binding StaffList}" />
|
||
|
|
</ui:TreeListView.ItemTemplate>
|
||
|
|
</ui:TreeListView>
|
||
|
|
<Button Click="MsgSyncClick" Content="MessageBox" />
|
||
|
|
<Button Click="MsgAsyncClick" Content="MessageBoxAsync" />
|
||
|
|
<Button Click="PendingBoxClick" Content="PendingBox" />
|
||
|
|
<Button Click="ContentDialogClick" Content="ContentDialog" />
|
||
|
|
<Button Click="NewContentDialogClick" Content="NewContentDialog" />
|
||
|
|
<ui:TreeModelListView Model="{Binding TreeTestModel}">
|
||
|
|
<ui:TreeModelListView.DataContext>
|
||
|
|
<local:ViewModel2 />
|
||
|
|
</ui:TreeModelListView.DataContext>
|
||
|
|
<ui:GridView>
|
||
|
|
<ui:GridView.Columns>
|
||
|
|
<ui:GridViewColumn Width="400" Header="Column1">
|
||
|
|
<ui:GridViewColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<ui:TreeModelRowExpander Content="{Binding Column1}" />
|
||
|
|
</DataTemplate>
|
||
|
|
</ui:GridViewColumn.CellTemplate>
|
||
|
|
</ui:GridViewColumn>
|
||
|
|
<ui:GridViewColumn
|
||
|
|
Width="250"
|
||
|
|
DisplayMemberBinding="{Binding Column2, Mode=TwoWay}"
|
||
|
|
Header="Column2" />
|
||
|
|
<ui:GridViewColumn
|
||
|
|
Width="250"
|
||
|
|
DisplayMemberBinding="{Binding Column3, Mode=TwoWay}"
|
||
|
|
Header="Column3" />
|
||
|
|
<ui:GridViewColumn Width="250" Header="IsChecked">
|
||
|
|
<ui:GridViewColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<ui:ToggleSwitch IsChecked="{Binding IsChecked}" />
|
||
|
|
</DataTemplate>
|
||
|
|
</ui:GridViewColumn.CellTemplate>
|
||
|
|
</ui:GridViewColumn>
|
||
|
|
</ui:GridView.Columns>
|
||
|
|
</ui:GridView>
|
||
|
|
</ui:TreeModelListView>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</ui:FluentWindow>
|