As shown in the verified code, set the Background of the Window to the image brush. Notice AllowsTransparency = "True" and WindowStyle = "None" to remove the border.
<Window x:Class="khaosInstallerWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="616" Width="773"
ResizeMode="NoResize" Icon="images/khaos_Installer_UI.png"
AllowsTransparency="True" WindowStyle="None">
<Window.Background>
<ImageBrush ImageSource="images\khaos_Installer_UI.png"/>
</Window.Background>
<Grid Margin="0,0,0,0"></Grid>
</Window>
Bonus: if you use a form to make sure that your form is being dragged
namespace khaosInstallerWPF
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
MouseDown += delegate { DragMove(); };
}
}
}
source
share