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

Fix: Interactive element is no longer interactive after adding it a second time #1550

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

HO-COOH
Copy link
Contributor

@HO-COOH HO-COOH commented May 23, 2024

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.

Screenshots (if appropriate):

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)

@karkarl
Copy link
Collaborator

karkarl commented Jun 5, 2024

/azp run

@karkarl karkarl merged commit 2a346cb into microsoft:main Jun 11, 2024
2 checks passed
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)
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.

Interactive controls become non-interactive after adding it back
2 participants