Quantcast
Channel: AvalonDock
Viewing all articles
Browse latest Browse all 2690

New Post: [Version 2.0] Binding title

$
0
0

I found this thread

http://avalondock.codeplex.com/discussions/390255

And got this far thanks to info found there.

<avalonDock:DockingManager.LayoutItemContainerStyle><StyleTargetType="{x:Type avalondock:LayoutAnchorableItem}"><SetterProperty="Title"Value="{Binding Model.DataContext.DisplayName}"/></Style></avalonDock:DockingManager.LayoutItemContainerStyle>

 

The problem is that this will use the MainWindow model, and all docking panels will have the same Title. I want to use a property on each panel model.

I'm using Caliburn.Micro and my test code so far

 

<avalonDock:DockingManagerGrid.Row="1"><avalonDock:DockingManager.LayoutItemContainerStyle><StyleTargetType="{x:Type avalondock:LayoutAnchorableItem}"><SetterProperty="Title"Value="{Binding Model.DataContext.DisplayName}"/></Style></avalonDock:DockingManager.LayoutItemContainerStyle><avalondock:LayoutRoot><avalondock:LayoutPanelOrientation="Horizontal"><avalondock:LayoutDocumentPane><avalondock:LayoutAnchorable><ContentControlcal:View.Model="{Binding ScriptEditor}"IsTabStop="False"/></avalondock:LayoutAnchorable></avalondock:LayoutDocumentPane></avalondock:LayoutPanel><avalondock:LayoutRoot.LeftSide><avalondock:LayoutAnchorSide><avalondock:LayoutAnchorGroup><avalondock:LayoutAnchorableTitle="Autohidden Content"><TextBox/></avalondock:LayoutAnchorable></avalondock:LayoutAnchorGroup></avalondock:LayoutAnchorSide></avalondock:LayoutRoot.LeftSide></avalondock:LayoutRoot></avalonDock:DockingManager>

 

The title is on the ScriptEditorViewModel

Any ideas?

Thanks


Viewing all articles
Browse latest Browse all 2690

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>