Telerik Forums
UI for WPF Forum
0 answers
74 views

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>
Sudeshna
Top achievements
Rank 1
 asked on 06 Feb 2023
1 answer
38 views

I am developing HMI Tool using Layoutcontrol.

I added Control(Button) to LayoutControl using LayoutControlToolBoxView.

What should I do if I want to receive the button's Event?

Stenly
Telerik team
 answered on 30 Dec 2022
0 answers
63 views
i want to add a cubic bezier curve to a canvas with a start point and an end point, i cant do it in the xaml it has to be in the c# because the points are constantly changing
Conrad
Top achievements
Rank 1
 asked on 22 Oct 2022
1 answer
243 views

Hi, I'm new to Telerik and have the following problem.
I am currently using the LayoutControlSplitter.

The problem is that if I move the splitter right to the end of the window it goes outside the window.

Code:

 <Grid>    
<telerik:RadLayoutControl>   
<telerik:LayoutControlExpanderGroup Header="Expander group" />           
<telerik:LayoutControlSplitter />            
<Button Content="Button" />        
</telerik:RadLayoutControl>
</Grid>

How can I fix the problem? Thank you very much!

Vladimir Stoyanov
Telerik team
 answered on 26 Aug 2020
1 answer
33 views

I've like to start with a blank LayoutControl and allow a user to drop UI Elements onto it.  Are there any examples on how this could be done?

Thanks

 

Vladimir Stoyanov
Telerik team
 answered on 28 Feb 2020
5 answers
197 views

Hello,

I have a View which I want to split into 4 sub-parts, flexibly. To do this I tried to take advantage of the RadLayoutControl. In one of the 4 sub-, I place a RadGridView which binds to a collection giving it exactly 1000 rows. The performance with this configuration is terrible, and not usable.

If I comment out the usage of the RadLayoutControl and it's sub-elements, and just show the same GridView, the performance is fine.

I am aware of the performance restrictions on the RadGridView, please see:

https://docs.telerik.com/devtools/wpf/controls/radgridview/troubleshooting/performance
https://docs.telerik.com/devtools/wpf/controls/radgridview/performance/tips-tricks
which are somewhat redundant as they show the same information.

Most likely the "problem" is:
RadGridView is placed in a control that measures its children with infinity - such controls are:
ScrollViewer
StackPanel (when vertical it measures with infinite height and when horizontal - with infinite width)
Grid with RowDefinition Height="Auto" or ColumnDefinition Width="Auto".

I do not place the GridView in any Grid where Height="Auto" or ColumnDefinition Width="Auto".
However, looking at the visual trees in snoop, it is clear that "LayoutControlGroup", "LayoutControlExpanderGroup" etc. all add their own Grids and ScrollViewers.

How can I then put a GridView inside of a nested set of Layout Controls and get it to work normally?

For your information, my nested Layout Controls are very similar to those in the Demo Code Samples for "Layout Control", "First Look". Nothing special.

Thanks,
Mark

Mark
Top achievements
Rank 1
 answered on 15 Nov 2019
1 answer
479 views

Hi, I have a hierarchy that looks something like this:

<RadLayoutControl>

  <LayoutGroup>

    <LayoutExpanderGroup>
      <SomeControl/>
    </LayoutExpanderGroup>

    <LayoutExpanderGroup>

      <RadGridView/>

    </LayoutExpanderGroup>

  </LayoutGroup>

</RadLayoutControl>

My RadGridView has many columns and rows and so causes the entire <RadLayoutControl> to scroll.  Is it possible to configure this view so that only the <LayoutExpanderGroup> that contains the <RadGridView> will scroll?

Any help would be appreciated.

Vladimir Stoyanov
Telerik team
 answered on 17 Apr 2019
6 answers
293 views

Hello

 

how can I set custom color to the HeaderBackground property of the RadLayoutControl (LayoutControlExpanderGroup)?

I tried similar way for setting implicit styles mechanism like setting the HeaderBackground of RadLayoutControl, but this not work:

<Style TargetType="telerik:RadLayoutControl" BasedOn="{StaticResource RadLayoutControlStyle}">
    <Setter Property="HeaderBackground" Value="Yellow" />
</Style>

 

It can not be difficult, but I do not find anything in the documentation.

Thanks for any help.

Birgit

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Nov 2018
1 answer
71 views

I'm using a RadLayoutControl on my page to group data into different groups.  I like the panel look and wanted to use that.  The problem I'm having is I want a certain LayoutControlExpanderGroup to fill in remaining space so that when a window resizes all the groups fill out one row of space.  Just wondering if there's similar functionality to the dock panel where I can set the container to LastChildFill="true" and the last container in the dock panel uses up all the remaining space.

 

Daniel
Top achievements
Rank 1
 answered on 31 Oct 2018
5 answers
53 views

Hello,

I was wondering if there's a simple way to limit at max 6 items the number of items present inside a LayoutControl? I've added a control inside my ViewModel and I avoid adding more if the Count reaches 6 but the whole space is not occupied

 

Thanks in advance

Stefan
Telerik team
 answered on 16 Aug 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?