我有它的提示被綁定到一個TextBlock.Text一個按鈕,一個簡單的WPF應用程序:空提示的問題
<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>
在的button1_Click,我有:
textBlock1.Text = null;
我的預期沒有工具提示點擊按鈕後的按鈕。不過,我收到了一個emty工具提示。我該如何解決?
如果你使用代碼背後無論如何你不能直接設置工具提示嗎?如果沒有,你可能不得不使用更復雜的模板/構造(WPF元素)作爲工具提示,那麼字符串 – Carsten