This project is read-only.

[Version 2.0] Title not staying in MVVM application when swapping view models

Apr 16, 2013 at 3:14 PM
Edited Apr 16, 2013 at 3:14 PM
I have a WPF application that is using AvalonDock with MVVM pattern. I am having an issue with the title not staying when a user clicks on my back button which deactivates the view model and then comes back to the screen.
  <avalonDock:DockingManager x:Name="DockManager"
                                   DocumentsSource="{Binding Documents}"
                                   ActiveContent="{Binding ActiveDocument, Mode=TwoWay, Converter={StaticResource ActiveDocumentConverter}}">
                        <themes:MetroTheme />
                        <DataTemplate DataType="{x:Type local:LoanViewModel}">
          .... content controls
                        <Style TargetType="{x:Type controls:LayoutDocumentItem}">
                            <Setter Property="Title" Value="{Binding Model.LoanTabTitle}" />
                            <Setter Property="ToolTip" Value="{Binding Model.LoanTabTitle}" />
                            <Setter Property="CloseCommand" Value="{Binding Model.CloseCommand}" />
                            <Setter Property="IconSource" Value="{Binding Model.IconSource}" />
                            <Setter Property="ContentId" Value="{Binding Model.ContentId}" />
This is the XAML in my AllLoansDataTemplate

LoanTabTitle is defined in my PaneViewModel and set within my LoanViewModel in the constructor. I tried a couple other spots and it seems to be set but never bubbles up to the UI.

I have a back button on the screen that deactivates it and goes back to a Home screen. Code is IsActive = false;

Any assistance would be greatly appreciated.