<Window x:Class="Windows.ModernWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ModernWindow" Height="300" Width="300"
        AllowsTransparency="True" Background="Transparent"
        WindowStyle="None" ResizeMode="CanResizeWithGrip">
  <Border Width="Auto" Height="Auto" Name="windowFrame"
    
          BorderBrush="#395984"
          BorderThickness="1"
          CornerRadius="0,20,30,40" >
    <Border.Background>
      <LinearGradientBrush >
        <GradientBrush.GradientStops>
          <GradientStopCollection>
            <GradientStop Color="#E7EBF7" Offset="0.0"/>
            <GradientStop Color="#CEE3FF" Offset="0.5"/>
  
          </GradientStopCollection>
        </GradientBrush.GradientStops>
      </LinearGradientBrush>
    </Border.Background>
    <Grid>

      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
      </Grid.RowDefinitions>

      <TextBlock Text="Title Bar" Margin="1" Padding="5" MouseLeftButtonDown="titleBar_MouseLeftButtonDown"></TextBlock>
        <Grid Background="#B5CBEF" Grid.Row="1">
          <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
          </Grid.RowDefinitions>

          <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="20">Content Goes Here</TextBlock>
          <Button VerticalAlignment="Top" HorizontalAlignment="Center" Padding="10" Grid.Row="1" Click="cmdClose_Click">Close</Button>
          </Grid>

      <TextBlock HorizontalAlignment="Center" Grid.Row="2" Text="Footer" Margin="1,10,1,1" Padding="5"></TextBlock>

      <Rectangle Grid.RowSpan="3"
       Cursor="SizeWE" Fill="Transparent" Width="5" VerticalAlignment="Stretch" HorizontalAlignment="Right"
                 MouseLeftButtonDown="window_initiateWiden"
                 MouseLeftButtonUp="window_endWiden"
                 MouseMove="window_Widen"></Rectangle>

      </Grid>
    
    
  </Border>
</Window>
