我尝试使用style =" flat.etc .."设置参数。我也尝试过全局设置参数。从我可以通过谷歌找到的东西,似乎所有东西似乎都针对旧版本的Visual Studio,因为建议似乎不起作用,而且有些过时了。
这是我目前的XAML:
<Window x:Class="EmoticonPaste.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:EmoticonPaste"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="109*"/>
<ColumnDefinition Width="408*"/>
</Grid.ColumnDefinitions>
<Button Content="" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="72" Height="72" BorderThickness="0" Click="Button_Click_1" Grid.ColumnSpan="2">
<Button.Background>
<ImageBrush ImageSource="C:/Users/Jamie/Documents/Visual Studio 2017/Projects/EmoticonPaste/EmoticonPaste/img/1f600.png"/>
</Button.Background>
</Button>
<Button x:Name="button" Content="" Grid.Column="1" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="72" Click="button_Click_2" Height="72" Padding="1" BorderThickness="0">
<Button.Background>
<ImageBrush ImageSource="C:/Users/Jamie/Documents/Visual Studio 2017/Projects/EmoticonPaste/EmoticonPaste/img/1f601.png"/>
</Button.Background>
</Button>
</Grid>
</Window>
这是我想要停止发生的事情,完全禁用悬停效果,所以当它悬停在按钮上时,表情符号(设置为画笔 - >图像但不重要,我不会想到?)留在那里,它保持静态,根本没有突出显示按钮,我可以添加到XAML中以实现此目的吗?如果我能够为表格中的所有按钮(全局)
执行此操作,那将是一件好事