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

Improved SystemBackdrop sample #1698

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

MGGSK
Copy link
Contributor

@MGGSK MGGSK commented Dec 12, 2024

Made the sample easier to use.

Description

  1. Changed the sample description
  2. Added inheritance to the sample page
  3. Added a title bar to the sample window
  4. The sample window now has a icon
  5. The theme of the sample window can now be changed.
  6. The sample windows now have a list of backdrops that can be applied. If the user clicks opens the "MicaController" sample and clicks "Change Backdrop" the window won't apply Acrylic.
  7. Fixed the xaml sample code having c# comments.

Motivation and Context

The old sample has no info about how the materials look like.

How Has This Been Tested?

Manual

Screenshots:

image
image
image
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@MGGSK MGGSK marked this pull request as ready for review December 23, 2024 20:32
WinUIGallery/DataModel/ControlInfoData.json Outdated Show resolved Hide resolved
WinUIGallery/DataModel/ControlInfoData.json Outdated Show resolved Hide resolved
WinUIGallery/DataModel/ControlInfoData.json Outdated Show resolved Hide resolved
WinUIGallery/ControlPages/SystemBackdropsPage.xaml Outdated Show resolved Hide resolved
@niels9001
Copy link
Contributor

Would it make sense to change this Button into a ComboBox?

image

We can also do this in a seperate PR!

@niels9001
Copy link
Contributor

See a bunch of UX nits in my comments.

The textblock is redundant if we use a ComboBox right? We can set the selected backdrop there, and increase the spacing between the 2 comboboxes a bit:

image

@MGGSK
Copy link
Contributor Author

MGGSK commented Jan 13, 2025

See a bunch of UX nits in my comments.

The textblock is redundant if we use a ComboBox right? We can set the selected backdrop there, and increase the spacing between the 2 comboboxes a bit:

image

I changed the spacing from 12 to 20 px.

WinUIGallery/ControlPages/SystemBackdropsPage.xaml Outdated Show resolved Hide resolved
</StackPanel>
</local:ControlExample>

<local:ControlExample HeaderText="DesktopAcrylicController:"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<local:ControlExample HeaderText="DesktopAcrylicController:"
<local:ControlExample HeaderText="DesktopAcrylicController"

WinUIGallery/ControlPages/SystemBackdropsPage.xaml Outdated Show resolved Hide resolved
WinUIGallery/ControlPages/SystemBackdropsPage.xaml Outdated Show resolved Hide resolved
@niels9001
Copy link
Contributor

/azp run

1 similar comment
@marcelwgn
Copy link
Contributor

/azp run

</local:ControlExample>

<local:ControlExample HeaderText="DesktopAcrylicController"
CSharpSource="SystemBackdrops\SystemBackdropsSample3.txt">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample code presenter does not display anything for this sample.

Comment on lines 248 to 251
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSample1_cs.txt" />
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSample1_xaml.txt" />
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSample2.txt" />
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSample3.txt" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are at it, should we give the files more descriptive names?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix should also fix the DesktopAcrylicController sample code not being shown.

<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSampleBackdropTypes_cs.txt" />
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSampleBackdropTypes_xaml.txt" />
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSampleMicaController.txt" />
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsSampleDesktopAcrylicController.txt" />
<Content Include="ControlPagesSampleCode\SystemBackdrops\SystemBackdropsEnsureSystemDQC.txt" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants