WPF工具提示控件模板不显示内容

WPF工具提示控件模板不显示内容,wpf,xaml,tooltip,controltemplate,contentpresenter,Wpf,Xaml,Tooltip,Controltemplate,Contentpresenter,我已将以下控件模板和样式设置为应用程序中所有工具提示的默认样式: <Style TargetType="{x:Type ToolTip}"> <!-- Background="Transparent" BorderBrush="Transparent" BorderThickness="0" HasDropShadow="True" --> <Setter Property="Background" Value="Transparent" />

我已将以下控件模板和样式设置为应用程序中所有工具提示的默认样式:

<Style TargetType="{x:Type ToolTip}">
    <!-- Background="Transparent" BorderBrush="Transparent" BorderThickness="0" HasDropShadow="True" -->
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="OverridesDefaultStyle" Value="true" />
    <Setter Property="Placement" Value="Bottom"></Setter>
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate>
                <Grid Background="{Binding Source={x:Static visualResources:ThemeManager.Instance}, Path=ThemePageColor}" >
                    <ContentPresenter Margin="3"></ContentPresenter>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

(上面的代码在Window.Resources中)

在同一个窗口中,我有一个控件:

<Button ToolTip="Tooltip Text!" HorizontalContentAlignment="Right" Height="60" Click="_Button_AddCourse_Click"/>

但是当我运行我的程序时,工具提示并不像它们应该的那样出现!我只能看到一个橙色矩形(它是controltemplate中的网格,橙色是ThemeManager.Instance.ThemePageColor属性),但工具提示中没有文本


提前谢谢。

抱歉,我正试图在手机上匆忙完成此操作,并错误地将其添加到评论中

无论如何,只需将
更改为
,这样它就可以知道您的
内容演示者
想要与之交谈的内容,您应该表现得很好

希望这有帮助,干杯


备注-马克回答了这样的问题,这样人们就知道你的问题已经解决。

更改为
哇,这很有效。谢谢:)