xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="NonRectangularWindowSample" Width="210" Height="170"
WindowStyle="None" AllowsTransparency="True" Background="Transparent">
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Input;
namespace Windows {
public partial class TransparentWithShapes : Window
{
public TransparentWithShapes()
{
InitializeComponent();
}
private void window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
}
private void cmdClose_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
}
}