Start upgrading to .NET 7

This commit is contained in:
2023-05-01 20:45:23 -04:00
parent 7be7af5980
commit 5610542ce9
27 changed files with 1221 additions and 1420 deletions

View File

@@ -1,17 +1,27 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:FloatingStatusWindowLibrary.Properties"
xmlns:properties="clr-namespace:ChrisKaczor.Wpf.FloatingStatusWindow.Properties"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FloatingStatusWindowLibrary"
xmlns:local="clr-namespace:ChrisKaczor.Wpf.FloatingStatusWindow"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:Windows="clr-namespace:Common.Wpf.Windows;assembly=Common.Wpf" x:Class="FloatingStatusWindowLibrary.AppearanceWindow"
Title="{x:Static properties:Resources.ChangeAppearanceWindow}" Height="290" Width="450" Binding.SourceUpdated="HandleWindowSourceUpdated"
xmlns:windows="clr-namespace:ChrisKaczor.Wpf.Windows;assembly=ChrisKaczor.Wpf.Windows.ControlBox"
x:Class="ChrisKaczor.Wpf.FloatingStatusWindow.AppearanceWindow"
Title="{x:Static properties:Resources.ChangeAppearanceWindow}"
Height="290"
Width="450"
Binding.SourceUpdated="HandleWindowSourceUpdated"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" SizeToContent="Height"
ResizeMode="NoResize"
SizeToContent="Height"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance {x:Type local:WindowSettings}}"
Closing="HandleWindowClosing" x:ClassModifier="internal" Windows:ControlBox.HasMaximizeButton="False" Windows:ControlBox.HasMinimizeButton="False" Windows:ControlBox.HasSystemMenu="False" WindowStyle="ToolWindow">
Closing="HandleWindowClosing"
x:ClassModifier="internal"
windows:ControlBox.HasMaximizeButton="False"
windows:ControlBox.HasMinimizeButton="False"
windows:ControlBox.HasSystemMenu="False"
WindowStyle="ToolWindow">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -26,15 +36,16 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label
Content="{x:Static properties:Resources.FontName}"
x:Name="FontNameLabel"
Target="{Binding ElementName=FontNameCombo}"
Margin="6" />
<ComboBox x:Name="FontNameCombo" Grid.Row="0" Grid.Column="1"
SelectedValuePath="Source"
SelectedValue="{Binding FontName, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<Label Content="{x:Static properties:Resources.FontName}"
x:Name="FontNameLabel"
Target="{Binding ElementName=FontNameCombo}"
Margin="6" />
<ComboBox x:Name="FontNameCombo"
Grid.Row="0"
Grid.Column="1"
SelectedValuePath="Source"
SelectedValue="{Binding FontName, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
@@ -45,22 +56,26 @@
<Border BorderBrush="{x:Null}"
MinHeight="20">
<TextBlock Text="{Binding}"
FontFamily="{Binding}"
FontSize="14" Height="Auto"
VerticalAlignment="Center" />
FontFamily="{Binding}"
FontSize="14"
Height="Auto"
VerticalAlignment="Center" />
</Border>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Label
Content="{x:Static properties:Resources.FontSize}"
x:Name="FontSizeLabel" Grid.Row="1" Grid.Column="0"
Target="{Binding ElementName=FontSizeCombo}"
Margin="6" />
<ComboBox Grid.Column="1" Grid.Row="1"
x:Name="FontSizeCombo"
Text="{Binding FontSize, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
IsEditable="True" Margin="6">
<Label Content="{x:Static properties:Resources.FontSize}"
x:Name="FontSizeLabel"
Grid.Row="1"
Grid.Column="0"
Target="{Binding ElementName=FontSizeCombo}"
Margin="6" />
<ComboBox Grid.Column="1"
Grid.Row="1"
x:Name="FontSizeCombo"
Text="{Binding FontSize, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
IsEditable="True"
Margin="6">
<ComboBoxItem Content="8" />
<ComboBoxItem Content="9" />
<ComboBoxItem Content="10" />
@@ -78,88 +93,104 @@
<ComboBoxItem Content="48" />
<ComboBoxItem Content="72" />
</ComboBox>
<Label
Content="{x:Static properties:Resources.ForegroundColor}"
Grid.Row="2" Grid.Column="0" x:Name="ForegroundColorLabel"
Target="{Binding ElementName=ForegroundColorPicker}"
Margin="6" />
<xctk:ColorPicker Grid.Column="1" Grid.Row="2"
x:Name="ForegroundColorPicker"
DisplayColorAndName="True"
SelectedColor="{Binding FontColor, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6" />
<Label
Content="{x:Static properties:Resources.Padding}"
Grid.Row="3" Grid.Column="0" x:Name="PaddingLabel" Target="{Binding ElementName=PaddingUpDown}" Margin="6" />
<Label Content="{x:Static properties:Resources.ForegroundColor}"
Grid.Row="2"
Grid.Column="0"
x:Name="ForegroundColorLabel"
Target="{Binding ElementName=ForegroundColorPicker}"
Margin="6" />
<xctk:ColorPicker Grid.Column="1"
Grid.Row="2"
x:Name="ForegroundColorPicker"
DisplayColorAndName="True"
SelectedColor="{Binding FontColor, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6" />
<Label Content="{x:Static properties:Resources.Padding}"
Grid.Row="3"
Grid.Column="0"
x:Name="PaddingLabel"
Target="{Binding ElementName=PaddingUpDown}"
Margin="6" />
<xctk:IntegerUpDown Grid.Column="1"
Grid.Row="3" x:Name="PaddingUpDown"
Minimum="0" Maximum="20"
Value="{Binding Padding, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
TextAlignment="Left" Margin="6" />
<Label
Content="{x:Static properties:Resources.HorizontalAlignment}"
Grid.Row="4" Grid.Column="0" x:Name="HorizontalAlignmentLabel"
Target="{Binding ElementName=HorizontalAlignmentCombo}"
Margin="6" />
<ComboBox Grid.Column="1" Grid.Row="4"
x:Name="HorizontalAlignmentCombo"
SelectedValuePath="Tag"
SelectedValue="{Binding HorizontalAlignment, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBoxItem
Content="{x:Static properties:Resources.Left}"
Tag="{x:Static HorizontalAlignment.Left}" />
<ComboBoxItem
Content="{x:Static properties:Resources.Right}"
Tag="{x:Static HorizontalAlignment.Right}" />
<ComboBoxItem
Content="{x:Static properties:Resources.Center}"
Tag="{x:Static HorizontalAlignment.Center}" />
Grid.Row="3"
x:Name="PaddingUpDown"
Minimum="0"
Maximum="20"
Value="{Binding Padding, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
TextAlignment="Left"
Margin="6" />
<Label Content="{x:Static properties:Resources.HorizontalAlignment}"
Grid.Row="4"
Grid.Column="0"
x:Name="HorizontalAlignmentLabel"
Target="{Binding ElementName=HorizontalAlignmentCombo}"
Margin="6" />
<ComboBox Grid.Column="1"
Grid.Row="4"
x:Name="HorizontalAlignmentCombo"
SelectedValuePath="Tag"
SelectedValue="{Binding HorizontalAlignment, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBoxItem Content="{x:Static properties:Resources.Left}"
Tag="{x:Static HorizontalAlignment.Left}" />
<ComboBoxItem Content="{x:Static properties:Resources.Right}"
Tag="{x:Static HorizontalAlignment.Right}" />
<ComboBoxItem Content="{x:Static properties:Resources.Center}"
Tag="{x:Static HorizontalAlignment.Center}" />
</ComboBox>
<Label
Content="{x:Static properties:Resources.VerticalAlignment}"
Grid.Row="5" Grid.Column="0" x:Name="VerticalAlignmentLabel"
Target="{Binding ElementName=VerticalAlignmentCombo}"
Margin="6" />
<ComboBox Grid.Column="1" Grid.Row="5"
x:Name="VerticalAlignmentCombo"
SelectedValuePath="Tag"
SelectedValue="{Binding VerticalAlignment, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBoxItem
Content="{x:Static properties:Resources.Top}"
Tag="{x:Static VerticalAlignment.Top}" />
<ComboBoxItem
Content="{x:Static properties:Resources.Bottom}"
Tag="{x:Static VerticalAlignment.Bottom}" />
<ComboBoxItem
Content="{x:Static properties:Resources.Center}"
Tag="{x:Static VerticalAlignment.Center}" />
<Label Content="{x:Static properties:Resources.VerticalAlignment}"
Grid.Row="5"
Grid.Column="0"
x:Name="VerticalAlignmentLabel"
Target="{Binding ElementName=VerticalAlignmentCombo}"
Margin="6" />
<ComboBox Grid.Column="1"
Grid.Row="5"
x:Name="VerticalAlignmentCombo"
SelectedValuePath="Tag"
SelectedValue="{Binding VerticalAlignment, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBoxItem Content="{x:Static properties:Resources.Top}"
Tag="{x:Static VerticalAlignment.Top}" />
<ComboBoxItem Content="{x:Static properties:Resources.Bottom}"
Tag="{x:Static VerticalAlignment.Bottom}" />
<ComboBoxItem Content="{x:Static properties:Resources.Center}"
Tag="{x:Static VerticalAlignment.Center}" />
</ComboBox>
<Grid Grid.Column="1" Grid.Row="6"
HorizontalAlignment="Right" x:Name="GridButtons" Width="Auto" Grid.IsSharedSizeScope="True"
Height="38" VerticalAlignment="Bottom">
<Grid Grid.Column="1"
Grid.Row="6"
HorizontalAlignment="Right"
x:Name="GridButtons"
Width="Auto"
Grid.IsSharedSizeScope="True"
Height="38"
VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"
SharedSizeGroup="buttons" />
SharedSizeGroup="buttons" />
<ColumnDefinition Width="Auto"
SharedSizeGroup="buttons" />
SharedSizeGroup="buttons" />
</Grid.ColumnDefinitions>
<Button
Content="{x:Static properties:Resources.OK}"
<Button Content="{x:Static properties:Resources.OK}"
Height="23"
HorizontalAlignment="Stretch" Margin="6"
HorizontalAlignment="Stretch"
Margin="6"
x:Name="OkayButton"
VerticalAlignment="Stretch" Width="75"
Padding="7,3" IsDefault="True"
VerticalAlignment="Stretch"
Width="75"
Padding="7,3"
IsDefault="True"
Click="HandleOkayButtonClick" />
<Button
Content="{x:Static properties:Resources.Cancel}"
Grid.Column="1" Height="23"
HorizontalAlignment="Stretch" Margin="6"
<Button Content="{x:Static properties:Resources.Cancel}"
Grid.Column="1"
Height="23"
HorizontalAlignment="Stretch"
Margin="6"
x:Name="CancelButton"
VerticalAlignment="Stretch" Width="75"
Padding="7,3" IsCancel="True" />
VerticalAlignment="Stretch"
Width="75"
Padding="7,3"
IsCancel="True" />
</Grid>
</Grid>
</Window>
</Window>