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

Window loses shadow [EnableDWMDropShadow] #1791

Closed
arnoldpa opened this issue Feb 8, 2015 · 2 comments
Closed

Window loses shadow [EnableDWMDropShadow] #1791

arnoldpa opened this issue Feb 8, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@arnoldpa
Copy link

arnoldpa commented Feb 8, 2015

Hey,
i noticed the following (wrong) behavior:
The MetroWindow loses sometimes its shadow [EnableDWMDropShadow="True"] if the application loses the focus.
Sometimes if it shows a tooltip or e.g. a ComboBox shows it items.

The shadow does not come back until application restart.

OS: Win7 x64
MahApps.Metro: latest nuget - 1.0.1-ALPHA47

Screenshot:
image

Here is my minimal example:
MainWindow:

<controls:MetroWindow x:Class="WpfApplication1.MainWindow"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                      mc:Ignorable="d"
                      Title="MainWindow"
                      Height="350"
                      Width="525"
                      EnableDWMDropShadow="True"
                      BorderThickness="1"
                      BorderBrush="{DynamicResource AccentColorBrush}">
    <StackPanel Margin="15">
        <TextBlock Text="ComboBox 1"/>
        <ComboBox SelectedIndex="0" ToolTip="Hello world 1!">
            <ComboBoxItem>Item 1</ComboBoxItem>
            <ComboBoxItem>Item 2</ComboBoxItem>
            <ComboBoxItem>Item 3</ComboBoxItem>
            <ComboBoxItem>Item 4</ComboBoxItem>
        </ComboBox>

        <TextBlock Text="ComboBox 2"/>
        <ComboBox SelectedIndex="0" ToolTip="Hello world 2!">
            <ComboBoxItem>Item 1</ComboBoxItem>
            <ComboBoxItem>Item 2</ComboBoxItem>
            <ComboBoxItem>Item 3</ComboBoxItem>
            <ComboBoxItem>Item 4</ComboBoxItem>
        </ComboBox>
    </StackPanel>
</controls:MetroWindow>

App:

<Application x:Class="WpfApplication1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
@maheshniec
Copy link

Hi, EnableDWMDropShadow is still required for modal dialogs I presume. EnableDWMDropShadow is not working when window is not focused. Window glow should be blinked when user clicks on owner window when modal dialog is opened. But it is not happening.

@punker76
Copy link
Member

@maheshniec EnableDWMDropShadow is also working when window is not focused

2015-02-24_12h41_56
2015-02-24_12h42_06

you can create an issue for the blinking window...

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

No branches or pull requests

3 participants