Change visible to condition for SecondaryItems
This commit is contained in:
@@ -150,10 +150,11 @@
|
||||
x:Name="RendererBar"
|
||||
Grid.Row="0"
|
||||
Margin="8,6,0,0"
|
||||
IsSticky="False"
|
||||
DefaultLabelPosition="Right"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
OverflowButtonVisibility="Auto">
|
||||
OverflowButtonVisibility="Auto"
|
||||
DynamicOverflowItemsChanging="BarDynamicOverflowChanging"
|
||||
IsDynamicOverflowEnabled="True">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<local:BindableCommandBarBehavior
|
||||
ItemClickedCommand="{x:Bind ViewModel.OperationClickedCommand}"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
@@ -218,7 +219,7 @@ namespace Wino.Views
|
||||
|
||||
private void BarDynamicOverflowChanging(CommandBar sender, DynamicOverflowItemsChangingEventArgs args)
|
||||
{
|
||||
if (args.Action == CommandBarDynamicOverflowAction.AddingToOverflow)
|
||||
if (args.Action == CommandBarDynamicOverflowAction.AddingToOverflow || sender.SecondaryCommands.Any())
|
||||
sender.OverflowButtonVisibility = CommandBarOverflowButtonVisibility.Visible;
|
||||
else
|
||||
sender.OverflowButtonVisibility = CommandBarOverflowButtonVisibility.Collapsed;
|
||||
|
||||
Reference in New Issue
Block a user