0
使用以下代碼段並根據需要從父元素網格中顯示工具提示。不幸的是,它不顯示工具提示。如何在子控件中顯示工具提示父項值
<Grid Name="EmployeeValueGrid">
<TextBlock Text="Employee Department"
TextWrapping="Wrap">
<TextBlock.ToolTip>
<TextBlock Text="{Binding Path=Title, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}" />
</TextBlock.ToolTip>
</TextBlock>
</Grid>
我該如何實現這個目標?
這顯然你所說的是正確的。它也在工作。假設我的tootip有很長的內容,所以我決定在文本框內顯示我在帖子中顯示的位置。該案件不起作用。 – Smaug