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

Avoid CommandBarFlyoutCommandBar clipping after dynamic command bar element change #5347

Merged
merged 9 commits into from
Jul 7, 2021

Conversation

RBrid
Copy link
Contributor

@RBrid RBrid commented Jul 2, 2021

CommandBarFlyoutCommandBar did not support dynamic changes of its secondary AppBarButton/AppBarToggleButton elements.
For instance when lengthening the Label of an element after the command bar was opened, it could get clipped on the right side. The CommandBarFlyoutCommandBar did not update its UI in response to an element dependency property change.

CommandBarFlyout is now listening to AppBarButton/AppBarToggleButton dependency property changes that may affect the desired sizing of the CommandBarFlyoutCommandBar. The change notifications are forwarded to the CommandBarFlyoutCommandBar which triggers a UI refresh only when it's already open. The template settings are refreshed and the Collapsed visual state is synchronously / momentarily visited to refresh all visual aspects.

I commented out all the debug tracing that use string literals to avoid bloating the binaries.

Updated MUXControlsTestApp to allow asynchronous Label changes and asynchronous secondary commands clearing.
Tested with MUXControlsTestApp and Windows 11.
Added new interactive regression test.

@RBrid RBrid added the area-Commanding AppBar, UICommand, MVVM, etc label Jul 2, 2021
@RBrid RBrid self-assigned this Jul 2, 2021
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jul 2, 2021
@RBrid
Copy link
Contributor Author

RBrid commented Jul 2, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj ranjeshj added team-Controls Issue for the Controls team area-Commanding AppBar, UICommand, MVVM, etc and removed area-Commanding AppBar, UICommand, MVVM, etc needs-triage Issue needs to be triaged by the area owners labels Jul 2, 2021
@RBrid
Copy link
Contributor Author

RBrid commented Jul 3, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@RBrid RBrid requested a review from llongley July 3, 2021 02:43
@zhuxb711
Copy link
Contributor

zhuxb711 commented Jul 3, 2021

Are this related to this issue? #4878

@StephenLPeters
Copy link
Contributor

@RBrid the KeyboardAcceleratorTextOverrideProperty DP was added to AppBarButton in RS4 which explains the down level test failures.

@RBrid
Copy link
Contributor Author

RBrid commented Jul 6, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@RBrid
Copy link
Contributor Author

RBrid commented Jul 7, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@RBrid RBrid merged commit 4b1944e into main Jul 7, 2021
@RBrid RBrid deleted the user/regisb/CommandBarFlyoutCommandBarFix2 branch July 7, 2021 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Commanding AppBar, UICommand, MVVM, etc team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants