Subversion Repositories SoapBoxCore

Rev

Rev 7 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7 scott 1
<ResourceDictionary
2
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
17 scott 4
    xmlns:ad="clr-namespace:AvalonDock"
5
    xmlns:adRes="clr-namespace:AvalonDock.Properties;assembly=AvalonDock"
6
    >
7 scott 7
 
8
    <ResourceDictionary.MergedDictionaries>
9
        <ResourceDictionary Source="/AvalonDock;component/Resources/Brushes.xaml"/>
10
        <ResourceDictionary Source="/AvalonDock;component/Resources/Common.xaml"/>
11
        <ResourceDictionary Source="/AvalonDock;component/Resources/ManagedContentStyle.xaml"/>
12
    </ResourceDictionary.MergedDictionaries>
13
 
14
 
15
    <ContextMenu
16
		     x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type ad:DockingManager}, ResourceId={x:Static ad:ContextMenuElement.DockablePane}}"
17
		     >
17 scott 18
        <MenuItem
19
			Command="ad:DockableContentCommands.FloatingWindow"  />
20
        <MenuItem
21
			Command="ad:ManagedContentCommands.Show" />
22
        <MenuItem
23
			Command="ad:DockableContentCommands.ShowAsDocument" />
24
        <MenuItem
25
			Command="ad:DockableContentCommands.ToggleAutoHide" />
26
        <MenuItem
27
			Command="ad:ManagedContentCommands.Hide"
28
                  Visibility="{Binding Path=IsCloseable, Converter={x:Static ad:Converters.BoolToVisibilityConverter}}" />
7 scott 29
    </ContextMenu>
30
 
31
 
32
	<!--DockableContentTabItemStyle-->
33
    <Style x:Key="DockableContentTabItemStyle" TargetType="{x:Type ad:DockableContent}">
34
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
35
		<Setter Property="Template">
36
            <Setter.Value>
37
                <ControlTemplate TargetType="{x:Type ad:DockableContent}">
38
                    <Grid SnapsToDevicePixels="True">
39
                        <Border
40
						    x:Name="PART_DragArea"
41
						    BorderBrush="{StaticResource ManagedContentTabControlNormalBorderBrush}"
42
						    BorderThickness="1,0,1,1"
43
                            Margin="0,2,0,0"
44
                            CornerRadius="0,0,3,3"
45
                            Background="{StaticResource ManagedContentTabItemNormalBackground}"
46
                            >
47
                            <Border x:Name="tabItemIntBorder"
48
							Margin="0,1,0,2"
49
							BorderBrush="{StaticResource ManagedContentTabControlNormalBorderBrush}">
50
									<Grid Margin="4,0,4,0">
51
										<Grid.ColumnDefinitions>
52
											<ColumnDefinition Width="Auto"/>
53
											<ColumnDefinition Width="*"/>
54
										</Grid.ColumnDefinitions>
17 scott 55
                                        <Image x:Name="Icon" Width="16" Source="{TemplateBinding Icon}" UseLayoutRounding="True"/>
7 scott 56
										<TextBlock
57
											x:Name="tabItemTitle"
58
											Grid.Column="1"
59
											TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"
60
											Text="{TemplateBinding Title}"
61
											Margin="2,0,0,0" VerticalAlignment="Center"
62
											Foreground="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
63
									</Grid>
64
                            </Border>
65
                        </Border>
66
                        <Border x:Name="HighlightBorder"
67
                                        Height="3"
68
                                        VerticalAlignment="Bottom"
69
                                        BorderThickness="0,0,0,0"
70
                                        CornerRadius ="0,0,3,3"
71
                                        BorderBrush="#FFE68B2C"
72
                                        Background="{StaticResource ManagedContentTabItemSelectedBorderBackround}"
73
                                        Visibility="Hidden"
74
                                        />
75
                    </Grid>
76
 
77
                    <ControlTemplate.Triggers>
78
                        <Trigger Property="Selector.IsSelected"
79
								 Value="true">
80
                            <Setter Property="BorderThickness"
81
									Value="0" TargetName="tabItemIntBorder"/>
82
                            <Setter Property="BorderThickness"
83
									Value="1,0,1,0" TargetName="PART_DragArea"/>
84
                            <Setter Property="Background"
85
									Value="#FFFCFCFE" TargetName="PART_DragArea"/>
86
                            <Setter Property="CornerRadius"
87
									Value="0,0,3,3" TargetName="PART_DragArea"/>
88
                            <Setter Property="Visibility"
89
									Value="Visible" TargetName="HighlightBorder"/>
90
                            <Setter Property="Foreground"
91
									Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TargetName="tabItemTitle"/>
92
                            <Setter Property="Margin"
93
                                    Value="0,3,0,2" TargetName="tabItemIntBorder"/>
94
                            <Setter Property="Margin"
95
                                    Value="0,1,0,0" TargetName="PART_DragArea"/>
96
                        </Trigger>
97
                        <Trigger Property="IsMouseOver"
98
								 Value="true">
99
                            <Setter Property="Visibility"
100
									Value="Visible" TargetName="HighlightBorder"/>
101
                        </Trigger>
102
                        <Trigger Property="Icon"
103
                     Value="{x:Null}">
104
                            <Setter TargetName="Icon"
105
                        Property="Visibility"
106
                        Value="Collapsed"/>
107
                        </Trigger>
108
                    </ControlTemplate.Triggers>
109
                </ControlTemplate>
110
            </Setter.Value>
111
        </Setter>
112
    </Style>
113
 
114
	<!--DockablePane-->
17 scott 115
    <Style x:Key="{x:Type ad:DockablePane}" TargetType="{x:Type ad:DockablePane}">
7 scott 116
        <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DefaultBackgroundBrush}}}"/>
117
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
118
		<Setter Property="Template">
119
            <Setter.Value>
120
                <ControlTemplate TargetType="{x:Type ad:DockablePane}"><!--Background="{TemplateBinding Background}"-->
121
                    <Border
17 scott 122
                        Focusable="False"
7 scott 123
                        Background="{TemplateBinding Background}">
124
                        <Grid FocusManager.FocusedElement="{Binding ElementName=PART_SelectedContent}">
125
                            <Grid.RowDefinitions>
126
                                <RowDefinition Height="Auto"/>
127
                                <RowDefinition Height="*"/>
128
                                <RowDefinition Height="Auto"/>
129
                            </Grid.RowDefinitions>
130
                            <Border x:Name="PART_Header"
131
							    Grid.Row="0" Focusable="False"
132
							    Background="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DockablePaneTitleBackground}}}"
133
							    BorderThickness="1,1,1,0"
134
							    BorderBrush="DarkGray"
135
                                Height="18">
136
                                <DockPanel LastChildFill="True">
17 scott 137
                                    <Button DockPanel.Dock="Right" Width="15" Height="15" Style="{StaticResource PaneHeaderCommandStyle}" Command="ad:DockablePaneCommands.Close" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.IsCloseable, Converter={x:Static ad:Converters.BoolToVisibilityConverter}}" ToolTip="{x:Static adRes:Resources.DockablePaneCommands_Close}">
138
										<!--<ad:AlignedImage>-->
139
                                        <Image Source="Images\PinClose.png" Width="13" UseLayoutRounding="True"/>
140
										<!--</ad:AlignedImage>-->
7 scott 141
                                    </Button>
17 scott 142
                                    <Button x:Name="btnPinAutoHide" DockPanel.Dock="Right" Width="15" Height="15"  Style="{StaticResource PaneHeaderCommandStyle}" Command="ad:DockablePaneCommands.ToggleAutoHide" ToolTip="{x:Static adRes:Resources.DockablePaneCommands_ToggleAutoHide}">
143
										<!--<ad:AlignedImage>-->
144
                                        <Image Source="Images\PinAutoHide.png" Width="13" UseLayoutRounding="True"/>
145
										<!--</ad:AlignedImage>-->
7 scott 146
									</Button>
17 scott 147
                                    <Border x:Name="PART_ShowContextMenuButton"  DockPanel.Dock="Right" Width="15" Height="15"  Style="{StaticResource PaneHeaderContextMenuCommandStyle}"  ToolTip="{x:Static adRes:Resources.DockablePane_ShowOptionsMenu}">
148
										<!--<ad:AlignedImage>-->
149
											<Image Source="Images\PinMenu.png" Width="13" UseLayoutRounding="True"/>
150
										<!--</ad:AlignedImage>-->
151
                                    </Border>
7 scott 152
                                    <TextBlock
153
									    Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.Title}"
154
									    x:Name="paneTitle"
155
									    Grid.Row="0"
156
									    Margin="2,0,0,0" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"
157
                                        VerticalAlignment="Center"
158
									    Foreground="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DockablePaneTitleForeground}}}"/>
159
							    </DockPanel>
160
                            </Border>
161
                            <Border Grid.Row="1"
162
							    BorderThickness="1,0,1,1"
163
							    BorderBrush="DarkGray"
164
                                Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.Background}">
165
                                <ContentPresenter
166
                                    x:Name="PART_SelectedContent"
167
                                    Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.Content}"
168
								    KeyboardNavigation.TabNavigation="Local"
169
								    KeyboardNavigation.DirectionalNavigation="Contained"
170
								    KeyboardNavigation.TabIndex="1"
171
                                    />
172
                            </Border>
173
                            <Border x:Name="PART_Tabs"
174
                                    Grid.Row="2"
175
								    Margin ="0,2,0,0"
176
                                    Height ="25"
177
								    BorderThickness="0,1,0,0"
178
								    BorderBrush="{StaticResource ManagedContentTabControlNormalBorderBrush}"
179
								    >
180
                            </Border>
181
                            <ad:DockableTabPanel
182
                                    Grid.Row="2"
183
                                    Height ="24"
184
                                    KeyboardNavigation.TabIndex="2"
185
                                    IsItemsHost="True"
186
                                    x:Name="paneTabsPanel"
187
                                    Margin="0,0,0,2"
188
                                    TabItemStyle="{StaticResource DockableContentTabItemStyle}"/>
189
                        </Grid>
190
                    </Border>
191
 
192
                    <ControlTemplate.Triggers>
193
                        <!--<Trigger Property="IsKeyboardFocusWithin"  Value="True">
194
                            <Setter Property="Background" Value="{StaticResource DockablePaneTitleBackground}" TargetName="PART_Header"/>
195
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}" TargetName="paneTitle"/>
196
                        </Trigger>-->
197
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.IsActiveContent}" Value="True" >
198
                            <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DockablePaneTitleBackgroundSelected}}}" TargetName="PART_Header"/>
199
                            <Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DockablePaneTitleForegroundSelected}}}" TargetName="paneTitle"/>
200
                        </DataTrigger>
201
                        <!--<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsOptionsMenuOpened}" Value="True" >
202
                            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ActiveCaptionBrushKey}}" TargetName="PART_Header"/>
203
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}" TargetName="paneTitle"/>
204
                        </DataTrigger>-->
205
                        <Trigger Property ="ShowHeader" Value="False">
206
                            <Setter Property="Visibility" Value="Collapsed" TargetName="PART_Header"/>
207
                        </Trigger>
208
                        <Trigger Property ="ShowTabs" Value="False">
209
                            <Setter Property="Visibility" Value="Collapsed" TargetName="PART_Tabs"/>
210
                        </Trigger>
211
                        <Trigger Property ="HasSingleItem" Value="True">
212
                            <Setter Property="Visibility" Value="Collapsed" TargetName="PART_Tabs"/>
213
                            <Setter Property="Visibility" Value="Collapsed" TargetName="paneTabsPanel"/>
214
                        </Trigger>
215
 
216
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},  Path=SelectedItem.State}" Value="AutoHide">
217
                            <Setter Property="LayoutTransform" TargetName="btnPinAutoHide">
218
                                <Setter.Value>
219
                                    <RotateTransform Angle="90"/>
220
                                </Setter.Value>
221
                            </Setter>
222
                        </DataTrigger>
223
 
224
 
225
                    </ControlTemplate.Triggers>
226
 
227
 
228
                </ControlTemplate>
229
            </Setter.Value>
230
        </Setter>
231
    </Style>
232
</ResourceDictionary>