Skip to content

Commit

Permalink
Improve expander border style
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Dec 15, 2016
1 parent ae636f5 commit 484fdc7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
12 changes: 4 additions & 8 deletions CodeNav/CodeViewUserControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@
<Expander.Header>
<StackPanel Orientation="Horizontal">
<Frame Source="{Binding IconPath}" Margin="0,0,3,0" />
<Border BorderThickness="0,0,0,1" BorderBrush="LightGray">
<TextBlock>
<TextBlock>
<Run Text="{Binding Name}" FontSize="11" Foreground="{Binding Foreground}" />
<Run Text="{Binding Parameters}" FontSize="10" Foreground="DarkGray" />
</TextBlock>
</Border>
</TextBlock>
</StackPanel>
</Expander.Header>
<ListBox ItemsSource="{Binding Members}" SelectionChanged="Selector_OnSelectionChanged" BorderThickness="0"
Expand All @@ -80,12 +78,10 @@
<Expander.Header>
<StackPanel Orientation="Horizontal">
<Frame Source="{Binding IconPath}" Margin="0,0,3,0" />
<Border BorderThickness="0,0,0,1" BorderBrush="LightGray">
<TextBlock>
<TextBlock>
<Run Text="{Binding Name}" FontSize="11" Foreground="{Binding Foreground}" />
<Run Text="{Binding Parameters}" FontSize="10" Foreground="DarkGray" />
</TextBlock>
</Border>
</TextBlock>
</StackPanel>
</Expander.Header>
<ListBox ItemsSource="{Binding Members}" SelectionChanged="Selector_OnSelectionChanged" BorderThickness="0"
Expand Down
12 changes: 11 additions & 1 deletion CodeNav/Styles/PlusMinusExpanderStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,27 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="17"/>
</Grid.ColumnDefinitions>
<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center"/>
<Border BorderThickness="0,0,0,1" x:Name="ExpanderHeaderBorder" HorizontalAlignment="Left">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="DarkGray" Offset="0.0" />
<GradientStop Color="LightGray" Offset="1" />
</LinearGradientBrush>
</Border.BorderBrush>
<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center" />
</Border>
<Image Grid.Column="1" x:Name="arrow" Source="../Icons/ExpanderHeader/Expand_16xSM.png" />
</Grid>
</Border>

<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Source" TargetName="arrow" Value="../Icons/ExpanderHeader/Collapse_16xSM.png" />
<Setter Property="BorderThickness" TargetName="ExpanderHeaderBorder" Value="0,0,0,1" />
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter Property="Source" TargetName="arrow" Value="../Icons/ExpanderHeader/Expand_16xSM.png" />
<Setter Property="BorderThickness" TargetName="ExpanderHeaderBorder" Value="0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down

0 comments on commit 484fdc7

Please sign in to comment.