Hi @Hui Liu-MSFT , The following is the XAML code. I use WindowStyle="None. I want that the window can be moved with the mouse.
<Window x:Class="Win.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Win"
xmlns:vm="clr-namespace:Win.ViewModels.MainWindow"
mc:Ignorable="d"
Height="450"
Width="600"
WindowStartupLocation="CenterScreen"
Background="White"
WindowStyle="None"
vm:MainWindowViewModel.AttProp="True">
<Window.DataContext>
<vm:MainWindowViewModel/>
</Window.DataContext>
<Grid>
<!--Definition of 3 rows-->
<Grid.RowDefinitions >
<RowDefinition Height="70"/>
<RowDefinition Height="130"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Grid.Row="0"
Margin="0,5,5,0"
Command="{Binding Cmd}"
CommandParameter="Close"/>
<Button Grid.Row="0"
Margin="0,5,30,0"
Command="{Binding Cmd}"
CommandParameter="Maximize"/>
<Button Grid.Row="0"
Margin="0,5,55,0"
Command="{Binding Cmd}"
CommandParameter="Minimize"/>
</Grid>
</Window>