-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Context menu is unreadable when dark theme #142
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:vsShell="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"> | ||
|
||
<Style x:Key="ContextMenuStyle" TargetType="{x:Type ContextMenu}"> | ||
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.DropDownPopupBackgroundBeginBrushKey}}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.DropDownBorderBrushKey}}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}" /> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type ContextMenu}"> | ||
<Border Uid="Border_93"> | ||
<Border.Style> | ||
<Style TargetType="{x:Type Border}"> | ||
<Setter Property="Tag" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}"/> | ||
<Style.Triggers> | ||
<DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="True"> | ||
<Setter Property="Background" Value="Transparent"/> | ||
<Setter Property="Padding" Value="0,0,5,5"/> | ||
<Setter Property="Effect"> | ||
<Setter.Value> | ||
<DropShadowEffect BlurRadius="4" Opacity="0.8" ShadowDepth="1"/> | ||
</Setter.Value> | ||
</Setter> | ||
</DataTrigger> | ||
</Style.Triggers> | ||
</Style> | ||
</Border.Style> | ||
<Border BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
Background="{TemplateBinding Background}" | ||
Uid="Border_50"> | ||
<ScrollViewer CanContentScroll="True" | ||
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, | ||
TypeInTargetAssembly={x:Type FrameworkElement}}}" | ||
Uid="ScrollViewer_9"> | ||
<ItemsPresenter | ||
KeyboardNavigation.DirectionalNavigation="Cycle" | ||
Margin="{TemplateBinding Padding}" | ||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" | ||
Uid="ItemsPresenter_5"/> | ||
</ScrollViewer> | ||
</Border> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</ResourceDictionary> |