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

An odd "phenomenon" while usage MetroWindow and Canvas. #3638

Closed
DeputyOfCopyPaster opened this issue Oct 8, 2019 · 5 comments
Closed

An odd "phenomenon" while usage MetroWindow and Canvas. #3638

DeputyOfCopyPaster opened this issue Oct 8, 2019 · 5 comments

Comments

@DeputyOfCopyPaster
Copy link

DeputyOfCopyPaster commented Oct 8, 2019

Hello everyone!
Metro 1.6.5
I've noticed that something wrong happens with images (Canvas) while Metro framework usage.
I performed two simpliest tests and I had been surprised that pure WPF project is deprived of such a "phenomenon" as follows:

polygons
polygons-gif

In other words the pure WPF project handles well with all Canvases inserted.
So, my question is, how to get rid of that "phenomenon"?

Please any insights on that issue?

thanks in advance!

An Update: the same disaster has v.2.00-alpha0490.

@timunie
Copy link
Collaborator

timunie commented Oct 8, 2019

@DeputyOfCopyPaster can you upload your sample? I have an idea, but I have to try it tomorrow if it works.

Happy coding
Tim

@timunie
Copy link
Collaborator

timunie commented Oct 8, 2019

@DeputyOfCopyPaster
Copy link
Author

DeputyOfCopyPaster commented Oct 8, 2019

@timunie

ok, please look at the sample attached. To see difference look first at pure WPF project, then add MetroWindow by yourself and catch the "phenomenon".

I really hope you make it!

CanvasPhenomenon.zip

@punker76
Copy link
Member

punker76 commented Oct 8, 2019

@DeputyOfCopyPaster The SnapsToDevicePixels of the MetroWindow is set to true, so all inner controls inherits this value. You can fix this by changing the SnapsToDevicePixels for the Canvas and set it to false.

<Canvas SnapsToDevicePixels="False">
</Canvas>

@DeputyOfCopyPaster
Copy link
Author

DeputyOfCopyPaster commented Oct 8, 2019

An Update:

@timunie, @punker76
your link above (from STACK), led to the assumption that it might make a sense.
As it turned out, I 've gotten better Canvas' behaviour as it was before. At least the lines had stopped disappearing. 👍
<Canvas SnapsToDevicePixels="False"> </Canvas>

@punker76 punker76 closed this as completed Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants