This is a migrated thread and some comments may be shown as answers.

RadPropertyGrid Data Fields not resizing after Strech

5 Answers 138 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Basit
Top achievements
Rank 1
Basit asked on 24 Mar 2017, 09:44 AM

Hi!

PropertyGrid User Control:

01.<telerik:RadPropertyGrid x:Name="PropertyGrid1"
02.                              
03.            IsGrouped="True"
04.            RenderMode="Hierarchical"
05.            DescriptionPanelVisibility="Visible"
06.            SortAndGroupButtonsVisibility="Visible"
07.            LabelColumnWidth="80"
08.                              
09.            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
10.            ScrollViewer.VerticalScrollBarVisibility="Disabled">
11.    <telerik:RadPropertyGrid.PropertyDefinitions>
12.        <telerik:PropertyDefinition Binding="{Binding Salary}" Description="Displays the Width property of the RadButton" DisplayName="Width">
13.            <telerik:PropertyDefinition.EditorTemplate>
14.                <DataTemplate>
15.                    <telerik:RadNumericUpDown Value="{Binding Salary, Mode=TwoWay}" />
16.                </DataTemplate>
17.            </telerik:PropertyDefinition.EditorTemplate>
18.        </telerik:PropertyDefinition>
19.        <telerik:PropertyDefinition Binding="{Binding IsMarried}" Description="Displays the Height property of the RadButton" DisplayName="Married Count">
20.            <telerik:PropertyDefinition.EditorTemplate>
21.                <DataTemplate>
22.                    <telerik:RadSlider Value="{Binding IsMarried, Mode=TwoWay}" />
23.                </DataTemplate>
24.            </telerik:PropertyDefinition.EditorTemplate>
25.        </telerik:PropertyDefinition>
26.    </telerik:RadPropertyGrid.PropertyDefinitions>
27.</telerik:RadPropertyGrid>

 

Code Behind

01.public PropGrid()
02.{
03.    InitializeComponent();
04.    this.PropertyGrid1.Item = new Employee()
05.    {
06.        FirstName = "Sarah",
07.        LastName = "Blake",
08.        Occupation = "Supplied Manager",
09.        StartingDate = new DateTime(2005, 04, 12),
10.        IsMarried = 4,
11.        Salary = 3500,
12.    };
13.}

 

Start application and expand the whole window. Resize it back, propertyGrid doesnt adjust.

The root cause is the slider. If i remove the slider, everything works fine. For your reference, please see the attached project

Is this a bug?

5 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 29 Mar 2017, 07:20 AM
Hi Basit,

Please try setting the Minimum and Maximum values of the RadSlider, for example:

<telerik:RadSlider Value="{Binding Salary, Mode=TwoWay}" Minimum="1" Maximum="5000" />

This seems to fix the issue when resizing the control.

Regards,
Stefan Nenchev
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Basit
Top achievements
Rank 1
answered on 29 Mar 2017, 10:45 AM

No it doesn't. 

When you start the application, drag the slider to the maximum possible value. 

Now resize the window. Issue still remains.

0
Accepted
Stefan Nenchev
Telerik team
answered on 03 Apr 2017, 07:19 AM
Hello,

Indeed, the issue can be reproduced when you use the maximum value of the RadSlider. We will further investigate the behavior from our side. As a workaround, would it be convenient for you to set a fixed width of the RadSlider?

Regards,
Stefan Nenchev
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Basit
Top achievements
Rank 1
answered on 03 Apr 2017, 07:28 AM

Hi!

Well, I have dropped the use of RadSliders completely. Please keep us updated of the fix or updates.

 

Thank-you.

0
Stefan Nenchev
Telerik team
answered on 06 Apr 2017, 06:29 AM
Hi,

The issue is logged in our internal system and you can follow its progress on the following link from our Ideas & Feedback portal - RadSlider:  width does not lower according to the available width when Slider's maximum value is reached. You can click on "Follow this item" in order to receive notifications for future updates. 

Though you have decided not to use the RadSlider functionality, as a workaround you can use the default Slider control as it seems to work as expected in such scenario.

Regards,
Stefan Nenchev
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Slider
Asked by
Basit
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Basit
Top achievements
Rank 1
Share this question
or