Subversion Repositories SoapBoxCore

Rev

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