This is a migrated thread and some comments may be shown as answers.
ScheduleView size - fit to width
10 Answers 169 Views
This is a migrated thread and some comments may be shown as answers.
XamlmaX2
Top achievements
Rank 1
XamlmaX2 asked on 16 Feb 2011, 09:41 AM
Is there any way to get the scheduleview to fit the width of it's container or does it have to be a fixed width?
When I put it inside a ScrollViewer it doesn't display scrollbars unless I set the width explicitly.
Is this something that will be fixed in the future?
Thanks

10 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 18 Feb 2011, 09:15 AM
Hello Pete,

RadScheduleView should not be placed in ScrollViewer because ScrollViewer will measure it with infinity and this will disable schedule view virtualization. Also ScheduleView has its own scroll bars and will show them when needed.

Let us know if you need more information.

All the best,
George
the Telerik team
0
XamlmaX2
Top achievements
Rank 1
answered on 18 Feb 2011, 11:03 AM
So that means that the ScheduleView has to have fixed dimensions?
0
Accepted
hwsoderlund
Top achievements
Rank 1
answered on 18 Feb 2011, 03:08 PM
Not at all. Just place it inside a Grid or a Border and it will adapt itself to the space available, and show scrollbars as necessary. But if you place it in a Grid, make sure you do not set the size of the Row/Column to Auto. If you do it will assume that the available space is endless.
0
XamlmaX2
Top achievements
Rank 1
answered on 18 Feb 2011, 03:53 PM
Great! That's helped a lot. Thanks!
0
Vitaly
Top achievements
Rank 1
answered on 13 May 2011, 07:01 PM
I have placed it inside a Grid and it still does not adjust. I can see both vertical and horizontal scroll bars, but what I really need is fit it to the width of the window, which it still doesn't do. What do I need to set to make it behave the way I need?
0
Hristo
Telerik team
answered on 16 May 2011, 08:43 AM
Hi Vitaly,

If you have placed RadScheduleView in a Grid and you see the ScrollBars then this means that control needs more width/height than available and will occupy/fill the available area.

What do you mean with it still doesn't fit?

Kind regards,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vitaly
Top achievements
Rank 1
answered on 16 May 2011, 07:34 PM
I expected the control to adjust its columns to fit within the window without scroll bars. Is that possible or it will not adjust less then a certain width?
0
Hristo
Telerik team
answered on 17 May 2011, 10:12 AM
Hi Vitaly,

The columns will adjust only if there is more space then needed. If the space is not enough then we will show the scrollbars.
With 2011 Q1 Service pack 1 we added new properties which controls scrollbars visibility. If you want you can always hide the scrollbars but then RadScheduleView will be clipped if there is not enough space.

Best wishes,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eric Meehan
Top achievements
Rank 1
answered on 01 Feb 2012, 04:50 PM
My team and I would very much appreciate the ability to have the ScheduleView fit its container without scrollbars. Is this something that has been developed since this discussion took place? I would also be interested in hearing about any known workarounds to acheive this.

Thanks,
Eric
0
Yana
Telerik team
answered on 06 Feb 2012, 10:21 AM
Hi Eric,

This could be achieved by setting MinTimeRulerExtent and MaxTimeRulerExtent properties of the ViewDefinitions of RadScheduleView:

<telerik:RadScheduleView>      
    <telerik:RadScheduleView.ViewDefinitions>
        <telerik:DayViewDefinition x:Name="dvd"  />
        ...
        </telerik:RadScheduleView.ViewDefinitions>
       ....
</telerik:RadScheduleView>

dvd.MinTimeRulerExtent = 20d;
dvd.MaxTimeRulerExtent = Double.PositiveInfinity;

You can check here for more information about TimeRuler configuration.

All the best,
Yana
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Asked by
XamlmaX2
Top achievements
Rank 1
Answers by
George
Telerik team
XamlmaX2
Top achievements
Rank 1
hwsoderlund
Top achievements
Rank 1
Vitaly
Top achievements
Rank 1
Hristo
Telerik team
Eric Meehan
Top achievements
Rank 1
Yana
Telerik team
Share this question
or