-
Notifications
You must be signed in to change notification settings - Fork 663
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
Add Custom & User Controls
Sample
#1786
base: main
Are you sure you want to change the base?
Conversation
WinUIGallery/Samples/ControlPages/Fundamentals/Controls/CounterControl.cs
Show resolved
Hide resolved
xmlns:local="using:WinUIGallery.Samples.ControlPages.Fundamentals.Controls"> | ||
|
||
<!-- Style definition for CounterControl --> | ||
<Style TargetType="local:CounterControl"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe as a best practice, we could name this style and create a seperate style that does the overriding. That way a developer could use BasedOn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this might be the best practice, but would it be simple for someone who just wants to learn the fundamentals?
I think the code is good as it is, especially since this is the approach used when creating a new custom control.
However, if you believe this should be included in the example, I'd be happy to implement it 😊
WinUIGallery/Samples/ControlPages/Fundamentals/Controls/ValidatedPasswordBox.cs
Show resolved
Hide resolved
Maybe it's me, but I don't see a reason to create a new folder for the xaml files. |
Have you thought of using the existing folder Fundamentals? |
|
I decided to place the new controls in the fundamentals folder as suggested in this comment #1762 (comment) |
Description
Added a new
Custom & User Controls
page with examples of both Custom Controls and UserControls to demonstrate reusable UI components. Main changes:ControlInfoData.json
.Custom & User Controls Page
.Motivation and Context
This change provides a structured way to showcase both Custom Controls and UserControls helping developers understand their differences, implementation, and use cases.
Closes #1762
How Has This Been Tested?
Manually Tested
Screenshots (if appropriate):
Types of changes