-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Blurry ToggleButton
#3612
Comments
@MichelMichels Probably related to changes for this and prior issue mentioned in there #3568. The CacheMode can actually be set, because the attached property is inheritable and thus could be set/cleared on the ToggleButton which would affect the adorner. Probably worth visiting to see if the recent changes from explicit CacheMode to the AP binding has other similar side-effects (other controls) we just haven't caught. |
ofcourse, I forgot about inheritable properties. I knew I missed something. What would be the most appropriate way to fix this? |
@MichelMichels I am not really sure actually. I would like to hear @Keboo opinion on the matter... |
@nicolaihenriksen I made a test repository with the Nuget packages to check whether the |
@nicolaihenriksen, so I revisited my test app and added a case where I set This is run with latest Nuget packages (5.1.0) on a Windows 11 machine. |
Also, when increasing the |
@MichelMichels yes I just ran your sample app, and was confused why you did not think it was inheriting 😄 I think the confusion perhaps comes from the fact that the attached property has a default value which makes things blurry 😢 Looking that the doc link you posted, perhaps the default value should be changed to something more appropriate where |
@nicolaihenriksen yes, I think maybe a default setting of 2 or 3 should be better. The test was run on a monitor with resolution 1920x1200. Which seems to me a common resolution. Maybe we could try to write a test to measure the rendering time increase for these values? I must say I'm not that familiar with testing should cases. |
@MichelMichels I must also admit that my knowledge of |
Perfect, I'll submit a PR tonight (CET 1900 or later) |
…de set to 'null'
@nicolaihenriksen |
Following line makes the
ToggleButton
thumb blurry (the circle that switches side when toggling the button.Link to line in source code
This binding on
CacheMode
seems at first hand also completely unnecessary, as this value can't be set in any way:AdornerDecorator
has no nameAdornerDecorator
is inside the style templateThe value will always be the default value of
ShadowAssist.CacheMode
, which seems to be following valuenew BitmapCache { EnableClearType = true, SnapsToDevicePixels = true }
.When I remove the
CacheMode
setting, the circle renders crisp and sharp.CacheMode
setCacheMode
setThe text was updated successfully, but these errors were encountered: