Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 2.02 KB

README.md

File metadata and controls

66 lines (51 loc) · 2.02 KB

FlatWindow

A reusable, simple flat window control for WPF

Screenshot:

screenshot

Usage:

Install-Package FlatWindow

Add a new Window to your project, then remove the inheritance (: Window) in the .cs file and replace the XAML. The files should look like this:

	public partial class MainWindow
	{
		public MainWindow()
		{
			InitializeComponent();
		}
	}
<simply:FlatWindow x:Class="WindowTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:simply="clr-namespace:Simply;assembly=FlatWindow"
        Title="My Flat Window" Height="250" Width="450">
	<Grid>
		<TextBlock Text="Here goes the content!"/>
	</Grid>
</simply:FlatWindow>

cheers!

Customize:

Add Brushes with the Keys "WindowBackground" and "CaptionColor" to your window resource dictionary

<SolidColorBrush x:Key="WindowBackground" Color="Black" />
<SolidColorBrush x:Key="CaptionColor" Color="White" />
<Style x:Key="CaptionStyle" TargetType="TextBlock">
    <Setter Property="FontSize" Value="12"/>
    <Setter Property="HorizontalAlignment" Value="Center"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
</Style>

Credit:

  • The guys at Microsoft for their WPF Shell Integration Library, especially LesterLobo for his Article
  • Silberfab: BorderLess Window on CodePlex
  • Magnus Montin: Article on his blog
<script type="text/javascript"> (function () { var nb = document.createElement('script'); nb.type = 'text/javascript'; nb.async = true; nb.src = 'http://s.prabir.me/nuget-button/0.2.1/nuget-button.min.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(nb, s); })(); </script>