Skip to content

Commit 68f1a56

Browse files
committed
[Fix] Update CommandBarFlyou Style
updated command bar flyout and appbar button style to be more like the winui counterparts minor test minor test
1 parent 1cb363b commit 68f1a56

File tree

6 files changed

+390
-166
lines changed

6 files changed

+390
-166
lines changed

source/iNKORE.UI.WPF.Modern.Controls/Controls/Windows/CommandBar/AppBarButton.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ private void UpdateVisualState(bool useTransitions = true)
389389
UpdateCommonState(useTransitions);
390390
UpdateKeyboardAcceleratorTextVisibility(useTransitions);
391391
UpdateFlyoutState(useTransitions);
392+
UpdatePrimaryLabelState(useTransitions);
392393
}
393394

394395
private void UpdateCommonState(bool useTransitions = true)
@@ -444,6 +445,12 @@ private void UpdateFlyoutState(bool useTransitions = true)
444445
VisualStateManager.GoToState(this, hasFlyout ? "HasFlyout" : "NoFlyout", useTransitions);
445446
}
446447

448+
private void UpdatePrimaryLabelState(bool useTransitions = true)
449+
{
450+
bool hasPrimaryLabel = !IsInOverflow && Label is not null;
451+
VisualStateManager.GoToState(this, hasPrimaryLabel ? "HasPrimaryLabels" : "NoPrimaryLabels", useTransitions);
452+
}
453+
447454
private AppBarElementVisualStateManager _vsm;
448455
}
449456

source/iNKORE.UI.WPF.Modern.Controls/Controls/Windows/CommandBarFlyout/CommandBarFlyout.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using System;
45
using System.Collections.Generic;
56
using System.Collections.ObjectModel;
67
using System.Collections.Specialized;
@@ -141,7 +142,7 @@ public CommandBarFlyout()
141142

142143
Opening += delegate
143144
{
144-
InternalPopup.SuppressFadeAnimation = true;
145+
//InternalPopup.SuppressFadeAnimation = true;
145146

146147
if (ShowMode == FlyoutShowMode.Standard)
147148
{

0 commit comments

Comments
 (0)