Hi all,
I have created a custom window control (inherited from Window), all is fine except the text of my status bar. I have added a new property to my control called "StatusText" and this text is shown inside a TextBlock in my control's style.
But when I change the StatusText property of my window the text doesn't change, it's not update. On another side, if I change the Title property of my window (which is an inherited property) the Title change correctly.
So maybe I have not correctly declared my StatusText property ? Or I need to explicitly ask for the TextBlock in my style to update ?
Thank for your help.
StatusText Property Declaration :
private string m_StatusText;
public string StatusText
{
get { return m_StatusText; }
set { m_StatusText = value; }
}
XAML Style for the status bar :
<!-- Status area -->
<Border Grid.Row="2" Style="{DynamicResource SFM_StatusAreaStyle}" CornerRadius="0, 0, 7, 7" BorderThickness="1, 1, 1, 0">
<Grid Style="{DynamicResource SFM_TitleBarStyleReflect}">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6, 0, 0, 2" Foreground="{DynamicResource B_TextColor}"
Text="{Binding Path=StatusText, RelativeSource={RelativeSource AncestorType={x:Type local:SiluForm}, Mode=FindAncestor}}" />
</Grid>
</Border>