|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!-- Smart ListBoxItem Styles -->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<Style x:Key="ListBoxItemNotFocusedHighlightingStyle" TargetType="{x:Type ListBoxItem}">
<Style.Resources>
<!--SelectedItem 'BackgroundColor' without focus-->
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="LightBlue"/>
</Style.Resources>
</Style>
<Style x:Key="ListBoxItemStandardHighlightingStyle" TargetType="{x:Type ListBoxItem}">
<Style.Resources>
<!--SelectedItem 'BackgroundColor' with focus-->
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightSkyBlue" Opacity=".4"/>
<!--SelectedItem 'BackgroundColor' without focus-->
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="LightBlue" Opacity=".4"/>
</Style.Resources>
</Style>
<Style x:Key="ListBoxItemClippedTextStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<!-- Best practice solution to clip and show a ListBox-Entry properly -->
<TextBlock Text="{TemplateBinding Content}" TextTrimming="CharacterEllipsis"
ToolTip="{TemplateBinding Content}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Experience:
More than 20 years with software design, architecture and development. More than 9 years with the .NET Framework.
Preferences:
C#, .NET 2.0, .NET 3.5, .NET 4.0, .NET 4.5, WPF (3, 4 and 4.5), MVVM, XAML, Silverlight, Windows Phone, Windows 8 Apps, ASP.NET, WCF, T-SQL and especially GUI-Development and GUI-Design.
I would say I am a dotNet Developer with a keen affinity for developing and enriching user interfaces.