dotnet / dotnet/wpf

Fixing Fluent Style Issues

Open
#10,393 4 comments 1 reaction 0 assignees View on GitHub
User Story Win 11 Theming
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

WPF's Fluent control styles have some issues which need to be addressed to bring the styles at parity with WinUI Fluent styles and make them production ready. We also need some changes to default values of properties ( like HorizontalAlignment, etc. ) to minimize UI breaking changes for applications moving from Aero2 to Fluent.

**Here are the broad categories of tasks that need to be done per control for this:**

1. Match resource usage in control styles with WinUI resources where possible
2. Add animations for controls where required to match WinUI.
3. Compare Fluent styles with Aero2 styles to match
3.a. Properties like HorizontalAlignment, VerticalAlignment
3.b. TemplateBinding comparison with Aero2 styles
4. Compare WPF Fluent styles with WinUI styles :
4.a. Convert ControlTemplate Triggers to VisualStates ( to simplify animation's and bring parity with WinUI styles )
4.b. Convert StaticResource's to DynamicResource for properties where customization is needed.
4.c. Define resources for CornerRadius, Thickness, etc. for the controls where it is needed

**[List of Controls](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/controls-by-category?view=netframeworkdesktop-4.8&viewFallbackFrom=netdesktop-8.0)**

- [ ] • [Expander](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.expander)
- [x] • [GridSplitter](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.gridsplitter)
- [ ] • [GroupBox](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.groupbox)
- [x] • [ResizeGrip](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.resizegrip)
- [ ] • [Separator](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.separator)
- [ ] • [ScrollBar](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.scrollbar)
- [ ] • [ScrollViewer](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.scrollviewer)
- [ ] • [Window](https://learn.microsoft.com/en-us/dotnet/api/system.windows.window)
- [x] • [Button](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button)
- [x] • [RepeatButton](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.repeatbutton)
- [ ] • [TreeView](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.treeview)
- [ ] • [Calendar](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.calendar)
- [ ] • [ContextMenu](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contextmenu)
- [ ] • [Menu](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.menu)
- [ ] • [ToolBar](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.toolbar)
- [ ] • [CheckBox](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.checkbox)
- [ ] • [ListBox](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.listbox)
- [ ] • [RadioButton](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.radiobutton)
- [ ] • [Slider](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.slider)
- [ ] • [Frame](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.frame)
- [x] • [Hyperlink](https://learn.microsoft.com/en-us/dotnet/api/system.windows.documents.hyperlink)
- [ ] • [Page](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.page)
- [ ] • [NavigationWindow](https://learn.microsoft.com/en-us/dotnet/api/system.windows.navigation.navigationwindow)
- [ ] • [Label](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.label)
- [ ] • [ProgressBar](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.progressbar)
- [x] • [StatusBar](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.statusbar)
- [x] • [TextBlock](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textblock)
- [ ] • [ToolTip](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.tooltip)

The following control styles are part of Presentation UI, hence we won't be working on these in the current task. There fore marking them as complete.
- [x] ~~DocumentViewer~~
- [x] ~~FlowDocumentReader~~
- [x] ~~FlowDocumentScrollViewer~~
- [x] ~~StickyNoteControl~~
- [x] ~~InkCanvas~~

#### Related Issues:

These issues refer to the type of problems that we have in Fluent styles currently :
- #10370
- #8670
- #9671
- #9987

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.