AvalonDock 笔记

官方例子

<avalonDock:DockingManager Grid.Row="1" x:Name="dockManager" AllowMixedOrientation="True" DocumentClosing="dockManager_DocumentClosing">

            <avalonDock:DockingManager.Theme>

                <avalonDock:MetroTheme/>

            </avalonDock:DockingManager.Theme>

            <avalonDock:DockingManager.DocumentHeaderTemplate>

                <DataTemplate>

                    <StackPanel Orientation="Horizontal">

                        <Image Source="{Binding IconSource}" Margin="0,0,4,0"/>

                        <TextBlock Text="{Binding Title}" TextTrimming="CharacterEllipsis"/>

                    </StackPanel>

                </DataTemplate>

            </avalonDock:DockingManager.DocumentHeaderTemplate>

            <avalonDock:DockingManager.Layout>

                <avalonDock:LayoutRoot PropertyChanged="OnLayoutRootPropertyChanged">

                    <avalonDock:LayoutPanel Orientation="Horizontal">

                        <avalonDock:LayoutAnchorablePane DockWidth="100">

                            <avalonDock:LayoutAnchorable x:Name="WinFormsWindow"  ContentId="WinFormsWindow" Title="WinForms Window" ToolTip="My WinForms Tool" CanHide="False" CanClose="False" >

                                <winformsIntegration:WindowsFormsHost x:Name="winFormsHost" Background="White"/>

                            </avalonDock:LayoutAnchorable>

                        </avalonDock:LayoutAnchorablePane>

                        <avalonDock:LayoutDocumentPaneGroup>

                            <avalonDock:LayoutDocumentPane>

                                <avalonDock:LayoutDocument ContentId="document1" Title="Document 1" IconSource="/AvalonDock.TestApp;component/Images/alarm-clock-blue.png" >

                                    <StackPanel>

                                        <TextBox Text="Document 1 Content"/>

                                        <Button Content="Click to add 2 documents" Click="AddTwoDocuments_click"/>

                                    </StackPanel>

                                </avalonDock:LayoutDocument>

                                <avalonDock:LayoutDocument ContentId="document2" Title="Document 2">

                                    <TextBox Text="{Binding TestTimer, Mode=OneWay, StringFormat='Document 2 Attached to Timer ->\{0\}'}"/>

                                </avalonDock:LayoutDocument>

                            </avalonDock:LayoutDocumentPane>

                        </avalonDock:LayoutDocumentPaneGroup>

                        <avalonDock:LayoutAnchorablePaneGroup DockWidth="150">

                            <avalonDock:LayoutAnchorablePane>

                                <avalonDock:LayoutAnchorable ContentId="toolWindow1" Title="Tool Window 1" Hiding="OnToolWindow1Hiding">

                                    <StackPanel>

                                        <local:TestUserControl/>

                                        <TextBox Text="{Binding TestTimer, Mode=OneWay, StringFormat='Tool Window 1 Attached to Timer ->\{0\}'}"/>

                                    </StackPanel>

                                </avalonDock:LayoutAnchorable>

                                <avalonDock:LayoutAnchorable ContentId="toolWindow2" Title="Tool Window 2">

                                    <TextBlock Text="{Binding FocusedElement}"/>

                                </avalonDock:LayoutAnchorable>

                            </avalonDock:LayoutAnchorablePane>

                        </avalonDock:LayoutAnchorablePaneGroup>

                    </avalonDock:LayoutPanel>



                    <avalonDock:LayoutRoot.LeftSide>

                        <avalonDock:LayoutAnchorSide>

                            <avalonDock:LayoutAnchorGroup>

                                <avalonDock:LayoutAnchorable Title="AutoHide1 Content" ContentId="AutoHide1Content" IconSource="/AvalonDock.TestApp;component/Images/address-book--pencil.png" >

                                    <TextBox Text="{Binding TestTimer, Mode=OneWay, StringFormat='AutoHide Attached to Timer ->\{0\}'}"/>

                                </avalonDock:LayoutAnchorable>

                                <avalonDock:LayoutAnchorable Title="AutoHide2 Content" ContentId="AutoHide2Content">

                                    <StackPanel Orientation="Vertical">

                                        <TextBox/>

                                        <TextBox/>

                                    </StackPanel>

                                </avalonDock:LayoutAnchorable>

                            </avalonDock:LayoutAnchorGroup>

                        </avalonDock:LayoutAnchorSide>

                    </avalonDock:LayoutRoot.LeftSide>

                </avalonDock:LayoutRoot>

            </avalonDock:DockingManager.Layout>

           

        </avalonDock:DockingManager>

 

 

你可能感兴趣的:(val)