Hi,@gokul krish. You could trigger the Margin of Border when the window is maximized to achieve the effect.
<Style TargetType="{x:Type local:Window1}">
<Setter Property="Background" Value="AliceBlue"/>
<Setter Property="BorderBrush" Value="LightSteelBlue"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome CornerRadius="0" CaptionHeight="90" GlassFrameThickness="0">
</WindowChrome>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<AdornerDecorator>
<DockPanel Focusable="False" LastChildFill="True" >
<Border x:Name="FloatWindowOutBorder" Focusable="False"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" >
<Border.Style>
<Style TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=WindowState}" Value="Maximized">
<Setter Property="Margin" Value="10" />
<Setter Property="BorderThickness" Value="0" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<Grid >
<ContentPresenter Name="ContentPresenter"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
Content="{TemplateBinding ContentControl.Content}"
/>
</Grid>
</Border>
</DockPanel>
</AdornerDecorator>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.