'WPF - Resize window from user control on run time

My application works with main window and user controls for every view. the main window have default size. I want that one of the user controls will change its size when entering the view. when i change the size with local it changes the user control and not the width and height of the window.

Main window :

<Window x:Class="EEPromTool2.View.MainMenu"
        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:viewmodels="clr-namespace:EEPromTool2.ViewModel"
        xmlns:views="clr-namespace:EEPromTool2.View"
        xmlns:local="clr-namespace:EEPromTool2.View"
        Background="#191919"
        WindowStyle="None"
        ResizeMode="CanResizeWithGrip" AllowsTransparency="True"
        mc:Ignorable="d"
        Title="EEPROM Tool" Height="680" Width="1000"
        >

User control :

<UserControl x:Class="EEPromTool2.View.Revision"
        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"

        mc:Ignorable="d"
        d:DesignHeight="900"
        d:DesignWidth="1300"   
        >

Thanks for any advice.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source