Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual artifacts with .NET Core 3.1 #124

Closed
realflight1 opened this issue Jun 26, 2020 · 3 comments
Closed

Visual artifacts with .NET Core 3.1 #124

realflight1 opened this issue Jun 26, 2020 · 3 comments

Comments

@realflight1
Copy link

I created a new WPF .NET Core project using VS2019 and followed the quick start instructions in the README. When running the application I get the following (GIF):

modernwpfui_netcore

I am seeing similar issues with UseModernWindowStyle="False". Is .NET Core 3.1 supported?

My code -

App.xaml
<Application x:Class="WpfApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ui="http://schemas.modernwpf.com/2019"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ui:ThemeResources />
                <ui:XamlControlsResources />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
MainWindow.xaml
<Window x:Class="WpfApp1.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:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800"
        xmlns:ui="http://schemas.modernwpf.com/2019"
        ui:WindowHelper.UseModernWindowStyle="True">
    <ui:SimpleStackPanel Margin="12" Spacing="24">
        <TextBlock Text="My first ModernWPF app" Style="{StaticResource HeaderTextBlockStyle}" />
        <Button Content="I am a button" />
        <Button Content="I am an accent button" Style="{StaticResource AccentButtonStyle}" />
    </ui:SimpleStackPanel>
</Window>
@realflight1
Copy link
Author

Closing this as the issue is caused by external software, in my case Sonic Suite.
For more details see dotnet/wpf#707

@rocuh
Copy link

rocuh commented Jul 5, 2020

Just for anyone who finds this as mentioned in dotnet/wpf#707 you can set:

AllowsTransparency="True" WindowStyle="None" ui:WindowHelper.UseModernWindowStyle="True"

and that stops the corruption from occuring (at least for Nahimic DLL inject), some motherboard manufacturer install this with there realtek audio drivers. I've tested the audio drivers (Version 6.0.1.8496) for the ROG STRIX X370-F motherboard and it corrupts if the above is not set.

@DanielHoltebo
Copy link

Closing this as the issue is caused by external software, in my case Sonic Suite.
For more details see dotnet/wpf#707

^This solved all my issues @realflight1, also had the same problems with a Java application but deleting Sonic Suite solved everything! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants