Created
November 9, 2012 23:52
-
-
Save Vaccano/4049094 to your computer and use it in GitHub Desktop.
Syle.xml
This file contains hidden or 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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:Styles="clr-namespace:MyProject.Wpf.Controls.Styles"> | |
<!--Setup the look of the tool tips--> | |
<Style TargetType="{x:Type ToolTip}"> | |
<Setter Property="Foreground" Value="#2E2E2E"/> | |
<Setter Property="Background"> | |
<Setter.Value> | |
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> | |
<LinearGradientBrush.GradientStops> | |
<GradientStopCollection> | |
<GradientStop Offset="0" Color="#FFFFFF" /> | |
<GradientStop Offset="1" Color="#D7D2FF" /> | |
</GradientStopCollection> | |
</LinearGradientBrush.GradientStops> | |
</LinearGradientBrush> | |
</Setter.Value> | |
</Setter> | |
<Setter Property="ContentTemplate"> | |
<Setter.Value> | |
<DataTemplate> | |
<Grid> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition/> | |
<ColumnDefinition Width="Auto"/> | |
</Grid.ColumnDefinitions> | |
<Grid.RowDefinitions> | |
<RowDefinition/> | |
<RowDefinition/> | |
<RowDefinition/> | |
</Grid.RowDefinitions> | |
<TextBlock Grid.Row="0" TextWrapping="Wrap" FontWeight="Bold" Text="{Binding Path=(Styles:ToolTip.Title), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"/> | |
<TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" Text="(Alt+N) " /> | |
<Line Grid.Row="1" Grid.ColumnSpan="2" Stretch="Fill" Margin="0,2,0,5" X1="0" X2="1" Stroke="Gray"/> | |
<TextBlock Grid.Row="2" Grid.ColumnSpan="2" TextWrapping="Wrap" Margin="5,0,0,0" Text="{Binding}" /> | |
</Grid> | |
</DataTemplate> | |
</Setter.Value> | |
</Setter> | |
</Style> | |
</ResourceDictionary> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment