Fix: Interactive element is no longer interactive after adding it a second time#1550
Merged
karkarl merged 4 commits intomicrosoft:mainfrom Jun 11, 2024
Merged
Conversation
Collaborator
|
/azp run |
karkarl
approved these changes
Jun 11, 2024
karkarl
pushed a commit
that referenced
this pull request
Jul 15, 2024
…econd time (#1550) <!--- Provide a general summary of your changes in the Title above --> ## Description - `AppTitleBarTextBox` 's `Width` is not set, so `Width +=1 ` does nothing - The `SizeChanged` event handler is called **once**, because of `Visibility` changed, and it was put in a `StackPanel` that's vertically constrained, so the size change will occur once, not because `Width += 1`. Consecutive adding it to the title bar no longer triggers the event handler, therefore the issue - And `Width += 1` is a dirty hack anyway, does not need that. ## Motivation and Context Close #1470 ## How Has This Been Tested? Manual. ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] 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)
karkarl
pushed a commit
that referenced
this pull request
Jul 15, 2024
…econd time (#1550) <!--- Provide a general summary of your changes in the Title above --> ## Description - `AppTitleBarTextBox` 's `Width` is not set, so `Width +=1 ` does nothing - The `SizeChanged` event handler is called **once**, because of `Visibility` changed, and it was put in a `StackPanel` that's vertically constrained, so the size change will occur once, not because `Width += 1`. Consecutive adding it to the title bar no longer triggers the event handler, therefore the issue - And `Width += 1` is a dirty hack anyway, does not need that. ## Motivation and Context Close #1470 ## How Has This Been Tested? Manual. ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] 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)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
AppTitleBarTextBox'sWidthis not set, soWidth +=1does nothingSizeChangedevent handler is called once, because ofVisibilitychanged, and it was put in aStackPanelthat's vertically constrained, so the size change will occur once, not becauseWidth += 1. Consecutive adding it to the title bar no longer triggers the event handler, therefore the issueWidth += 1is a dirty hack anyway, does not need that.Motivation and Context
Close #1470
How Has This Been Tested?
Manual.
Screenshots (if appropriate):
Types of changes