-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Labels
Description
Describe the bug
I am using <Style> and < DataTrigger> to toggle between two images. Worked in version 5.2.1.
Updated to 5.2.9. "Source" property seems to be ignored; no image is displayed.
Checked versions 5.2.1, 5.2.3, 5.2.4, 5.2.6, 5.2.9, 5.2.10. Version 5.2.3 is the last one working.
To Reproduce
Steps to reproduce the behavior:
- Create a new WPF App with VS2022 and .Net 8.0
- Add NuGet package and two svg images
- Add view model containing a toggleable IsVisible property
- Add the following to the MainWindow.xaml
<svg:SVGImage Width="24" Height="20" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"> <svg:SVGImage.Style> <Style TargetType="{x:Type svg:SVGImage}"> <Setter Property="Source" Value="/SVGImageTest;component/eye-slash-fill.svg"/> <Style.Triggers> <DataTrigger Binding="{Binding IsVisible}" Value="True"> <Setter Property="Source" Value="/SVGImageTest;component/eye-fill.svg" /> </DataTrigger> </Style.Triggers> </Style> </svg:SVGImage.Style> </svg:SVGImage>