This project has moved. For the latest updates, please go here.

AvalonDock editable

Oct 16, 2013 at 7:42 AM
Hi All,

I'm using Avalondock version 2.0 and set into the header custom editable texbox control.
<xcad:DockingManager Grid.Row="1" regions:RegionManager.RegionName="{x:Static common:RegionNames.DesignerRegion}" 
                             Style="{DynamicResource CustomDockingManagerStyle}">

            <xcad:DockingManager.DocumentHeaderTemplate>
                <DataTemplate>
                    <behaviors:EditableTextBlock x:Name="EditableTextBlock" 
                                                 Text="{Binding Path=Title}"
                                                 TextBoxBorderColor="#C34442"
                                                 TextBlockForegroundColor="{DynamicResource AddButtonBackground}"
                                                 TextBoxForegroundColor="#7B3A3A"
                                                 TextBoxBackgroundColor="#FFF1E6"
                                                 HorizontalAlignment="Stretch"
                                                 VerticalAlignment="Center"/>
                </DataTemplate>
            </xcad:DockingManager.DocumentHeaderTemplate>
            <xcad:DockingManager.LayoutItemContainerStyleSelector>
                <avalonBehaviors:PanesStyleSelector >
                    <avalonBehaviors:PanesStyleSelector.DocumentsStyle>
                        <Style TargetType="{x:Type xcad:LayoutItem}">
                            <Setter Property="Title" Value="{Binding Model.DataContext.Caption, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
                        </Style>
                    </avalonBehaviors:PanesStyleSelector.DocumentsStyle>   
                </avalonBehaviors:PanesStyleSelector>
            </xcad:DockingManager.LayoutItemContainerStyleSelector>
            <xcad:LayoutRoot >
                <xcad:LayoutPanel >
                    <!--xcad:LayoutDocumentPaneGroup>
                        <xcad:LayoutDocumentPane />
                    </xcad:LayoutDocumentPaneGroup-->
                    <xcad:LayoutDocumentPane />
                    <xcad:LayoutAnchorablePane DockWidth="250" >
                        <xcad:LayoutAnchorable Title="Properties" AutoHideWidth="250"> 
                            <ContentControl regions:RegionManager.RegionName="{x:Static common:RegionNames.PropertiesRegion}"/>
                        </xcad:LayoutAnchorable>
                    </xcad:LayoutAnchorablePane>
                </xcad:LayoutPanel>
                <xcad:LayoutRoot.BottomSide>
                    <xcad:LayoutAnchorSide>
                        <xcad:LayoutAnchorGroup>
                            <xcad:LayoutAnchorable Title="Log Messages">
                                <TextBox IsReadOnly="True" Text="{Binding LogMessage}" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"/>
                            </xcad:LayoutAnchorable>
                        </xcad:LayoutAnchorGroup>
                    </xcad:LayoutAnchorSide>
                </xcad:LayoutRoot.BottomSide>
            </xcad:LayoutRoot>
        </xcad:DockingManager>
But when I changed the header text, the message does not invoke to the ViewModel(see at <Setter Property="Title" Value="{Binding Model.DataContext.Caption, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}").
What can I solve this?