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

Windows 11 Theming Changes #8870

Merged
merged 272 commits into from Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
43ef422
Add pr triggers for staging and release branches
singhashish-wpf Dec 21, 2023
7c1ba0a
Adding win11 styles to progressbar, label and statusbar
harshit7962 Dec 20, 2023
97503f8
Applying Win11 Styles to TabControl, Frame, Page
harshit7962 Dec 20, 2023
ade8d80
Applying win11 theme to textblock
harshit7962 Dec 19, 2023
16e227a
Working code - Window and Theming API changes.
pchaurasia14 Dec 19, 2023
5c56fa1
Cleanup - Removing WindowCornerPreference and minor refactoring
pchaurasia14 Dec 19, 2023
928ef7e
Moving types from public to internal + bug fix for Window caption
pchaurasia14 Dec 19, 2023
dd3150d
Moving types from public to internal
pchaurasia14 Dec 20, 2023
50327da
Some cleanup
pchaurasia14 Dec 20, 2023
1b9551e
Some cleanup
pchaurasia14 Dec 20, 2023
fcd59a6
More cleanup
pchaurasia14 Dec 20, 2023
92e875d
Enable nullability for event and fix issue in ApplicationAccentColorM…
pchaurasia14 Dec 22, 2023
3752963
Merge pull request #8575 from pchaurasia14/WindowAndThemingAPI
singhashish-wpf Dec 22, 2023
c88e357
Adding win11 styles to ScrollBar and ScrollViewer
anjali-wpf Dec 21, 2023
229513a
Merge branch 'main' of https://github.com/dotnet/wpf into feature/win…
anjali-wpf Dec 22, 2023
09d7bf0
Merge branch 'feature/win11theming/staging' of https://github.com/dot…
anjali-wpf Dec 22, 2023
7cc5d2f
Added Calendar Style
anjali-wpf Dec 22, 2023
4ecfd27
Applying win11 styles to ListBox, ListBoxItem, Slider, togglebutton, …
harshit7962 Dec 22, 2023
20511e9
Fix Button Appearance and Calendar Button not showing
singhashish-wpf Dec 22, 2023
73e9631
Added styling for ContextMenu
anjali-wpf Dec 22, 2023
c5bca65
Added win11 styles to ComboBox
anjali-wpf Dec 22, 2023
b953dcc
Merge pull request #8589 from dotnet/Calendarbuttonfixup
singhashish-wpf Dec 26, 2023
354b4bf
Merge pull request #8587 from dotnet/CalendarChanges
singhashish-wpf Dec 26, 2023
09a6773
Merge pull request #8578 from harshit7962/controlBatch1
singhashish-wpf Dec 26, 2023
81c9494
Merge pull request #8590 from dotnet/ContextMenuChanges
singhashish-wpf Dec 26, 2023
07d927a
Merge pull request #8586 from harshit7962/controlTextBlock
singhashish-wpf Dec 26, 2023
c2c580a
Merge pull request #8584 from dotnet/ScrollBarAndScrollViewerChanges
singhashish-wpf Dec 26, 2023
eaeeb68
Added win11 styles for ListView and ListViewItem (#8592)
anjali-wpf Dec 26, 2023
9d1c01e
Merge branch 'main' of https://github.com/dotnet/wpf into feature/win…
anjali-wpf Dec 26, 2023
e63c1cd
Merge branch 'feature/win11theming/staging' of https://github.com/dot…
anjali-wpf Dec 26, 2023
c06683c
Adding win11 styles for DataGrid (#8594)
anjali-wpf Dec 26, 2023
7e46930
Adding Win11 Styles to TreeView and TreeViewItem
harshit7962 Dec 26, 2023
4539028
Adding win11 styles to Expander and DatePicker (#8583)
anjali-wpf Dec 26, 2023
8e4fd3d
Add ControlsDictionary and ThemesDictionary
singhashish-wpf Dec 27, 2023
9c3505d
Add ControlsDictionary and ThemesDictionary
singhashish-wpf Dec 27, 2023
239a5cf
Adding win11 styles to Menu and MenuItem (#8595)
anjali-wpf Dec 27, 2023
20c812f
Fix namespaces and assembly names, added textbox xaml
singhashish-wpf Jan 2, 2024
1e363e7
Merge branch 'feature/win11theming/staging' into ControlAndThemeDicts
singhashish-wpf Jan 2, 2024
beae99c
Merge pull request #8604 from dotnet/ControlAndThemeDicts
singhashish-wpf Jan 2, 2024
989bbf8
Changed x:Class attribute value (#8607)
anjali-wpf Jan 3, 2024
135e3b5
Adding win11 styles to RichTextBox and Separator (#8581)
anjali-wpf Jan 3, 2024
13a597c
Fixed win11 theming changes for ListView and ListViewItem (#8629)
anjali-wpf Jan 3, 2024
598a981
Fixing Api Compat Failure
harshit7962 Dec 22, 2023
faf4725
Merge branch 'feature/win11theming/staging' into controlBatch3
harshit7962 Jan 4, 2024
2a37acf
Added null check here on CanExecuteChanged to avoid exception (#8619)
anjali-wpf Jan 4, 2024
1ef9bb7
Adding Win11 Styles to Combo box (#8593)
anjali-wpf Jan 4, 2024
d6ff403
Removing unused references
harshit7962 Jan 4, 2024
23be027
Resolving Merge Conflicts
harshit7962 Dec 26, 2023
ff1ae8c
Merge branch 'feature/win11theming/staging' into controlTreeView
harshit7962 Jan 5, 2024
cac0609
Merge pull request #8588 from harshit7962/controlBatch3
harshit7962 Jan 5, 2024
8c438a3
Merge pull request #8579 from harshit7962/controlBatch2
harshit7962 Jan 5, 2024
e560594
Merge pull request #8603 from harshit7962/controlTreeView
harshit7962 Jan 5, 2024
eb347a6
Import xaml styles in the integrated styles page
singhashish-wpf Jan 5, 2024
be77ee4
Moving ThemesDictionary and ControlsDictionary to parent namespace
pchaurasia14 Jan 5, 2024
28bb7fe
Merge pull request #8636 from dotnet/ExtraControlStyles
singhashish-wpf Jan 5, 2024
430cf3f
Merge pull request #8637 from pchaurasia14/themingrefactoring
singhashish-wpf Jan 5, 2024
748b70e
Update ApplicationThemeManager.cs to use correct namespace
singhashish-wpf Jan 5, 2024
3e2fb9f
Merge pull request #8638 from dotnet/singhashish-wpf-patch-2
singhashish-wpf Jan 5, 2024
09ffe67
Add missing FontIcon and ImageIcon classes
singhashish-wpf Jan 8, 2024
e9e7d31
Fix for fall back colours for high contrast theme
anjali-wpf Jan 9, 2024
0b626fb
Making SymbolExtensions internal
singhashish-wpf Jan 9, 2024
31e7187
Merge pull request #8648 from dotnet/fonticon
singhashish-wpf Jan 9, 2024
2c6df32
Removing extra properties for ribbon
singhashish-wpf Jan 9, 2024
cffb2e5
fix(win11theme): ExpandDirection not respected in expander
harshit7962 Jan 9, 2024
47cc75c
Fix(win11theme): TabStripPlacement not Respected in tabcontrol
harshit7962 Jan 9, 2024
24c9cdd
Import FluentWindow and TitleBar
singhashish-wpf Jan 11, 2024
0759d47
Adding win11 styles to PasswordBox (#8612)
anjali-wpf Jan 11, 2024
41dbf0f
fix(win11theming): Ally and Navigation Issues in DataGrid
harshit7962 Jan 11, 2024
0679211
Merge branch 'win11dark' into feature/win11theming/appdemo
dipeshmsft Jan 12, 2024
04ff61d
Fix(Win11Theming): Adding RepeatButton Styles
harshit7962 Jan 16, 2024
317de44
Add(Win11Theming): Bold, Italics, Underline, Floater and Paragraph St…
harshit7962 Jan 17, 2024
8a691d6
Add(Win11Theming): DocumentViewer, Hyperlink, List, ResizeGrip and Th…
harshit7962 Jan 18, 2024
8e89ddc
Add(Win11Theming): ContentControl, GridSplitter, GroupBox, GroupItem …
harshit7962 Jan 18, 2024
81dded1
Add(Win11Theming): Border, ButtonBase, Control, ItemsControl, TextBox…
harshit7962 Jan 18, 2024
e17d63d
Merge branch 'feature/win11theming/staging' of https://github.com/dot…
anjali-wpf Jan 18, 2024
9b514fa
Add(Win11Theming): NavigationWindow Styles
harshit7962 Jan 18, 2024
8308477
Fixing margins in TreeViewItem
dipeshmsft Jan 18, 2024
7dcd13c
Fix for Mica style dropping on theme change
dipeshmsft Jan 22, 2024
8f62799
Fix(Win11Theming): TextBlock Foreground and FontIcon Issue
harshit7962 Jan 29, 2024
b4447ea
Fixed Border linear gradient for TextBox and PasswordBox
anjali-wpf Jan 29, 2024
65dfd99
Fix(Win11Theming): MenuItems Dark Theme Visibility
harshit7962 Jan 29, 2024
86c1bd2
Fix(Win11Theming): TextBlock Foreground and FontIcon Issue
harshit7962 Jan 29, 2024
2db8ff5
Fix(Win11Theming): Menu Foreground Issue
harshit7962 Jan 29, 2024
9172107
Fix(win11theming): MenuBar hover highlighting
harshit7962 Jan 30, 2024
bb22bd5
Fix(win11theming): MenuItems hover highlighting
harshit7962 Jan 30, 2024
769e53d
Fix(Win11Theme): Add PasswordBox Styles to Resource Dictionary
harshit7962 Jan 30, 2024
bda8632
Merge branch 'pr-8652' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
60dd7c5
Merge branch 'pr-8654' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
684b3e2
Merge branch 'pr-8669' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
5612bb6
Merge branch 'pr-8691' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
7f68068
Merge branch 'pr-8697' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
dc89647
Merge branch 'pr-8699' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
3696434
Merge branch 'pr-8741' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
f9ab8e9
Merge branch 'pr-8743' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
e3634c3
Merge branch 'pr-8744' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
cd9a967
Merge branch 'pr-8745' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
83698b4
Merge branch 'pr-8748' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
fe721c9
Merge branch 'pr-8749' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
baa69d2
Merge branch 'pr-8750' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
b573992
Merge branch 'pr-8751' into feature/win11theming/staging-mirror
dipeshmsft Feb 7, 2024
bf94ba4
Update resources on theme change
singhashish-wpf Feb 19, 2024
2800fcf
Accent Updates in SystemResources.cs
harshit7962 Feb 19, 2024
4b94044
Refactoring accent colorization part
harshit7962 Feb 19, 2024
9de6b4a
Changing Accent Color and Theme
harshit7962 Feb 20, 2024
60efc2b
Remove use of WinDef classes
dipeshmsft Feb 21, 2024
2a62200
Fix (Win11Theming): MainWindow does not load with latest system theme…
harshit7962 Feb 21, 2024
7a9c499
Removed symbol icon and related classes usage
dipeshmsft Feb 21, 2024
4cb0b45
Removed PassiveScrollViewer
dipeshmsft Feb 21, 2024
3284e77
Removed Button.CornerRadius
dipeshmsft Feb 22, 2024
cb0c2d3
Fix (win11theming): Delayed theme change (Optimizing theme change time)
harshit7962 Feb 21, 2024
be439c0
Removed Button.Appearance and introduced Accent Button Style
dipeshmsft Feb 22, 2024
3191151
Made extra converters internal
dipeshmsft Feb 22, 2024
5e5722e
Removing Button.Icon property
dipeshmsft Feb 22, 2024
d9012da
Removing TextBox.Icon property
dipeshmsft Feb 22, 2024
f16317f
Merge branch 'feature/win11theming/api/remove-passivescrollviewer' in…
dipeshmsft Feb 23, 2024
ad9a30a
Merge branch 'feature/win11theming/api/internal-converters' into feat…
dipeshmsft Feb 23, 2024
b93e3e8
Merge branch 'feature/win11theming/api/controls/button' into feature/…
dipeshmsft Feb 23, 2024
f0b850d
Merge branch 'feature/win11theming/api/remove-textboxicon' into featu…
dipeshmsft Feb 23, 2024
4ccb7a2
Merge branch 'feature/win11theming/api/remove-symbolicon' into featur…
dipeshmsft Feb 23, 2024
e31e9c1
Enabling High Contrast Switching
harshit7962 Feb 23, 2024
4859511
Fix(win11theming): dark theme not working properly
harshit7962 Feb 23, 2024
2c7c234
Update(Win11Theming): Changing access type of non-essential methods t…
harshit7962 Feb 23, 2024
f2d20f9
Removed all chromes from Win11 styles
dipeshmsft Feb 23, 2024
d82b903
Removed SystemDropShadowChrome from Win11 style
dipeshmsft Feb 23, 2024
1321dd9
Remove extra properties from PasswordBox
dipeshmsft Feb 24, 2024
a5777fb
Removed extra public API changes in TextBox and RichTextBox
dipeshmsft Feb 24, 2024
21bb133
Made ClearButtonEnabled property internal in TextBox
dipeshmsft Feb 24, 2024
567e563
Regenerated ApiCompat Baseline
dipeshmsft Feb 24, 2024
527c2ea
Removed extra API compilation
dipeshmsft Feb 24, 2024
c7df285
Removed ContextMenu and Menu code-behind
dipeshmsft Feb 26, 2024
710aa8d
Made extra methods internal in TextBox
dipeshmsft Feb 26, 2024
d0c2a6b
Refactor(Win11Theming): Reusing currentTheme component and minor fixes
harshit7962 Feb 26, 2024
cf29fef
Fix(Win11Theming): Removing unused SystemThemeManager and SystemTheme…
harshit7962 Feb 26, 2024
d655a61
Removed IsTextSelectionEnabled from RichTextBox
dipeshmsft Feb 26, 2024
9628dd0
Making DataGridCheckboxColumn Style property internal
rchauhan18 Feb 26, 2024
8f70a76
Revert "Removed ContextMenu and Menu code-behind"
dipeshmsft Feb 26, 2024
acd65e6
Removed ContextMeny and Menu Style code behinds
dipeshmsft Feb 26, 2024
f34a0fd
Removed RelayCommands and WindowCornerPreference
dipeshmsft Feb 26, 2024
3fefe77
Code Cleanup and Removal of ControlsDictionary
harshit7962 Feb 27, 2024
304d4dc
Fix(Win11Theming): Adding Opt-in for New styles and controls
harshit7962 Feb 27, 2024
440e0d3
Removing unused ObservedWindow class
harshit7962 Feb 27, 2024
09acde5
Removed FluentWindow and made WindowBackdrop internal. Fixed RTB CM
dipeshmsft Feb 28, 2024
10a6ed3
Merge branch 'feature/win11theming/api/window-titlebar' into feature/…
dipeshmsft Feb 28, 2024
4d7cf30
Merge branch 'feature/win11theming/api/controls/DataGrid' into featur…
dipeshmsft Feb 28, 2024
018c329
Merge branch 'feature/win11theming/base-replica' into RemovingThemeMa…
harshit7962 Feb 28, 2024
d306464
Merge pull request #2 from harshit7962/RemovingThemeManager
harshit7962 Feb 28, 2024
1eed317
Fix(Win11Theming): Build Failure and High Contrast Switching
harshit7962 Feb 28, 2024
21f2cdf
Removing Files/Classes not being compiled
harshit7962 Feb 29, 2024
546df32
Remove TitleBar and FluentWindow
dipeshmsft Mar 1, 2024
f9c1ee9
Fix(Win11Theming): CheckBox Design Issues
harshit7962 Mar 1, 2024
982adfc
Merged PR 37761: Fix(Win11Theming): CheckBox Design Issues
harshit7962 Mar 1, 2024
37fccb6
Fixed gradient for border brush
anjali-wpf Mar 1, 2024
d210974
Revert "Fixed gradient for border brush"
anjali-wpf Mar 1, 2024
0d3e0ec
Fix(Win11Theming): Removal of unused RDM, changing requested method n…
harshit7962 Mar 3, 2024
2025754
Removed extra classes and replaced FontIcon with TextBlock
dipeshmsft Mar 4, 2024
42b28d6
Removed color extension and fixed CheckBox style
dipeshmsft Mar 4, 2024
6891dae
Fix(Win11Theming): Discarded need for using theme dictionary i app.xa…
harshit7962 Mar 4, 2024
6830674
Merged PR 37802: Fix non-essential need for themedictionary declarati…
harshit7962 Mar 4, 2024
d1a9e9f
Removed DisplayDpi and fixed icon animations
dipeshmsft Mar 4, 2024
f7c82b7
Merged PR 37801: Removed extra classes from CompleteWin11Changes
dipeshmsft Mar 4, 2024
9ace9bc
Remove unused styles and methods
dipeshmsft Mar 4, 2024
b53fea1
Fix(Win11Theming): Get Exact Accent color variations
harshit7962 Mar 4, 2024
7507be1
Removed references of deleted styles
dipeshmsft Mar 4, 2024
d32ba9b
Merged PR 37807: Get Exact values of Accent Color and it's variations.
harshit7962 Mar 4, 2024
60e31b1
Removed reference of the unused styles
dipeshmsft Mar 4, 2024
36f5a4d
Merged PR 37804: Removed extra styles
dipeshmsft Mar 4, 2024
c5ba357
Removed placeholder from the controls
dipeshmsft Mar 4, 2024
c658803
Removed unnecessary code
dipeshmsft Mar 4, 2024
60ba33b
Removed extra files and renamed AppInitNewTheme flag
dipeshmsft Mar 4, 2024
3fda1ca
Fix(Win11Theming): Updated Common xaml resources to support exact acc…
harshit7962 Mar 5, 2024
220cd8c
Removed some files and renamed some methods
dipeshmsft Mar 5, 2024
f1ef9e5
Fix(Win11Theming): Accent Button incorrect styles
harshit7962 Mar 5, 2024
55ae8e3
Merged PR 37829: Update xaml resources for accent colors parity
harshit7962 Mar 5, 2024
7d9cca7
Removed some extra code from styles
dipeshmsft Mar 5, 2024
bf57add
Fixed calendar header font weight
anjali-wpf Mar 5, 2024
7510c71
Revert "Fixed calendar header font weight"
anjali-wpf Mar 5, 2024
9ec3f03
Merged PR 37832: Removed extra code and styles. Refactorings
dipeshmsft Mar 5, 2024
5c94f99
Merge branch 'CompleteWin11Changes' of https://dev.azure.com/dnceng/i…
anjali-wpf Mar 5, 2024
15a1d01
Merge branch 'CompleteWin11Changes' of https://dev.azure.com/dnceng/i…
anjali-wpf Mar 5, 2024
761170f
Merge branch 'CompleteWin11Changes' of https://dev.azure.com/dnceng/i…
anjali-wpf Mar 5, 2024
1b8aa9d
Merged PR 37840: Merging Changes from different working branch
harshit7962 Mar 5, 2024
174eee7
Fix(Win11Theming): ListBox Design Issues
harshit7962 Mar 6, 2024
73be056
Fix(Win11Theming): Progress Bar's Color Issues
harshit7962 Mar 6, 2024
72d9958
Fix(Win11Theming): ProgressBar Design Issues
harshit7962 Mar 7, 2024
8b29b60
Fixed RadioButton disabled state colour
anjali-wpf Mar 7, 2024
dfe8dce
Fix(Win11Design): RadioButton and Checkbox Design Issues
harshit7962 Mar 8, 2024
b5a0c5e
Merge pull request #6 from harshit7962/RadioButtonFix
anjali-wpf Mar 8, 2024
7c4b263
Fix(Win11Theming): Checkbox Glyph Design Issues
harshit7962 Mar 8, 2024
cc1e0cd
Merge branch 'CompleteWin11Changes' of https://github.com/harshit7962…
anjali-wpf Mar 8, 2024
2397581
Merge pull request #7 from harshit7962/fixRbIssues
harshit7962 Mar 11, 2024
5ce9ad3
Candidate Fix for Button Design Issues
harshit7962 Mar 11, 2024
6152df8
Merge pull request #5 from harshit7962/fixDesignIssues
harshit7962 Mar 11, 2024
d411d53
Fix(Win11Theming): Removing Extra Border
harshit7962 Mar 11, 2024
5d0d015
Merge pull request #8 from harshit7962/fixRBIssues
harshit7962 Mar 12, 2024
5271cca
Fix(Win11Theming): Dark accent button background color
harshit7962 Mar 12, 2024
ab9ddc1
Fix(Win11Theming): Disbaled Button Design Issues
harshit7962 Mar 13, 2024
2fd060c
Extended application based theme switching
harshit7962 Mar 13, 2024
0a52f8f
Merge pull request #10 from harshit7962/fixThemeDetection
harshit7962 Mar 13, 2024
bdfee86
Merge pull request #9 from harshit7962/fixButtonDesign
harshit7962 Mar 13, 2024
f04eba8
Updating Theming Name
harshit7962 Mar 13, 2024
fa1f447
Merge branch 'CompleteWin11Changes' into nameChange
harshit7962 Mar 13, 2024
63f1bce
Merge pull request #11 from harshit7962/nameChange
harshit7962 Mar 13, 2024
059c156
Updating Theme name
harshit7962 Mar 13, 2024
f2d1261
Merge pull request #12 from harshit7962/nameChange
harshit7962 Mar 13, 2024
74f82c6
Fix: Dictionary paths
harshit7962 Mar 14, 2024
594a325
Remove hard-coded reference
harshit7962 Mar 14, 2024
f75e2f0
Removing unused Acrylic References
harshit7962 Mar 14, 2024
a09e5c5
Merge pull request #13 from harshit7962/removingUnusedReferences
harshit7962 Mar 14, 2024
fae66a2
Unsubscribing the Loaded handler for applying window backdrop and gla…
harshit7962 Mar 16, 2024
9664bf0
Update src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Wind…
harshit7962 Mar 17, 2024
e3a9783
Fixing ProgressBar's incorrect brush assignment
harshit7962 Mar 18, 2024
5cf9a11
Adding a fallback if appsuselightthemekey is not present
harshit7962 Mar 18, 2024
6f1f45c
Replacing the highcontrast detection
harshit7962 Mar 18, 2024
cd28c95
Merge pull request #17 from harshit7962/resolvingPRComments
harshit7962 Mar 18, 2024
efeb796
Addressing PR Review Comments :
dipeshmsft Mar 19, 2024
6251c72
Merge pull request #18 from harshit7962/win11theming/dipesh-pr-commen…
dipeshmsft Mar 19, 2024
abc5caf
Change : Removed Dwmapi.cs and merged it with NativeMethods
dipeshmsft Mar 19, 2024
c2e0851
Merge pull request #18 from harshit7962/win11theming/dipesh-pr-commen…
dipeshmsft Mar 19, 2024
dbd9da1
Removing fallback accent color variation calculation logic and assign…
harshit7962 Mar 20, 2024
600fe25
Merge pull request #20 from harshit7962/removeFallbackColor
harshit7962 Mar 20, 2024
b70db29
Merge pull request #19 from harshit7962/win11theming/dipesh-pr-commen…
dipeshmsft Mar 20, 2024
9bef002
Refactoring WindowBackdrop and removing undocumented APIs (#21)
dipeshmsft Mar 22, 2024
6503a5c
Merge branch 'CompleteWin11Changes' into UnsubscribingLoadedEvent
harshit7962 Mar 26, 2024
6f209f9
Merge pull request #16 from harshit7962/UnsubscribingLoadedEvent
harshit7962 Mar 26, 2024
e17f516
Removing unused dwColorSetIndex and updating default value of dwmValue
harshit7962 Mar 27, 2024
aa1c92a
Changing GetColorFromPreference arguments
harshit7962 Mar 27, 2024
640a235
Changing the system accent color to get value from IMCLR_SystemAccent
harshit7962 Mar 28, 2024
712b6e4
Fixing Typo
harshit7962 Mar 28, 2024
3e41329
Addressing Review Comments - Part 4 (#23)
dipeshmsft Mar 28, 2024
64db379
Merge branch 'CompleteWin11Changes' into fixingPRComments
harshit7962 Mar 28, 2024
8fe505a
Merge pull request #24 from harshit7962/fixingPRComments
harshit7962 Mar 28, 2024
d766f8b
Fix Border Highlight color on focus
harshit7962 Apr 4, 2024
f121d0a
Fix Progress Bar Tracker Height and Color Issues
harshit7962 Apr 8, 2024
ec0867d
Update Accent color for some controls in Dark mode
rchauhan18 Apr 8, 2024
f1832f6
Fix MenuFlyout Issues
harshit7962 Apr 8, 2024
89d9f14
Merge pull request #28 from harshit7962/fixDesignIssues1
harshit7962 Apr 8, 2024
8b3030b
Merge branch 'CompleteWin11Changes' into FixDesignAccentColor
harshit7962 Apr 8, 2024
569454d
Merge pull request #27 from harshit7962/FixDesignAccentColor
harshit7962 Apr 8, 2024
053209b
Slider accent color and ticks fix
dipeshmsft Apr 9, 2024
085f316
Fixes review comments - Refactoring (#25)
dipeshmsft Apr 13, 2024
ca5d6d8
Renamed style names (#40)
harshit7962 Apr 15, 2024
50c1cef
ListBox and Slider Design Fix (#41)
harshit7962 Apr 16, 2024
1dbffb6
Updating OS version check (#42)
rchauhan18 Apr 16, 2024
93a09dd
Removed extra MenuItem styles (#43)
dipeshmsft Apr 16, 2024
78a9f06
Made Font Names Dynamic (#45)
dipeshmsft Apr 17, 2024
f1a6fb1
Removed TextBlock Style (#44)
dipeshmsft Apr 17, 2024
3ae58a1
Modified control elevation brush and button style (#46)
dipeshmsft Apr 17, 2024
e8459cd
Fix control elevation brush (#47)
dipeshmsft Apr 18, 2024
b7a943a
Renaming the theme to Fluent (#38)
harshit7962 Apr 19, 2024
fed3410
Merge branch 'main' into CompleteWin11Changes
dipeshmsft Apr 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions Documentation/projects-and-assemblies.md
Expand Up @@ -118,9 +118,11 @@ The following assemblies are being produced today:
| PresentationFramework.dll
| PresentationFramework.Luna.dll
| PresentationFramework.Luna.pdb
| PresentationFramework.pdb
| PresentationFramework.pdb
| PresentationFramework.Royale.dll
| PresentationFramework.Royale.pdb
| PresentationFramework.Fluent.dll
| PresentationFramework.Fluent.pdb
| PresentationUI.dll
| PresentationUI.pdb
| ReachFramework.dll
Expand Down Expand Up @@ -452,7 +454,8 @@ src\Themes\PresentationFramework.Luna\PresentationFramework.Luna.csproj
src\Themes\PresentationFramework.Luna\ref\PresentationFramework.Luna-ref.csproj
src\Themes\PresentationFramework.Royale\PresentationFramework.Royale.csproj
src\Themes\PresentationFramework.Royale\ref\PresentationFramework.Royale-ref.csproj

src\Themes\PresentationFramework.Fluent\PresentationFramework.Fluent.csproj
src\Themes\PresentationFramework.Fluent\ref\PresentationFramework.Fluent-ref.csproj
src\UIAutomation\UIAutomationClient\UIAutomationClient.csproj
src\UIAutomation\UIAutomationClient\ref\UIAutomationClient-ref.csproj
src\UIAutomation\UIAutomationClientSideProviders\UIAutomationClientSideProviders.csproj
Expand Down
38 changes: 38 additions & 0 deletions Microsoft.Dotnet.Wpf.sln
Expand Up @@ -249,6 +249,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Xaml.Tests", "src\Microsoft.DotNet.Wpf\tests\UnitTests\System.Xaml.Tests\System.Xaml.Tests.csproj", "{B2F2A89C-55C9-41B1-A645-0948609BD8BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationFramework.Fluent", "src\Microsoft.DotNet.Wpf\src\Themes\PresentationFramework.Fluent\PresentationFramework.Fluent.csproj", "{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationFramework.Fluent-ref", "src\Microsoft.DotNet.Wpf\src\Themes\PresentationFramework.Fluent\ref\PresentationFramework.Fluent-ref.csproj", "{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1942,6 +1946,38 @@ Global
{B2F2A89C-55C9-41B1-A645-0948609BD8BE}.Release|x86.ActiveCfg = Release|Win32
{B2F2A89C-55C9-41B1-A645-0948609BD8BE}.Release|x86.Build.0 = Release|Win32
{B2F2A89C-55C9-41B1-A645-0948609BD8BE}.Release|x86.Deploy.0 = Release|Win32
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|ARM64.ActiveCfg = Debug|arm64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|ARM64.Build.0 = Debug|arm64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|x64.ActiveCfg = Debug|x64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|x64.Build.0 = Debug|x64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|x86.ActiveCfg = Debug|Any CPU
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Debug|x86.Build.0 = Debug|Any CPU
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|Any CPU.Build.0 = Release|Any CPU
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|ARM64.ActiveCfg = Release|arm64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|ARM64.Build.0 = Release|arm64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|x64.ActiveCfg = Release|x64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|x64.Build.0 = Release|x64
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|x86.ActiveCfg = Release|Any CPU
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9}.Release|x86.Build.0 = Release|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|ARM64.ActiveCfg = Debug|arm64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|ARM64.Build.0 = Debug|arm64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|x64.ActiveCfg = Debug|x64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|x64.Build.0 = Debug|x64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|x86.ActiveCfg = Debug|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Debug|x86.Build.0 = Debug|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|Any CPU.Build.0 = Release|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|ARM64.ActiveCfg = Release|arm64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|ARM64.Build.0 = Release|arm64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|x64.ActiveCfg = Release|x64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|x64.Build.0 = Release|x64
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|x86.ActiveCfg = Release|Any CPU
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -2062,6 +2098,8 @@ Global
{34B64A4A-7C83-4F92-8C47-80E9FA10D660} = {C9ECC1A1-917F-43D3-B340-2035B4938507}
{A48B585E-6AB0-4F8D-8484-77F37CB44437} = {34B64A4A-7C83-4F92-8C47-80E9FA10D660}
{B2F2A89C-55C9-41B1-A645-0948609BD8BE} = {A48B585E-6AB0-4F8D-8484-77F37CB44437}
{3F2C0E0E-BB13-46D9-8D9A-08256A49ECA9} = {5ACFB055-649D-4A01-98C2-B0BFE7E543D6}
{3C43C553-2C1F-4EB9-8BF8-371D4A42E0FD} = {60F4058B-D35B-42D2-B276-D44B3AC579BD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B4340004-DAC0-497D-B69D-CFA7CD93F567}
Expand Down
1 change: 1 addition & 0 deletions eng/WpfArcadeSdk/tools/GenApi.props
Expand Up @@ -10,6 +10,7 @@
PresentationFramework.Classic;
PresentationFramework.Luna;
PresentationFramework.Royale;
PresentationFramework.Fluent;
ReachFramework;
System.Windows.Controls.Ribbon;
System.Windows.Input.Manipulations;
Expand Down
4 changes: 4 additions & 0 deletions eng/WpfArcadeSdk/tools/ShippingProjects.props
Expand Up @@ -28,6 +28,7 @@
PresentationFramework.Classic;
PresentationFramework.Luna;
PresentationFramework.Royale;
PresentationFramework.Fluent;
WindowsFormsIntegration;
PenImc;
wpfgfx;
Expand Down Expand Up @@ -98,6 +99,7 @@
PresentationFramework.Classic-ref;
PresentationFramework.Luna-ref;
PresentationFramework.Royale-ref;
PresentationFramework.Fluent-ref;
PresentationUI-ref;
System.Printing-ref;
System.Windows.Controls.Ribbon-ref;
Expand Down Expand Up @@ -136,6 +138,8 @@
PresentationFramework.Luna-ref;
PresentationFramework.Royale;
PresentationFramework.Royale-ref;
PresentationFramework.Fluent;
PresentationFramework.Fluent-ref;
PresentationUI;
ReachFramework;
ReachFramework-ref;
Expand Down
2 changes: 1 addition & 1 deletion eng/WpfArcadeSdk/tools/WpfProjectReference.targets
Expand Up @@ -47,7 +47,7 @@
<WpfProjectPath Include="PresentationFramework.Classic" ProjectPath="$(WpfSourceDir)Themes\PresentationFramework.Classic\PresentationFramework.Classic.csproj" />
<WpfProjectPath Include="PresentationFramework.Luna" ProjectPath="$(WpfSourceDir)Themes\PresentationFramework.Luna\PresentationFramework.Luna.csproj" />
<WpfProjectPath Include="PresentationFramework.Royale" ProjectPath="$(WpfSourceDir)Themes\PresentationFramework.Royale\PresentationFramework.Royale.csproj" />

<WpfProjectPath Include="PresentationFramework.Fluent" ProjectPath="$(WpfSourceDir)Themes\PresentationFramework.Fluent\PresentationFramework.Fluent.csproj" />
<WpfProjectPath Include="UIAutomationTypes" ProjectPath="$(WpfSourceDir)UIAutomation\UIAutomationTypes\UIAutomationTypes.csproj" />
<WpfProjectPath Include="UIAutomationProvider" ProjectPath="$(WpfSourceDir)UIAutomation\UIAutomationProvider\UIAutomationProvider.csproj" />
<WpfProjectPath Include="UIAutomationClient" ProjectPath="$(WpfSourceDir)UIAutomation\UIAutomationClient\UIAutomationClient.csproj" />
Expand Down
Expand Up @@ -31,6 +31,9 @@ internal static class NativeMethods
[DllImport(DllImport.ApiSetWinRT, CallingConvention = CallingConvention.StdCall)]
internal static extern unsafe int RoGetActivationFactory(IntPtr runtimeClassId, ref Guid iid, [MarshalAs(UnmanagedType.Interface)] out object factory);

[DllImport(DllImport.ApiSetWinRT, CallingConvention = CallingConvention.StdCall)]
internal static extern unsafe int RoActivateInstance(IntPtr runtimeClassId, [MarshalAs(UnmanagedType.Interface)] out object instance);

internal const int E_NOINTERFACE = unchecked((int)0x80004002);

internal const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154);
Expand Down
@@ -0,0 +1,187 @@
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using MS.Internal.PresentationCore.WindowsRuntime;

namespace MS.Internal.WindowsRuntime
{
namespace Windows.UI.ViewManagement
{
internal class UISettings : IDisposable
{
private readonly bool _isSupported;

private UISettingsRCW.IUISettings3 _uisettings;

private static readonly Color _fallbackAccentColor = Color.FromArgb(0xff, 0x00, 0x78, 0xd4);

private Color _accentColor, _accentLight1, _accentLight2, _accentLight3;
private Color _accentDark1, _accentDark2, _accentDark3;

private bool _useFallbackColor = false;

internal UISettings()
{
_isSupported = false;

try
{
_uisettings = GetWinRTInstance() as UISettingsRCW.IUISettings3;
}
catch (COMException)
{
// We don't want to throw any exceptions here.
// If we can't get the instance, we will use the default accent color.
}

if (_uisettings != null)
{
_isSupported = true;
TryUpdateAccentColors();
}
}

/// <summary>
/// Gets the accent color value for the desired color type.
/// </summary>
/// <returns>
/// Returns true if fetching value from UISettings was successful.
/// If the fetch fails, we return false and return the default accent color.
/// </returns>
internal bool TryGetColorValue(UISettingsRCW.UIColorType desiredColor, out Color color)
{
if(_isSupported)
{
try
{
var uiColor = _uisettings.GetColorValue(desiredColor);
color = Color.FromArgb(uiColor.A, uiColor.R, uiColor.G, uiColor.B);
return true;
}
catch (COMException)
{
// We don't want to throw any exceptions here.
// If we can't get the instance, we will use the default accent color.
}
}
color = _fallbackAccentColor;
return false;
}

/// <summary>
/// Tries to update the accent colors properties.
/// If any call to TryGetColorValue fails, we set _useFallbackColor to true.
/// After which all the accent values will be the default color.
/// This is to ensure that we don't have inconsistent set of accent color values stored.
/// </summary>
internal void TryUpdateAccentColors()
{
_useFallbackColor = true;

if(_isSupported)
{
try
{
if(TryGetColorValue(UISettingsRCW.UIColorType.Accent, out Color systemAccent))
{
// For verifying if any of the calls to TryGetColorValue fails.
bool result = true;
if(_accentColor != systemAccent)
{
result &= TryGetColorValue(UISettingsRCW.UIColorType.AccentLight1, out _accentLight1);
result &= TryGetColorValue(UISettingsRCW.UIColorType.AccentLight2, out _accentLight2);
result &= TryGetColorValue(UISettingsRCW.UIColorType.AccentLight3, out _accentLight3);
result &= TryGetColorValue(UISettingsRCW.UIColorType.AccentDark1, out _accentDark1);
result &= TryGetColorValue(UISettingsRCW.UIColorType.AccentDark2, out _accentDark2);
result &= TryGetColorValue(UISettingsRCW.UIColorType.AccentDark3, out _accentDark3);
_accentColor = systemAccent;
}
// If result is false, hence atleast one call, use fallback values.
_useFallbackColor = !result;
}
}
catch
{
// We don't want to throw any exceptions here.
// If we can't get any one of the color values, we will use the default accent color.
}
}
}

/// <summary>
/// Gets the WinRT instance of UISettings.
/// </summary>
private static object GetWinRTInstance()
{
object winRtInstance = null;
try
{
winRtInstance = UISettingsRCW.GetUISettingsInstance();
}
catch (Exception e) when (e is TypeLoadException || e is FileNotFoundException)
{
winRtInstance = null;
}

return winRtInstance;
}

#region Color Properties

internal Color AccentColor => _useFallbackColor ? _fallbackAccentColor : _accentColor;
internal Color AccentLight1 => _useFallbackColor ? _fallbackAccentColor : _accentLight1;
internal Color AccentLight2 => _useFallbackColor ? _fallbackAccentColor : _accentLight2;
internal Color AccentLight3 => _useFallbackColor ? _fallbackAccentColor : _accentLight3;
internal Color AccentDark1 => _useFallbackColor ? _fallbackAccentColor : _accentDark1;
internal Color AccentDark2 => _useFallbackColor ? _fallbackAccentColor : _accentDark2;
internal Color AccentDark3 => _useFallbackColor ? _fallbackAccentColor : _accentDark3;

#endregion

#region IDisposable

bool _disposed = false;

~UISettings()
{
Dispose(false);
}

public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

private void Dispose(bool disposing)
{
if (!_disposed)
{
if (_uisettings != null)
{
try
{
// Release the _uiSettings instance here
Marshal.ReleaseComObject(_uisettings);
}
catch
{
// Don't want to raise any exceptions in a finalizer, eat them here
}

_uisettings = null;
}

_disposed = true;
}
}

#endregion
}
}
}
@@ -0,0 +1,73 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Windows.Media;

namespace MS.Internal.WindowsRuntime
{
namespace Windows.UI.ViewManagement
{
/// <summary>
/// Contains internal RCWs for invoking the UISettings
/// </summary>
internal static class UISettingsRCW
{

public static object GetUISettingsInstance()
{
const string typeName = "Windows.UI.ViewManagement.UISettings";
IntPtr hstring = IntPtr.Zero;
int hr = NativeMethods.WindowsCreateString(typeName, typeName.Length, out hstring);
Marshal.ThrowExceptionForHR(hr);
try
{
hr = NativeMethods.RoActivateInstance(hstring, out object instance);
Marshal.ThrowExceptionForHR(hr);
return instance;
}
finally
{
hr = NativeMethods.WindowsDeleteString(hstring);
Marshal.ThrowExceptionForHR(hr);
}
}

[Guid("03021BE4-5254-4781-8194-5168F7D06D7B"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
internal interface IUISettings3
{
void GetIids(out uint iidCount, out IntPtr iids);

void GetRuntimeClassName(out string className);

void GetTrustLevel(out TrustLevel TrustLevel);

UIColor GetColorValue(UIColorType desiredColor);
}

internal enum TrustLevel
{
BaseTrust,
PartialTrust,
FullTrust
}

public enum UIColorType
{
Background = 0,
Foreground = 1,
AccentDark3 = 2,
AccentDark2 = 3,
AccentDark1 = 4,
Accent = 5,
AccentLight1 = 6,
AccentLight2 = 7,
AccentLight3 = 8,
Complement = 9
}

internal readonly record struct UIColor(byte A, byte R, byte G, byte B);
}
}
}