Hi,
Here's a possible solution.
The LayoutDocumentFloatingWindowControl (the window when undocked) uses the DocumentTitleTemplate property, so you could define it in DockingManager. From there, the binding would be on ancestor Window, for property Model.Root.Manager.DataContext.HasProblem.
Here's a possible solution.
The LayoutDocumentFloatingWindowControl (the window when undocked) uses the DocumentTitleTemplate property, so you could define it in DockingManager. From there, the binding would be on ancestor Window, for property Model.Root.Manager.DataContext.HasProblem.
<ad:DockingManager.DocumentTitleTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Title}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent" />
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Model.Root.Manager.DataContext.HasProblem}"
Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard Name="StartBlinking">
<Storyboard>
<ColorAnimation Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)"
To="Orange"
Duration="00:00:00.4"
RepeatBehavior="Forever"
AutoReverse="True" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Model.Root.Manager.DataContext.HasProblem}"
Value="False">
<DataTrigger.EnterActions>
<RemoveStoryboard BeginStoryboardName="StartBlinking" />
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</DataTemplate>
</ad:DockingManager.DocumentTitleTemplate>