feat: make style but not finished
This commit is contained in:
41
BallanceTasEditor/Styles/AccessoryIconControl.xaml
Normal file
41
BallanceTasEditor/Styles/AccessoryIconControl.xaml
Normal file
@@ -0,0 +1,41 @@
|
||||
<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">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ContentControl Content="{Binding Path=(local:AccessoryIcon.AccessoryIcon), RelativeSource={RelativeSource AncestorType=Control, AncestorLevel=1}}"
|
||||
Width="16" Height="16"/>
|
||||
<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>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user