I have a simple WPF application with a button whose tooltip is bound to TextBlock.Text:
<Grid>
<Button Height="23" Margin="82,0,120,105" Name="button1" VerticalAlignment="Bottom" ToolTip="{Binding ElementName=textBlock1,Path=Text}" Click="button1_Click">Button</Button>
<TextBlock Height="23" Margin="64,55,94,0" Name="textBlock1" VerticalAlignment="Top" Text="AD" />
</Grid>
In button1_Click, I have:
textBlock1.Text = null;
I did not expect a tooltip for the button after clicking the button. However, I get an emty tooltip. How to fix it?
source
share