mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-29 16:49:36 +12:00
Let list view and its entries stretch
Fix empty space next to the list when all entries require less space than other controls in same window. Eg. the label "2 items" and the icon button (open folder) needs more space than list with one entry named "C".
This commit is contained in:
parent
c44ecd01d5
commit
56bf7b18dd
|
@ -171,7 +171,7 @@
|
|||
</Button>
|
||||
</DockPanel>
|
||||
|
||||
<ListView x:Name="dgv" x:FieldModifier="internal" Margin="6,0" d:ItemsSource="{d:SampleData ItemCount=5}" SelectionMode="Single"
|
||||
<ListView x:Name="dgv" x:FieldModifier="internal" Margin="6,0" d:ItemsSource="{d:SampleData ItemCount=5}" SelectionMode="Single" HorizontalContentAlignment="Stretch"
|
||||
Foreground="{x:Static stm:MenuDefines.ColorForeground}" BorderBrush="{x:Null}" Background="{x:Null}"
|
||||
ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.ScrollChanged="HandleScrollChanged">
|
||||
<ListView.ItemTemplate>
|
||||
|
@ -179,7 +179,7 @@
|
|||
<Border BorderBrush="{Binding BorderBrush}" Background="{Binding BackgroundBrush}" BorderThickness="1">
|
||||
<StackPanel Orientation="Horizontal" Height="{DynamicResource RowHeight}">
|
||||
<Image Width="{DynamicResource ColumnIconWidth}" Margin="0,1,0,2" Source="{Binding ColumnIcon}" />
|
||||
<TextBlock Width="{DynamicResource ColumnTextWidth}" Margin="5,0,2,1" Padding="0" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"
|
||||
<TextBlock Width="{DynamicResource ColumnTextWidth}" Margin="5,0,2,1" Padding="0" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"
|
||||
Text="{Binding ColumnText}" Foreground="{x:Static stm:MenuDefines.ColorForeground}" />
|
||||
<!-- TODO: Optional or only for trimmed entries: ToolTip="{Binding ColumnText}" -->
|
||||
</StackPanel>
|
||||
|
|
Loading…
Reference in a new issue