Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with DrawingImage #89

Closed
TimurVa opened this issue Oct 6, 2021 · 5 comments · Fixed by #90
Closed

Not working with DrawingImage #89

TimurVa opened this issue Oct 6, 2021 · 5 comments · Fixed by #90

Comments

@TimurVa
Copy link

TimurVa commented Oct 6, 2021

I have an issue with DrawingImage as AnimatedSource. I noticed that in source code the check is only made for BitmapSource if it is not a '.gif'. So is there any possibility to improve this functionality, so we can use not only BitmapSource as AnimatedSource but any ImageSource if we don't wont to use gif animation behaviour? Or maybe should I do the Pull request for this feature?

@thomaslevesque
Copy link
Member

Hi @TimurVa,

Thanks for your interest!

Looking at the code again, it looks like it should work already... The InitAnimationOrImage just sets the imageControl.Source if it's not an animated GIF, so I'm not sure why it doesn't work for you. Let me do a few tests, I'll get back to you shortly.

@TimurVa
Copy link
Author

TimurVa commented Oct 6, 2021

Thanks for so quick response! In case it may help my Drawing images looks like this. I'm compiling them so they are existing in Resource dictionaries and I get them like Application.TryFindResource("TextAlignLeftImage"). Also I'm generating them via this project https://github.com/BerndK/SvgToXaml:

<DrawingImage x:Key="TextAlignLeftImage">
    <DrawingImage.Drawing>
        <DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
            <GeometryDrawing Brush="#FFC3C3C3" Geometry="F1 M24,24z M0,0z M15,19L3,19 3,17 15,17 15,19z M21,15L3,15 
                  3,13 21,13 21,15z M15,11L3,11 3,9 15,9 15,11z M21,7L3,7 3,5 21,5 21,7z" />
        </DrawingGroup>
    </DrawingImage.Drawing>
</DrawingImage>

@TimurVa TimurVa closed this as completed Oct 6, 2021
@TimurVa TimurVa reopened this Oct 6, 2021
@thomaslevesque
Copy link
Member

OK, I see the problem. I'll have a fix shortly

@TimurVa
Copy link
Author

TimurVa commented Oct 6, 2021

@thomaslevesque Thanks for fix!

@thomaslevesque
Copy link
Member

The fix is deployed to NuGet (v2.0.1, should appear in a few minutes after it's validated and indexed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants