C# 如何更改TabItem的光标
我试图更改TabItem光标,但它仅在鼠标悬停在按钮上时才会更改。控制区域的其余部分仍显示“箭头”光标。如何解决这个问题C# 如何更改TabItem的光标,c#,.net,wpf,xaml,C#,.net,Wpf,Xaml,我试图更改TabItem光标,但它仅在鼠标悬停在按钮上时才会更改。控制区域的其余部分仍显示“箭头”光标。如何解决这个问题 <Window x:Class="WpfApplication4.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
<Window x:Class="WpfApplication4.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<TabControl>
<TabItem Header="Tab" Cursor="Wait">
<Button Content="qwe" Height="25" />
</TabItem>
</TabControl>
</Window>
你可以把你的
按钮
放在一个可以伸展的地方,以填满整个可用空间
<TabControl>
<TabItem Header="Tab" Cursor="Wait">
<Grid Background="Transparent">
<Button Content="qwe" Height="25" />
</Grid>
</TabItem>
</TabControl>
在本例中类似于网格
,但请注意,您需要将背景
指定给类似于透明
的对象,否则它将不可见