Add Overflow button visibility state
This commit is contained in:
@@ -129,10 +129,13 @@
|
|||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<Grid
|
<Grid
|
||||||
|
x:Name="Spacer"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="{StaticResource OverflowItemSpacing}"
|
Width="{StaticResource OverflowItemSpacing}"
|
||||||
Height="{StaticResource OverflowItemSpacing}" />
|
Height="{StaticResource OverflowItemSpacing}"
|
||||||
|
IsVisible="False" />
|
||||||
<Button
|
<Button
|
||||||
|
x:Name="OverflowButton"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
MinWidth="{StaticResource OverflowItemSize}"
|
MinWidth="{StaticResource OverflowItemSize}"
|
||||||
MinHeight="{StaticResource OverflowItemSize}"
|
MinHeight="{StaticResource OverflowItemSize}"
|
||||||
@@ -140,7 +143,8 @@
|
|||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
CornerRadius="{StaticResource OverflowItemCornerRadius}"
|
CornerRadius="{StaticResource OverflowItemCornerRadius}"
|
||||||
Focusable="False">
|
Focusable="False"
|
||||||
|
IsVisible="False">
|
||||||
<Viewbox Width="14" Height="14">
|
<Viewbox Width="14" Height="14">
|
||||||
<PathIcon
|
<PathIcon
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
@@ -166,5 +170,11 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
<Style Selector="^:overflow /template/ Button#OverflowButton">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:overflow /template/ Grid#Spacer">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -287,6 +287,8 @@ public class Overflow :
|
|||||||
|
|
||||||
secondaryCollection.Insert(insertIndexInSecondary, item);
|
secondaryCollection.Insert(insertIndexInSecondary, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PseudoClasses.Set(":overflow", secondaryCollection is { Count: > 0 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user