Skip to content

Commit

Permalink
Added new tooltip design (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed May 4, 2024
1 parent bf34661 commit b9c3be1
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions ColorPicker/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1962,6 +1962,43 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="HasDropShadow" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border
Name="Border"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Margin="5"
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource LightAccentColor}"
BorderThickness="1">
<Border.Effect>
<DropShadowEffect
BlurRadius="10"
Direction="270"
Opacity="0.1"
ShadowDepth="0"
Color="{DynamicResource Accent}" />
</Border.Effect>
<ContentPresenter
Margin="4"
HorizontalAlignment="Left"
VerticalAlignment="Top" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="HasDropShadow" Value="true">
<Setter TargetName="Border" Property="CornerRadius" Value="4" />
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>

0 comments on commit b9c3be1

Please sign in to comment.