Skip to content

Commit

Permalink
Merge pull request #3004 from telerik/new-kb-radcheduleview-active-vi…
Browse files Browse the repository at this point in the history
…ew-definition-full-width-feb0db3b11ad42308767ed4efb5a69e9

Added new kb article radcheduleview-active-view-definition-full-width
  • Loading branch information
martinivanoff authored Dec 30, 2024
2 parents e47e5a9 + c135934 commit bf27e3a
Showing 1 changed file with 50 additions and 0 deletions.
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)

0 comments on commit bf27e3a

Please sign in to comment.