-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3004 from telerik/new-kb-radcheduleview-active-vi…
…ew-definition-full-width-feb0db3b11ad42308767ed4efb5a69e9 Added new kb article radcheduleview-active-view-definition-full-width
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
knowledge-base/kb-scheduleview-active-view-definition-full-width.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: Stretching Content Size to Maximum Width in RadScheduleView DayViewDefinition | ||
description: Learn how to extend the active view definition's width to use the full-screen width in RadScheduleView for WPF. | ||
type: how-to | ||
page_title: How to Use Full-Screen Width in RadScheduleView DayViewDefinition for WPF | ||
slug: kb-scheduleview-dayviewdefinition-full-width | ||
tags: scheduleview, wpf, dayviewdefinition, stretch, full width | ||
res_type: kb | ||
ticketid: 1671345 | ||
--- | ||
|
||
## Environment | ||
|
||
<table> | ||
<tbody> | ||
<tr> | ||
<td>Product</td> | ||
<td>RadScheduleView for WPF</td> | ||
</tr> | ||
<tr> | ||
<td>Version</td> | ||
<td>2024.4.1111</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
## Description | ||
|
||
How to stretch the view definition to fill the available space of the RadScheduleView control. | ||
|
||
## Solution | ||
|
||
To extend the content size of the RadScheduleView's active view definition, you can set its `MinTimeRulerExtent` property. This property allows you to set the minimum width of the `TimeRuler` in pixels when the active view definition's `Orientation` property is set to __Horizontal__. This ensures that the view utilizes the entire width. | ||
|
||
Here is an example code snippet to achieve the desired behavior: | ||
|
||
#### __[XAML]__ | ||
{{region scheduleview-dayviewdefinition-full-width-0}} | ||
<telerik:RadScheduleView x:Name="scheduleView" DataContext="{StaticResource MyViewModel}" AppointmentsSource="{Binding MyAppointments}"> | ||
<telerik:RadScheduleView.ViewDefinitions> | ||
<telerik:DayViewDefinition MinTimeRulerExtent="{Binding ElementName=scheduleView, Path=ActualWidth}"/> | ||
</telerik:RadScheduleView.ViewDefinitions> | ||
</telerik:RadScheduleView> | ||
{{endregion}} | ||
|
||
For more details on configuring the TimeRuler, refer to the [WPF ScheduleView - TimeRuler Configuration](https://docs.telerik.com/devtools/wpf/controls/radscheduleview/end-user-capabilities/timerulerconfiguration) documentation. | ||
|
||
## See Also | ||
- [RadScheduleView Overview](https://docs.telerik.com/devtools/wpf/controls/radscheduleview/overview) | ||
- [RadScheduleView End-User Capabilities](https://docs.telerik.com/devtools/wpf/controls/radscheduleview/end-user-capabilities/overview) |