WPF WIndow with RadPropertyGrid and UserControl . FullScreen

0 Answers 89 Views
LayoutControl PropertyGrid
Sudeshna
Top achievements
Rank 1
Sudeshna asked on 06 Feb 2023, 04:11 PM

Hi,

I have a window that has a RadPropertyGrid and UserControl that contains five buttons. I want to make the screen full while clicking on maximize button. Now as I have fixed height and width. Maximize button is not working. Can you please help me out.

<Window x:Class="WPF.Views.NoteEdit"
        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:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:customcontrol="clr-namespace:WPF.CustomControl"
        xmlns:local="clr-namespace:WPF.Views"
        mc:Ignorable="d"
        x:Name="vwNoteEditWindow"
        Title="NoteEdit" Height="680" Width="750">
    <Grid Height="564" VerticalAlignment="Top" >
        <Grid HorizontalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <telerik:RadLayoutControl
                Name="PropertyGridContainer"
                Margin="5"
                VerticalAlignment="Top"
                HorizontalAlignment="Center"              
                BorderThickness="0"
                Orientation="Vertical">
            </telerik:RadLayoutControl>
        </Grid>

        <Grid VerticalAlignment="Bottom">
            <customcontrol:RadPropertyWindowButtons x:Name="ucPropertyButtons" Height="44" VerticalAlignment="Top" HorizontalAlignment="Center" Loaded="RadPropertyWindowButtons_Loaded" CustomCancelClick="btn_Cancel_Click" CustomExitClick="btn_Exit_Click" />
        </Grid>
    </Grid>
</Window>

 

User control :

<UserControl x:Class="WPF.CustomControl.RadPropertyWindowButtons"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:NPTS_WPF.CustomControl"
             xmlns:fa="http://schemas.fontawesome.io/icons/"
             mc:Ignorable="d" 
             d:DesignHeight="45" d:DesignWidth="700">
    <Grid>
        <Grid Uid="radpropertybuttons" Height="39" VerticalAlignment="Bottom" Margin="74,0,-108,0">
            <Button x:Name="btnNormal_Cancel" Margin="0,0,600,10" HorizontalAlignment="Right" Width="80" Height="25" VerticalAlignment="Bottom">
            </Button>

            <Button x:Name="btnNormal_Accept" Margin="0,0,500,10" HorizontalAlignment="Right" Width="80" Height="25" VerticalAlignment="Bottom">
            </Button>

            <Button x:Name="btnNormal_Imperial"  Margin="0,0,370,10" HorizontalAlignment="Right" Width="110" Height="25" VerticalAlignment="Bottom">
            </Button>

            <Button x:Name="btnNormal_Exit" Margin="0,0,270,10" HorizontalAlignment="Right" Width="80" Height="25" VerticalAlignment="Bottom">
            </Button>

            <Button x:Name="btnNormal_Clone" Margin="0,0,170,10" HorizontalAlignment="Right" Width="80" Height="25" VerticalAlignment="Bottom">

            </Button>
        </Grid>

    </Grid>
</UserControl>
Martin Ivanov
Telerik team
commented on 08 Feb 2023, 12:01 PM

Hello Sudeshna,

I can't see any Telerik components in this code. Also, even if you set Width and Height of a Window, when the Maximize button is clicked, the window will get stretched on the full screen. However, if the Window children have fixed Width and Height, even if the window is maximized, the child components will stay with the same size as their Width and Height states.

No answers yet. Maybe you can help?

Tags
LayoutControl PropertyGrid
Asked by
Sudeshna
Top achievements
Rank 1
Share this question
or