Windows Transparent Background : Window Style « Windows Presentation Foundation « VB.Net Tutorial






<Window x:Class="Windows.TransparentBackground"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Windows" Height="300" Width="300"
    WindowStyle="None" AllowsTransparency="true">
  <Window.Background>    
    <ImageBrush ImageSource="c:\image.png"></ImageBrush>
  </Window.Background>
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
      </Grid.RowDefinitions>
      <Button Margin="20" Grid.Row="2">Close</Button>   
    </Grid>
</Window>


//File:Window.xaml.vb
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Shapes

Namespace Windows
  Public Partial Class TransparentBackground
    Inherits System.Windows.Window
    Public Sub New()
      InitializeComponent()
    End Sub

  End Class
End Namespace
WPF Windows Transparent Background








16.59.Window Style
16.59.1.Change window cursorChange window cursor
16.59.2.Non-Rectangular windowNon-Rectangular window
16.59.3.Transparent WindowTransparent Window
16.59.4.Create a non-rectangular windowCreate a non-rectangular window
16.59.5.Windows Transparent BackgroundWindows Transparent Background