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

feat: Update NumberBox example to reflect spin button placement in displayed XAML code #1612

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

Zakariathr22
Copy link
Contributor

@Zakariathr22 Zakariathr22 commented Aug 21, 2024

Description

This update ensures that the example code reflects user selections between Inline and Compact spin button placements, improving the accuracy and relevance of the displayed example, main changes are:

  • Updated XAML to dynamically reflect spin button placement changes in the displayed code.
    • Replaced static XAML with dynamic code binding that updates based on user selection.
  • Modified RadioButtons control to use SelectionChanged event handler for updating the SpinButtonPlacementMode of the NumberBox.
  • Added XAML substitution to ensure the displayed source code shows the correct SpinButtonPlacementMode.
  • Removed obsolete XAML source file NumberBoxSample2_xaml.txt.

Motivation and Context

The previous implementation did not dynamically update the example source code based on user interactions with the spin button placement options. This change improves user experience by providing accurate and up-to-date example code that matches the current UI configuration, helping users better understand how different settings affect the NumberBox control.

How Has This Been Tested?

Manual Testing: The changes were tested by interacting with the RadioButtons control to switch between Inline and Compact spin button placements. The displayed example code was verified to accurately update according to the selected option.

Screenshots:

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)

…splayed XAML

- **Removed** obsolete XAML source file `NumberBoxSample2_xaml.txt`.
- **Updated** XAML to dynamically reflect spin button placement changes in the displayed code.
  - Replaced static XAML with dynamic code binding that updates based on user selection.
- **Modified** `RadioButtons` control to use `SelectionChanged` event handler for updating displayed code.
- **Added** XAML substitution to ensure the displayed source code shows the correct `SpinButtonPlacementMode`.

This update ensures that the example code reflects user selections between `Inline` and `Compact` spin button placements, improving the accuracy and relevance of the displayed example.
@Zakariathr22
Copy link
Contributor Author

Zakariathr22 commented Aug 21, 2024 via email

@Zakariathr22 Zakariathr22 marked this pull request as draft August 21, 2024 09:15
@Zakariathr22 Zakariathr22 marked this pull request as ready for review August 21, 2024 09:16
@karkarl
Copy link
Collaborator

karkarl commented Sep 27, 2024

/azp run

@karkarl
Copy link
Collaborator

karkarl commented Nov 13, 2024

/azp run

@karkarl karkarl merged commit 7120513 into microsoft:main Nov 13, 2024
2 checks passed
@Zakariathr22 Zakariathr22 deleted the Zakariathr22 branch December 2, 2024 07:20
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.

2 participants