Subversion Repositories SoapBoxCore

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:ad="clr-namespace:AvalonDock">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/AvalonDock;component/Resources/Brushes.xaml"/>
        <ResourceDictionary Source="/AvalonDock;component/Resources/Common.xaml"/>
    </ResourceDictionary.MergedDictionaries>


        <!--DockableFloatingWindow-->
    <Style TargetType="{x:Type ad:DockableFloatingWindow}">
        <Setter Property="Title" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=HostedPane.SelectedItem.Title}"/>
        <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DefaultBackgroundBrush}}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ad:DockableFloatingWindow}">
                    <Border Background="{TemplateBinding Background}">
                                                <ContentPresenter/>
                                                        <!--ad:ResizingPanel.ResizeWidth="{TemplateBinding ad:ResizingPanel.ResizeWidth}"
                            ad:ResizingPanel.ResizeHeight="{TemplateBinding ad:ResizingPanel.ResizeHeight}"/>-->
                    </Border><!---->
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

        <!--DocumentFloatingWindow-->
    <Style TargetType="{x:Type ad:DocumentFloatingWindow}">
        <Setter Property="Background" Value = "Transparent"/>
        <Setter Property="Width" Value="100"/>
        <Setter Property="Height" Value="100"/>
        <Setter Property="Title" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=HostedPane.SelectedItem.Title}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ad:DocumentFloatingWindow}">
                    <Grid>
                        <Border 
                            x:Name="PART_HighlighBorder"
                            Visibility="Visible"
                            Background="{DynamicResource {x:Static SystemColors.ActiveCaptionBrushKey}}" 
                            Opacity="0.2"/>
                        <ContentPresenter
                            x:Name="PART_Content"
                            Visibility="Collapsed"
                            ad:ResizingPanel.ResizeWidth="{TemplateBinding ad:ResizingPanel.ResizeWidth}"
                            ad:ResizingPanel.ResizeHeight="{TemplateBinding ad:ResizingPanel.ResizeHeight}"/>
                    </Grid><!---->
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsDocumentFloatingAllowed}" Value="True">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="PART_HighlighBorder"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="PART_Content"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--FlyoutPaneWindow-->
    <Style TargetType="{x:Type ad:FlyoutPaneWindow}">
        <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DefaultBackgroundBrush}}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ad:FlyoutPaneWindow}">
                    <Grid Name="INT_resizePanel" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <ContentPresenter Name="INT_pane" Grid.Column="1" Grid.Row="1"/>
                                                        <Border Name="INT_Resizer" Grid.Column="2" Grid.Row="1" 
                                                                Background="Transparent"/> <!--{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DefaultBackgroundBrush}}}"-->
                    </Grid>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Anchor}" Value="Right">
                            <Setter Property="Grid.Row" Value="1" TargetName="INT_Resizer"/>
                            <Setter Property="Grid.Column" Value="0" TargetName="INT_Resizer"/>
                            <Setter Property="Width" Value="4" TargetName="INT_Resizer"/>
                            <Setter Property="Cursor" Value="SizeWE" TargetName="INT_Resizer"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Anchor}" Value="Left">
                            <Setter Property="Grid.Row" Value="1" TargetName="INT_Resizer"/>
                            <Setter Property="Grid.Column" Value="2" TargetName="INT_Resizer"/>
                            <Setter Property="Width" Value="4" TargetName="INT_Resizer"/>
                            <Setter Property="Cursor" Value="SizeWE" TargetName="INT_Resizer"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Anchor}" Value="Bottom">
                            <Setter Property="Grid.Column" Value="1" TargetName="INT_Resizer"/>
                            <Setter Property="Grid.Row" Value="0" TargetName="INT_Resizer"/>
                            <Setter Property="Height" Value="4" TargetName="INT_Resizer"/>
                            <Setter Property="Cursor" Value="SizeNS" TargetName="INT_Resizer"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Anchor}" Value="Top">
                            <Setter Property="Grid.Row" Value="2" TargetName="INT_Resizer"/>
                            <Setter Property="Grid.Column" Value="1" TargetName="INT_Resizer"/>
                            <Setter Property="Height" Value="4" TargetName="INT_Resizer"/>
                            <Setter Property="Cursor" Value="SizeNS" TargetName="INT_Resizer"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>