毛伊岛应用程序中的动态工具提示放置位置已更改

问题描述 投票:0回答:1

目前我已将 xamarin 迁移到 MAUI 应用程序。要在毛伊岛自定义工具提示放置位置,无需再更改工具提示放置。如何自定义控件以更改工具提示放置位置和背景颜色。如果有任何样品,它将很有帮助并受到高度赞赏。

.net windows tooltip maui
1个回答
0
投票

要更改工具提示放置位置和背景颜色,您可以通过将以下代码添加到您的

Platforms/Windows/App.xaml

<maui:MauiWinUIApplication.Resources>
        <ResourceDictionary>
            <Style TargetType="ToolTip">
                <Setter Property="Placement"  Value="Right"></Setter>
                <Setter Property="Background" Value="Red"></Setter>
            </Style>
        </ResourceDictionary>
</maui:MauiWinUIApplication.Resources>
© www.soinside.com 2019 - 2024. All rights reserved.