MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Scale transforms do not render consistently
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 16.3k
- Forks
- 3.5k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
Reproduction steps:
Apply a `ScaleTransform` to the `ContentControl` in the `MainWindow` of the demo app.
```XAML
```
The problem can be observed with most of the controls that have fine lines. ComboBox and TextBox both use the Underline control, and Slider is another obvious one. The issue is that the rendered thickness of these lines is inconsistent.
This problem is typically resolved with the [UseLayoutRounding](https://docs.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement.uselayoutrounding?view=netframework-4.7.2) and [SnapToDevicePixels](https://docs.microsoft.com/en-us/dotnet/api/system.windows.uielement.snapstodevicepixels?view=netframework-4.7.2)
The "fix" for this may be partially or fully in the demo application, in which case those changes should be documented here.



Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the demo app's MainWindow and reproduce the ScaleTransform on the ContentControl, then compare the fine-line rendering in Underline-based ComboBox and TextBox controls and Slider. Check whether UseLayoutRounding or SnapToDevicePixels resolves the inconsistency; done means the affected controls render consistent line thickness, with any demo-app changes documented.
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
- Mostly clear
- Newbie friendliness
- 35/100