Drop ValueViewModel, and expand ObservableCollection to support Value/ViewModel, and Key/Value/ViewModel

This commit is contained in:
TheXamlGuy
2024-10-02 21:47:59 +01:00
parent 08bfa44c4f
commit 855edf7d6d
7 changed files with 250 additions and 129 deletions
@@ -2,6 +2,66 @@
<Styles.Resources>
<ResourceDictionary>
<FontFamily x:Key="FluentThemeFontFamily">/Fonts/#FluentSystemIcons-Resizable</FontFamily>
<ControlTheme x:Key="TextBoxButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource TextControlButtonForeground}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Width" Value="30" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="Padding" Value="{StaticResource HelperButtonThemePadding}" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Focusable" Value="False" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<ControlTemplate>
<Border
Name="ButtonLayoutGrid"
Margin="{DynamicResource TextBoxInnerButtonMargin}"
Background="Transparent"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<ContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
RecognizesAccessKey="True" />
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#ButtonLayoutGrid">
<Setter Property="Background" Value="{DynamicResource TextControlButtonBackgroundPointerOver}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPointerOver}" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource TextControlButtonForegroundPointerOver}" />
</Style>
</Style>
<Style Selector="^:pressed">
<Style Selector="^ /template/ Border#ButtonLayoutGrid">
<Setter Property="Background" Value="{DynamicResource TextControlButtonBackgroundPressed}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPressed}" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource TextControlButtonForegroundPressed}" />
</Style>
</Style>
<Style Selector="^:disabled /template/ Border#ButtonLayoutGrid">
<Setter Property="Opacity" Value="0" />
</Style>
</ControlTheme>
<ResourceDictionary.MergedDictionaries>
<MergeResourceInclude Source="../CarouselView/CarouselView.axaml" />
<MergeResourceInclude Source="../PersonPicture/PersonPicture.axaml" />