---
title: "DropShadow for WPF Borderless Window"  
description: "DropShadow for WPF Borderless Window"  
author: "marcel ethan"  
published: 2013-07-18  
updated: 2013-07-18  
canonical: https://www.mindstick.com/forum/1314/dropshadow-for-wpf-borderless-window  
category: "wpf"  
tags: ["wpf"]  
reading_time: 2 minutes  

---

# DropShadow for WPF Borderless Window

Hi !

I have a [WPF Window](https://www.mindstick.com/forum/1333/wpf-window-not-closing) with WindowStyle set to none. Is there some way I can force this window to [drop](https://www.mindstick.com/forum/159392/how-to-fetch-the-value-of-the-selected-options-in-drop-down-in-php) a [shadow](https://yourviews.mindstick.com/view/87467/muslims-are-destroying-hindu-villages-under-the-shadow-of-mamta-banerjee) (like the one you get when WindowStyle is not none)? I don't want to set AllowTransparency to [true](https://yourviews.mindstick.com/view/81326/boycott-chinese-products-dream-will-come-true), because it affects the performance. And I also don't want to [disable](https://www.mindstick.com/forum/12901/how-to-disable-enable-input-box-in-aspx-with-value-from-sql) [hardware](https://www.mindstick.com/blog/303100/best-pc-hardware-2023) rendering (I read somewhere that [transparency](https://www.mindstick.com/articles/336962/how-blockchain-technology-be-applied-to-improve-transparency-in-industries) [performs better](https://answers.mindstick.com/qa/95774/which-performs-better-google-adsense-mediavine-or-ezoic) with it disabled).

## Replies

### Reply by shreesh chandra shukla

Solution!

I have a [WPF](https://www.mindstick.com/forum/304/wpf) [Window](https://www.mindstick.com/forum/161285/how-does-the-window-console-object-work-in-javascript) with WindowStyle set to none. Is there some way I can force this window to drop a shadow (like the one you get when WindowStyle is not none)? I don't want to set AllowTransparency to true, because it affects the performance. And I also don't want to disable hardware rendering (I read somewhere that transparency performs better with it disabled).

Answer 8:-

I made this from XAML code. Try this, too:

```
<Window x:Class="CustomWPFWindowShaddow.MainWindow"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        Title="MainWindow" Height="215" Width="525" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True">    <Grid>        <Border BorderBrush="#FF006900" BorderThickness="3" Height="157" HorizontalAlignment="Left" Margin="12,12,0,0" Name="border1" VerticalAlignment="Top" Width="479" Background="#FFCEFFE1" CornerRadius="20, 20, 20, 20">            <Border.BitmapEffect>                <DropShadowBitmapEffect Color="Black" Direction="320" ShadowDepth="10" Opacity="0.5" Softness="5" />            </Border.BitmapEffect>            <TextBlock Height="179" Name="textBlock1" Text="Hello, this is a beautiful DropShadow WPF Window Example." FontSize="40" TextWrapping="Wrap" TextAlignment="Center" Foreground="#FF245829" />        </Border>    </Grid>    <Window.Background>        <SolidColorBrush />    </Window.Background>
```


---

Original Source: https://www.mindstick.com/forum/1314/dropshadow-for-wpf-borderless-window

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
