目前我已将 xamarin 迁移到 MAUI 应用程序。要在毛伊岛自定义工具提示放置位置,无需再更改工具提示放置。如何自定义控件以更改工具提示放置位置和背景颜色。如果有任何样品,它将很有帮助并受到高度赞赏。
要更改工具提示放置位置和背景颜色,您可以通过将以下代码添加到您的
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>