I am just starting out with WPF, and I'm having an issue with the button not displaying properly.
At first I thought it might just be in debug mode, or something I accidentally changed in the project. However, I have created a new project, and the only thing I did was drag a Button from the Toolbox to the display. In addition, I built the release version, and executed the executable directly, and still had the same issue. I also tried making exactly the same project, but using .NET Framework instead of .NET Core, and it seems to be working just fine, so until someone helps me solve this issue I'll just use .NET Framework instead of Core.
In addition, I also tried updating VS to 16.6.5 and am still having the same issue.
What is happening is that the button displays normally at first, but as soon as I move the mouse over and off of it the color gets blurred and weird (see picture). In addition, in my original project I also had some radio buttons, for which the button part wasn't displaying after the mouse moved over it as well, although I suspect this issue has the same cause as the button so I'm concentrating on that for this post. I've also noticed that it reverts to normal after minimizing the window and reopening it, if that will help figure out what's happening.
I'm using Windows 10, and have Visual Studio Community 2019 16.6.5 installed. The project is a WPF .Net Core 3.1.302 C# project.
Here is the XAML code for my project, in MainWindow.xaml, although I haven't actually edited it, just simply dragged a button onto the display:
<Window x:Class="WPFFinalButtonTest.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:WPFFinalButtonTest"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Button Content="Button" HorizontalAlignment="Left" Margin="420,198,0,0" VerticalAlignment="Top"/>
</Grid>
</Window>