Skip to content

[BUG] Altering "Source" via DataTrigger not working since v5.2.4 #114

@BLU285

Description

@BLU285

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:

  1. Create a new WPF App with VS2022 and .Net 8.0
  2. Add NuGet package and two svg images
  3. Add view model containing a toggleable IsVisible property
  4. 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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions