xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="NonRectangularWindowSample" SizeToContent="WidthAndHeight"
MouseLeftButtonDown="NonRectangularWindow_MouseLeftButtonDown"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent">
//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Input
Namespace NonRectangularWindowSample
Public Partial Class NonRectangularWindow
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub NonRectangularWindow_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)
Me.DragMove()
End Sub
Private Sub closeButtonRectangle_Click(sender As Object, e As RoutedEventArgs)
Me.Close()
End Sub
End Class
End Namespace