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

How to prevent the slider drag out of the right side

2 Answers 105 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
rui
Top achievements
Rank 1
rui asked on 16 Jan 2018, 12:07 PM

my RadPropertyGrid size is fixed, and I do not want a horizontal scroll bar. so i set ScrollViewer.HorizontalScrollBarVisibility="Disabled"

when drag the slider (which can seperate the property and value) ,  can drag it out of the right side,

how to prevent this

2 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Stoyanov
Telerik team
answered on 19 Jan 2018, 10:59 AM
Hello,

What I can suggest is to find all of the thumbs that resize the RadPropertyGrid columns with the ChildrenOfType extension method. Then you can subscribe to their DragDelta event which is fired every time you try to resize the RadPropertyGrid columns and implement the logic for restricting the resizing there. I am attaching a sample project which demonstrates this approach for your reference. 

Regards,
Vladimir Stoyanov
Progress Telerik
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 allow you to write beautiful native mobile apps using a single shared C# codebase.
0
rui
Top achievements
Rank 1
answered on 23 Jan 2018, 08:06 AM

Great   this resolve my issue

Thank you much

Tags
PropertyGrid
Asked by
rui
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
rui
Top achievements
Rank 1
Share this question
or