-
Notifications
You must be signed in to change notification settings - Fork 720
Improved SystemBackdrop sample #1698
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
15113cc
Improved the Backdrop sample
MGGSK c417901
More improvements
MGGSK ac37243
Add backdrop controller descriptions
MGGSK f836a5a
custom title bar setting and more descriptions
MGGSK c146130
Finish sample
MGGSK 0d8a245
Fixes
MGGSK 6dfad45
Fix unintentional changes in WindowHelper.cs
MGGSK 464e691
Title bar fixes
MGGSK f277bd8
Fixes
MGGSK 0e4c9ff
Fixes
MGGSK 490a3b4
UI Fixes
MGGSK 8dd4742
Rename sample code files
MGGSK 824e151
Update WinUIGallery/ControlPages/SystemBackdropsPage.xaml
MGGSK e6ed9e1
Update WinUIGallery/ControlPages/SystemBackdropsPage.xaml
MGGSK e360ddf
Update WinUIGallery/ControlPages/SystemBackdropsPage.xaml
MGGSK e918a64
Fix backdrop type sample text
MGGSK 1760e46
Fix
MGGSK de1ce06
Fix
MGGSK e998fbb
Fixes
MGGSK 32a1a2d
Fix
MGGSK 4f017a1
Fix conflicts
MGGSK f6473ce
Cleanup
MGGSK 0e754c7
Merge main
marcelwgn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 0 additions & 73 deletions
73
WinUIGallery/ControlPagesSampleCode/SystemBackdrops/SystemBackdropsSample1.txt
This file was deleted.
Oops, something went wrong.
73 changes: 0 additions & 73 deletions
73
WinUIGallery/ControlPagesSampleCode/SystemBackdrops/SystemBackdropsSample2.txt
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
WinUIGallery/ControlPagesSampleCode/SystemBackdrops/SystemBackdropsSample3.txt
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
WinUIGallery/ControlPagesSampleCode/SystemBackdrops/SystemBackdropsSample4.txt
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...IGallery/ControlPagesSampleCode/SystemBackdrops/SystemBackdropsSampleBackdropTypes_cs.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| bool TrySetMicaBackdrop(bool useMicaAlt) | ||
| { | ||
| if (SystemBackdrops.MicaController.IsSupported()) | ||
| { | ||
| MicaBackdrop micaBackdrop = new MicaBackdrop(); | ||
| micaBackdrop.Kind = useMicaAlt ? MicaKind.BaseAlt : MicaKind.Base; | ||
| SystemBackdrop = micaBackdrop; | ||
|
|
||
| return true; // Succeeded. | ||
| } | ||
|
|
||
| return false; // Mica is not supported on this system. | ||
| } | ||
|
|
||
| bool TrySetDesktopAcrylicBackdrop() | ||
| { | ||
| if (DesktopAcrylicController.IsSupported()) | ||
| { | ||
| DesktopAcrylicBackdrop DesktopAcrylicBackdrop = new DesktopAcrylicBackdrop(); | ||
| SystemBackdrop = DesktopAcrylicBackdrop; | ||
|
|
||
| return true; // Succeeded. | ||
| } | ||
|
|
||
| return false; // DesktopAcrylic is not supported on this system. | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.