MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Graphic Artifacts when using GroupBox/Card in ViewBox

Open
#2,308 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
16.3k
Forks
3.5k
Avg merge
1d 22h
Merged PRs (30d)
8

Description

I have a UserControl with a ViewBox inside.
I don't know why but in dark mode, some graphic artifacts appear when I move my mouse over them

https://user-images.githubusercontent.com/54487782/116099068-e36b2380-a6ab-11eb-9093-8e60a94b9d62.mp4

I've tried to fix it with the different solutions listed here : https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/issues/1097
I've tried :
- `UseLayoutRounding="True"`
- `SnapsToDevicePixels="True"`
- `RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly`

Moreover, I've tried to visualize my ViewBox with Snoop, but Height and Width values seem normal.

In light mode I don't have this problem.

**- EDIT -**
I lowered the brightness of my screen, and I just saw that there are also artifacts in light mode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported artifacts with a UserControl containing a ViewBox and GroupBox/Card, comparing dark and light modes and the attached video. Review the attempted UseLayoutRounding, SnapsToDevicePixels, and software-rendering settings; done means the artifacts no longer appear when moving the mouse or lowering screen brightness.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.