1
0

fix: fix accessory icon and update project nuget system

This commit is contained in:
2025-11-17 12:35:47 +08:00
parent 7bc8a99d49
commit 9d51866443
12 changed files with 153 additions and 312 deletions

View File

@@ -1,41 +1,19 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BallanceTasEditor.Styles">
<!--<ImageSourceConverter x:Key="AccessorySourceIconConverter"/>
<DataTemplate x:Key="AccessoryLoadedIconDataTemplate">
<DataTemplate x:Key="AccessoryIconDataTemplate">
<StackPanel Orientation="Horizontal">
<ContentControl Content="{Binding Path=(local:AccessoryIcon.AccessoryIcon), RelativeSource={RelativeSource AncestorType=Control, AncestorLevel=1}}"
Width="16" Height="16"/>
<Image Source="{Binding Path=(local:AccessoryIcon.Icon), RelativeSource={RelativeSource AncestorType=Control, AncestorLevel=1}}"
Width="16" Height="16" RenderOptions.BitmapScalingMode="HighQuality"/>
<ContentControl Content="{Binding}" Margin="5,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="AccessorySourceIconDataTemplate" >
<StackPanel Orientation="Horizontal">
<Image Source="{Binding Path=(local:AccessoryIcon.AccessoryIcon), RelativeSource={RelativeSource AncestorType=Control, AncestorLevel=1}, Converter={StaticResource AccessorySourceIconConverter}}"
Width="16" Height="16"/>
<ContentControl Content="{Binding}" Margin="5,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
<local:AccessoryIconContentTemplateSelector x:Key="AccessoryIconDataTemplateSelector"
LoadedIconTemplate="{StaticResource AccessoryLoadedIconDataTemplate}"
SourceIconTemplate="{StaticResource AccessorySourceIconDataTemplate}"/>-->
<ControlTemplate x:Key="shit" TargetType="ContentControl">
<ContentPresenter x:Name="Icon" ContentSource="Content"/>
</ControlTemplate>
<Style x:Key="AccessoryIconButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<ContentControl Content="{Binding Path=(local:AccessoryIcon.AccessoryIcon), RelativeSource={RelativeSource AncestorType=Button, AncestorLevel=1}}"
Width="16" Height="16" Template="{StaticResource shit}">
</ContentControl>
<ContentControl Content="{Binding}" Margin="5,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="ContentTemplate" Value="{StaticResource AccessoryIconDataTemplate}"/>
</Style>
<Style x:Key="AccessoryIconGroupBox" TargetType="GroupBox" BasedOn="{StaticResource {x:Type GroupBox}}">
<Setter Property="HeaderTemplate" Value="{StaticResource AccessoryIconDataTemplate}"/>
</Style>
</ResourceDictionary>