I try to remove the border of a WPF Window. In Window XP worked fine. In Windows 7 the title bar disappear (this is ok), but the window border didn't disappear: this is the problem.
The question: what I must to change to remove the border?
This is the XAML code:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" WindowStyle="None" >
<Grid>
<TextBlock Height="261" HorizontalAlignment="Left" Margin="55,29,0,0" Name="textBlock1" Text="Some text" VerticalAlignment="Top" Width="419" FontSize="36" />
</Grid>
</Window>
I attached a print screen bellow: enter image description here
brunnerh
188k30 gold badges363 silver badges434 bronze badges
asked Jul 27, 2012 at 7:59
Ionică Bizău
114k95 gold badges311 silver badges491 bronze badges
2 Answers 2
Set ResizeMode to NoResize:
<Window ... WindowStyle="None" ResizeMode="NoResize">
answered Jul 27, 2012 at 8:05
Clemens
129k13 gold badges163 silver badges296 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
You can set AllowsTransparency="True" and the border will disappear
answered Jul 27, 2012 at 8:12
MrBassam
3591 gold badge6 silver badges19 bronze badges
Comments
lang-xml