Dropshadow and border color issue – Mahapps Metro WPF


the screenhots/examples at the quickstart are not quite updated.

you can have a border

<controls:MetroWindowx:Class="MahApps.Metro.Simple.Demo.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"Title="MainWindow"
Height="200"Width="600"BorderBrush="{DynamicResource AccentColorBrush}"BorderThickness="1"WindowStartupLocation="CenterScreen"></controls:MetroWindow>

enter image description here

or a glow border

<controls:MetroWindowx:Class="MahApps.Metro.Simple.Demo.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"Title="MainWindow"
Height="200"Width="600"GlowBrush="{DynamicResource AccentColorBrush}"WindowStartupLocation="CenterScreen"></controls:MetroWindow>

enter image description here

or a drop shadow

<controls:MetroWindowx:Class="MahApps.Metro.Simple.Demo.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"xmlns:behaviours="http://metro.mahapps.com/winfx/xaml/shared"
Title="MainWindow"Height="200"Width="600"ResizeMode="CanResizeWithGrip"WindowTransitionsEnabled="False"
WindowStartupLocation="CenterScreen"><i:Interaction.Behaviors><behaviours:BorderlessWindowBehaviorAllowsTransparency="False"
EnableDWMDropShadow="True"/><behaviours:WindowsSettingBehaviour/><behaviours:GlowWindowBehavior/></i:Interaction.Behaviors>
</controls:MetroWindow>

Update

EnableDWMDropShadow has been moved to MetroWindow in version 0.13 alpha (latest version)

<controls:MetroWindowx:Class="MahApps.Metro.Simple.Demo.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"xmlns:behaviours="http://metro.mahapps.com/winfx/xaml/shared"
Title="MainWindow"Height="200"Width="600"EnableDWMDropShadow="True"ResizeMode="CanResizeWithGrip"WindowTransitionsEnabled="False"
WindowStartupLocation="CenterScreen"></controls:MetroWindow>

enter image description here

For more info –

http://rehansaeed.co.uk/wpf-metro-part2-mahapps-metro/

hope that helps

Advertisements

One thought on “Dropshadow and border color issue – Mahapps Metro WPF

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s