- xplorerbar_src.zip
- XPlorerBar_src
- XPlorerBar.DemoApp.sln
- XPlorerBar.DemoApp
- App.xaml
- App.xaml.cs
- Converters
- Extra_BindingMode
- Extra_ThemeManagement
- Images
- codeproject120x60.gif
- Computer16.png
- Copy16.png
- CreateFolder16.png
- Delete16.png
- MailFile16.png
- Move16.png
- MusicOnLine16.png
- MyComputer16.png
- MyDocuments16.png
- MyMusic32.png
- MyNetwork16.png
- MyPictures16.png
- MyPictures32.png
- MyPictures48.png
- NetworkFavorites16.png
- OrderPictures16.png
- PlayAll16.png
- PrintPictures16.png
- PublishFolder16.png
- Rename16.png
- SharedMusic16.png
- ShareFolder16.png
- SlideShow16.png
- MainWindow.xaml
- MainWindow.xaml.cs
- Properties
- Resources
- Images
- Folder16.png
- MyComputer16.png
- NetworkPlaces16.png
- PicturePrint16.png
- PictureTasks32.png
- PictureTasksMono48.png
- PrintsOnline16.png
- SlideShow16.png
- Skins
- XPlorerBar.DemoApp.csproj
- XPlorerBar.Documentation
- XPlorerBarDocumentationProject.shfb
- XPlorerBar.Library
- XPlorerBar.VisualStudio.Design
- xplorerbar_demo.zip
- XPlorerBar_demo
- ZonaTools.XPlorerBar.DemoApp.exe
- ZonaTools.XPlorerBar.dll
- ZonaTools.XPlorerBar.Documentation.chm
|
<!--
Copyright © 2008, Zona-Tools, all rights reserved.
This source code is licensed under the Code Project Open License (CPOL).
Check out http://www.codeproject.com/info/cpol10.aspx for further details.
-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xpbar="clr-namespace:ZonaTools.XPlorerBar">
<!-- ======================== -->
<!-- = Main template import = -->
<!-- ======================== -->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/ZonaTools.XPlorerBar;component/Themes/XPlorerBar.Generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!-- ========================== -->
<!-- = Expand/Collapse arrows = -->
<!-- ========================== -->
<Geometry x:Key="XPlorerSectionCollapseArrow">M0,0 L8,0 L4,8Z</Geometry>
<Geometry x:Key="XPlorerSectionExpandArrow">M0,0 L8,4 L0,8Z</Geometry>
<!-- =========== -->
<!-- = Brushes = -->
<!-- =========== -->
<!-- XPlorerBar : background -->
<SolidColorBrush x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type xpbar:XPlorerResourceKeys},ResourceId=XPlorerBarBackgroundBrush}" Color="#333333"/>
<!-- XPlorerSection content : background -->
<SolidColorBrush x:Key="XPlorerSectionBackgroundBrush" Color="#595959"/>
<!-- XPlorerSection content : foreground -->
<SolidColorBrush x:Key="XPlorerSectionForegroundBrush" Color="#ffffff"/>
<!-- XPlorerSection content : foreground (IsMouseOver = true) -->
<SolidColorBrush x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type xpbar:XPlorerResourceKeys},ResourceId=XPlorerSectionContentHoverForegroundBrush}" Color="#ffffff"/>
<!-- XPlorerSection header : arrow -->
<SolidColorBrush x:Key="XPlorerSectionArrowBrush" Color="#aaaaaa"/>
<!-- ==================== -->
<!-- = XPlorerBar style = -->
<!-- ==================== -->
<Style TargetType="{x:Type xpbar:XPlorerBar}">
<Setter Property="Padding" Value="3,3,3,0"/>
</Style>
<!-- ======================== -->
<!-- = XPlorerSection style = -->
<!-- ======================== -->
<Style TargetType="{x:Type xpbar:XPlorerSection}">
<Setter Property="Margin" Value="0,0,0,3"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="{StaticResource XPlorerSectionBackgroundBrush}"/>
<Setter Property="Foreground" Value="{StaticResource XPlorerSectionForegroundBrush}"/>
<Setter Property="ExpandOrCollapseDuration" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type xpbar:XPlorerSection}">
<StackPanel Orientation="Vertical">
<!-- Header Site -->
<ToggleButton x:Name="PART_HeaderSite"
Content="{TemplateBinding Header}" Style="{DynamicResource HeaderStyle}"
Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}"/>
<!-- Content Site -->
<xpbar:XPandableDecorator x:Name="PART_ContentSite">
<Border Background="{TemplateBinding Background}" CornerRadius="0,0,4,4">
<ContentPresenter Margin="{TemplateBinding Padding}"/>
</Border>
</xpbar:XPandableDecorator>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- =============================== -->
<!-- = XPlorerSection header style = -->
<!-- =============================== -->
<Style x:Key="HeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="headerBorder" Background="{TemplateBinding Background}" CornerRadius="4">
<DockPanel LastChildFill="True">
<!-- Header arrow -->
<Path x:Name="headerArrow"
DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="8,5,5,5" SnapsToDevicePixels="True"
Data="{StaticResource XPlorerSectionExpandArrow}"
Fill="{StaticResource XPlorerSectionArrowBrush}"/>
<!-- Header text -->
<ContentPresenter x:Name="headerContent"
Content="{TemplateBinding Content}" Margin="0,1,10,0"
HorizontalAlignment="Left" VerticalAlignment="Top">
<ContentPresenter.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
</Style>
</ContentPresenter.Resources>
</ContentPresenter>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<!-- IsChecked = true -->
<Trigger Property="IsChecked" Value="True">
<!-- Updates the arrow appearance -->
<Setter TargetName="headerArrow" Property="Data" Value="{StaticResource XPlorerSectionCollapseArrow}"/>
<!-- Updates the border corners -->
<Setter TargetName="headerBorder" Property="CornerRadius" Value="4,4,0,0"/>
</Trigger>
<!-- IsMouseOver = true -->
<Trigger Property="IsMouseOver" Value="True">
<!-- Updates the arrow color -->
<Setter TargetName="headerArrow" Property="Fill" Value="{StaticResource XPlorerSectionForegroundBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</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.
I have been developing and managing projects for real-time embedded softwares for eight years. Then, I moved from Paris to the south of France and began to lead a team who was developping Java applications.
My main occupation right now is to continue my journey in the WPF world.
You can check out my blog
here. [
^]