Skip to content

Commit

Permalink
Fix weird shadow when content is too long; limit list height
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrondeau committed Jul 27, 2014
1 parent a39dea6 commit 7fd4b1a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions GoToWindow/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gotowindow="clr-namespace:GoToWindow"
Title="Go To Window" Height="400" Width="640"
Title="Go To Window" Height="Auto" Width="640"
WindowStartupLocation="CenterScreen"
AllowsTransparency="True"
Background="Transparent"
Expand Down Expand Up @@ -64,16 +64,17 @@
<ListView Grid.Row="1" Name="windowsListView"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
MouseDoubleClick="windowsListView_MouseDoubleClick"
BorderBrush="Transparent">
BorderBrush="Transparent"
MaxHeight="288">
<ListView.Style>
<Style TargetType="ListView">
<Style.Triggers>
<Trigger Property="HasItems" Value="False">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListView">
<Grid Height="32" >
<TextBlock Margin="8" VerticalAlignment="Center" Foreground="Gray" Text="No opened windows matching your keywords"/>
<Grid Height="48" >
<TextBlock Margin="16" VerticalAlignment="Center" Foreground="Gray" Text="No opened windows matching your keywords"/>
</Grid>
</ControlTemplate>
</Setter.Value>
Expand Down

0 comments on commit 7fd4b1a

Please sign in to comment.