question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DialogHost on MetroWindow causes rendering artifacts

See original GitHub issue

As you move your mouse around, or tab between different controls. Horizontal and vertical lines appear:

image

You can recreate the issue by adding a DialogHost to the MahAppsDragablzDemo MainWindow.xaml

<controls:MetroWindow x:Class="MahMaterialDragablzMashUp.MainWindow"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
                      xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
                      xmlns:mahMaterialDragablzMashUp="clr-namespace:MahMaterialDragablzMashUp"
                      xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
                      xmlns:wpf="http://materialdesigninxaml.net/winfx/xaml/themes"                      
                      WindowTransitionsEnabled="False"
                      TextElement.Foreground="{DynamicResource MaterialDesignBody}"
                      Background="{DynamicResource MaterialDesignPaper}"					  
                      GlowBrush="{DynamicResource AccentColorBrush}"					  
                      FontFamily="{StaticResource DefaultFont}"
                      Title="Material-MahApps-Dragablz Mash Up" Height="640" Width="800">
    
    <controls:MetroWindow.Flyouts>
        <controls:FlyoutsControl>
            <controls:Flyout x:Name="LeftFlyout" Position="Left" Header="Settings" wpf:FlyoutAssist.HeaderColorMode="Accent">
                <mahMaterialDragablzMashUp:FlyoutContent />
            </controls:Flyout>
        </controls:FlyoutsControl>
    </controls:MetroWindow.Flyouts>
    <controls:MetroWindow.LeftWindowCommands>
        <controls:WindowCommands>
            <wpf:PopupBox Style="{StaticResource WindowCommandsPopupBoxStyle}">
                <StackPanel>
                    <Button Content="Hello World"/>
                    <Button Content="Nice Popup"/>
                    <Button Content="Goodbye"/>
                </StackPanel>
            </wpf:PopupBox>
        </controls:WindowCommands>
    </controls:MetroWindow.LeftWindowCommands>

    <wpf:DialogHost IsOpen="True">
        <wpf:DialogHost.DialogContent>
            <DockPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20" FocusManager.IsFocusScope="True">
                <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button x:Name="Cancel" Style="{StaticResource MaterialDesignFlatButton}">Cancel</Button>
                    <Button x:Name="Add" Style="{StaticResource MaterialDesignFlatButton}">Add</Button>
                </StackPanel>
                <StackPanel Orientation="Vertical">
                    <TextBlock Margin="8" DockPanel.Dock="Top" Text="Dialog Test" TextWrapping="Wrap" Style="{StaticResource MaterialDesignHeadlineTextBlock}" />
                    <TextBox Text="Line 1" Margin="8,8,8,0" wpf:HintAssist.Hint="Test" Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
                    <TextBox Text="Line 2" Margin="8,8,8,0" wpf:HintAssist.Hint="Test" Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
                    <TextBox Text="Line 3" Margin="8,8,8,0" wpf:HintAssist.Hint="Test" Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
                </StackPanel>
            </DockPanel>
        </wpf:DialogHost.DialogContent>


        <dockablz:Layout>
            <dragablz:TabablzControl BorderThickness="0"
                                 Margin="0,-1,0,1">
                <dragablz:TabablzControl.InterTabController>
                    <dragablz:InterTabController />
                </dragablz:TabablzControl.InterTabController>
                <TabItem Header="DIALOGS">
                    <mahMaterialDragablzMashUp:Dialogs Margin="8">
                        <mahMaterialDragablzMashUp:Dialogs.DataContext>
                            <mahMaterialDragablzMashUp:DialogsViewModel />
                        </mahMaterialDragablzMashUp:Dialogs.DataContext>
                    </mahMaterialDragablzMashUp:Dialogs>
                </TabItem>
                <TabItem Header="MAHAPPS">
                    <mahMaterialDragablzMashUp:Mah Margin="16" />
                </TabItem>
                <TabItem Header="PALETTE">
                    <mahMaterialDragablzMashUp:PaletteSelector Margin="16">
                        <mahMaterialDragablzMashUp:PaletteSelector.DataContext>
                            <mahMaterialDragablzMashUp:PaletteSelectorViewModel />
                        </mahMaterialDragablzMashUp:PaletteSelector.DataContext>
                    </mahMaterialDragablzMashUp:PaletteSelector>
                </TabItem>
            </dragablz:TabablzControl>
        </dockablz:Layout>
    </wpf:DialogHost>
</controls:MetroWindow>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Toktercommented, Feb 26, 2019

@Keboo Couldn’t figure out in what version it changed yet. But I created a pull request that I think fixes the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found