Back to Devexpress

ResourceTreeControl.GroupCellTemplate Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-resourcetreecontrol-a585be8a.md

latest4.0 KB
Original Source

ResourceTreeControl.GroupCellTemplate Property

Gets or sets the template that defines the presentation of resource groups. This is a dependency property.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
[Browsable(false)]
public DataTemplate GroupCellTemplate { get; set; }
vb
<Browsable(False)>
Public Property GroupCellTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A System.Windows.DataTemplate object that defines the presentation of resource groups.

|

Remarks

To enable synchronization with the ResourceTreeControl.Scheduler, use an editor shipped with the DevExpress Data Editors Library for WPF. Setting the editor’s Name to ‘ PART_Editor ‘ bounds the editor to a source field specified by the ResourceMappings.Group property of the SchedulerControl.DataSource.

See the example below.

xaml
<dxsch:ResourceTreeControl Name="resourceTreeControl" Scheduler="{Binding ElementName=scheduler}" >
             <dxsch:ResourceTreeControl.GroupCellTemplate>
                <DataTemplate>
                     <StackPanel Orientation="Horizontal">
                         <dxe:TextEdit x:Name="PART_Editor" FontSize="14" />
                    </StackPanel>
                 </DataTemplate>
            </dxsch:ResourceTreeControl.GroupCellTemplate>
        </dxsch:ResourceTreeControl>

        <dxsch:SchedulerControl x:Name="scheduler" GroupType="Resource">
            <dxsch:MonthView />
            <dxsch:TimelineView />
            <dxsch:SchedulerControl.DataSource>
                <dxsch:DataSource
                    AppointmentsSource="{Binding Appointments}"
                    ResourcesSource="{Binding Calendars}"
                    AppointmentLabelsSource="{Binding Labels}"
                    ResourceSharing="True">
                    <dxsch:DataSource.AppointmentMappings>
                        <dxsch:AppointmentMappings
                            Id="Id"
                            AllDay="AllDay"
                            Type="AppointmentType"
                            Start="Start"
                            End="End"
                            Subject="Subject"
                            Description="Description"
                            Location="Location"
                            ResourceId="CalendarIds"
                            RecurrenceInfo="RecurrenceInfo"
                            StatusId="Status"
                            LabelId="Label" />
                    </dxsch:DataSource.AppointmentMappings>
                    <dxsch:DataSource.ResourceMappings>
                        <dxsch:ResourceMappings Id="Id" Caption="Name" Visible="IsVisible" Group="Group" />
                    </dxsch:DataSource.ResourceMappings>
                    <dxsch:DataSource.AppointmentLabelMappings>
                        <dxsch:AppointmentLabelMappings Id="Id" Caption="Caption"/>
                    </dxsch:DataSource.AppointmentLabelMappings>
                </dxsch:DataSource>
            </dxsch:SchedulerControl.DataSource>
        </dxsch:SchedulerControl>

See Also

ResourceTreeControl Class

ResourceTreeControl Members

DevExpress.Xpf.Scheduling Namespace