I am trying to display tool tip to a stack panel based on property HasValidationError.
<Style TargetType="StackPanel" x:Key="stackstyle">
<Style.Triggers>
<DataTrigger Binding="{Binding HasValidationError}" Value="True">
<Setter Property="ToolTip">
<Setter.Value>
<Binding Path="DisplayError"/>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
The code works fine. But it displays the tooltip under yellow background ( as normal tooltip). I need to customize it to change and include image. For that,
<Style TargetType="StackPanel" x:Key="stackstyle">
<Style.Triggers>
<DataTrigger Binding="{Binding HasValidationError}" Value="True">
<Setter Property="ToolTip">
<Setter.Value>
<StackPanel>
<!-- Have to add image and other decorations here -->
<TextBlock Text = "{Binding DisplayError}"/>
</StackPanel>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
It shows error when adding StackPanel to the . Please help me in solving.