How can we help you today? How can we help you today?

References to image files passed as a property from c# code to XAML does not work after obfuscating

Hi,
In XAML we have for example:
<Image Style="{StaticResource GrayableImage}" DockPanel.Dock="Left" Stretch="Uniform" Height="64"
                                            Source="{Binding Path=.ImagePath}"
                                           IsEnabled="{Binding Path=.Available}"/>

ImagePath is declared as a string and is assigned a value like "/HotDiskResources;component/Images/AnImage.png"

HotDiskResources is a class library embedded in the exe-file after obfuscation. /Images is a subfolder only containing image files.
 
We use SmartAssambly 6.11.1.354.

I have tried with different obfuscation settings but have not managed to solve this. This does work when not obfuscated.

Extra information:
Hard coded image paths in XAML do work after obfuscation. For example
<Image Height="20" Stretch="Uniform"
                           Source="/HotDiskResources;component/Images/OtherImage.png" />

When I print out the value of ImagePath in a log file it si not obfuscated and look as expected.

Regards @nders
anders.isacson
0

Comments

1 comment

  • Russell D
    We couldn't reproduce this. Are you able to send in a reproduction (assemblies + SAPROJ)?
    Russell D
    0

Add comment

Please sign in to leave a comment.