Files
aistudio-wpf-diagram/AIStudio.Wpf.DiagramDesigner.Additionals/Extensions/ViewModels/SvgDesignerItemViewModel.xaml
2023-01-25 15:58:05 +08:00

13 lines
922 B
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner;assembly=AIStudio.Wpf.DiagramDesigner"
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.DiagramDesigner.Additionals.Extensions.ViewModels"
xmlns:svg="https://gitee.com/akwkevin/aistudio.-wpf.-test/tree/master/Controls/AIStudio.Wpf.Svg2XamlExtension">
<s:ColorBrushConverter x:Key="ColorBrushConverter" />
<DataTemplate DataType="{x:Type viewmodel:SvgDesignerItemViewModel}">
<Grid IsHitTestVisible="False">
<svg:PackSvg Width="Auto" Height="Auto" Path="{Binding Icon}" Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"/>
</Grid>
</DataTemplate>
</ResourceDictionary>