AvaloniaTool/ZTools/Views/SettingWindow.axaml

89 lines
4.9 KiB
Plaintext
Raw Permalink Normal View History

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:ZTools.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:objectModel="clr-namespace:System.Collections.ObjectModel;assembly=System.ObjectModel"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="300"
x:Class="ZTools.Views.SettingWindow"
Title="SettingWindow"
x:DataType="vm:SettingViewModel">
<!-- Test Instance of ViewModel -->
<Window.DataContext>
<vm:SettingViewModel />
</Window.DataContext>
<Design.DataContext>
<vm:SettingViewModel>
<!-- <vm:SettingViewModel.ThemeChanged>False</vm:SettingViewModel.ThemeChanged> -->
<!-- <vm:SettingViewModel.ThemeName> -->
<!-- <system:String>LightOrDark</system:String> -->
<!-- </vm:SettingViewModel.ThemeName> -->
<!-- <vm:SettingViewModel.Themes> -->
<!-- <objectModel:ObservableCollection x:TypeArguments="vm:Item1"> -->
<!-- <vm:Item1 Name="job" BornDate="2014/09/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="John" BornDate="2024/12/03 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="Bob" BornDate="2002/01/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="job" BornDate="2014/09/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="John" BornDate="2024/12/03 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="Bob" BornDate="2002/01/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="job" BornDate="2014/09/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="John" BornDate="2024/12/03 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="Bob" BornDate="2002/01/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="job" BornDate="2014/09/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="John" BornDate="2024/12/03 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="Bob" BornDate="2002/01/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="job" BornDate="2014/09/23 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="John" BornDate="2024/12/03 23:09:19"></vm:Item1> -->
<!-- <vm:Item1 Name="Bob" BornDate="2002/01/23 23:09:19"></vm:Item1> -->
<!-- </objectModel:ObservableCollection> -->
<!-- </vm:SettingViewModel.Themes> -->
</vm:SettingViewModel>
</Design.DataContext>
2025-01-25 16:31:26 +08:00
<Window.Styles>
<Style Selector="ToggleButton PathIcon.audio-on">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="ToggleButton:checked PathIcon.audio-on">
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="ToggleButton PathIcon.audio-mute">
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="ToggleButton:checked PathIcon.audio-mute">
<Setter Property="IsVisible" Value="False" />
</Style>
</Window.Styles>
<DockPanel>
2025-01-25 16:31:26 +08:00
<Grid ColumnDefinitions="Auto,Auto,*"
RowDefinitions="Auto,Auto"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<!-- <ListBox.ItemTemplate> -->
<!-- <DataTemplate> -->
<!-- <Grid ColumnDefinitions="40,40" RowDefinitions="Auto,Auto" VerticalAlignment="Center" -->
<!-- HorizontalAlignment="Center"> -->
<!-- <Image Grid.Row="0" Grid.Column="0" Width="20" Height="20" -->
<!-- Source="{Binding ItemIcon}" /> -->
<!-- <TextBlock Grid.Row="1" Grid.Column="0" Width="20" FontSize="10" -->
<!-- Text="{Binding ItemName}" /> -->
<!-- </Grid> -->
<!-- </DataTemplate> -->
<!-- </ListBox.ItemTemplate> -->
<ToggleButton Grid.Row="0" Grid.Column="0" IsChecked="True">
<Panel>
2025-01-25 16:31:26 +08:00
<PathIcon Classes="audio-on"
Data="{StaticResource send_logging_regular}" />
<PathIcon Classes="audio-mute"
Data="{StaticResource check}" />
</Panel>
</ToggleButton>
2025-01-25 16:31:26 +08:00
<TextBlock Grid.Row="0" Grid.Column="1" Height="15" FontSize="14" Text="是否打开日志"></TextBlock>
<Image Grid.Row="1" Grid.Column="0" Width="20" Height="20" Source="avares://ZTools/Assets/Menu/设置.png"></Image>
</Grid>
</DockPanel>
</Window>