Tooltip
是包含它的元素的一个属性(并且它不是您前面提到的父元素)
快速解决方法是
将宽度属性定义为资源
在您的窗口/页面中
然后在工具提示和包含元素中使用它
<!--Define a width as resource-->
<Window.Resources>
<sys:Double x:Key="WidthOf200">200</sys:Double>
</Window.Resources>
<Grid>
<!--Use the same width in the button and its tooltip-->
<Button Name="button1" ToolTipService.ShowOnDisabled="True" Content="Save" IsEnabled="False" Height="50" Width="{StaticResource WidthOf200}">
<Button.ToolTip>
<!--Use the same width in the button and its tooltip-->
<ToolTip Placement="Top" VerticalOffset="-5" Width="{StaticResource WidthOf200}">
<TextBlock >Confirm before save.</TextBlock>
</ToolTip>
</Button.ToolTip>
</Button>
</Grid>
</Window>