Skip to main content

SchedulerItemBaseMappings.ResourceId Property

Specifies the mapping that binds the appointment’s SchedulerItemBase.ResourceId and AppointmentItem.ResourceIds properties to the data source field.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.1.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

public Mapping ResourceId { get; set; }

Property Value

Type Description
Mapping

A DevExpress.Xpf.Scheduling.Mapping object that specifies the bound data field and converter.

Remarks

Use the ResourceId property to bind the appointment’s SchedulerItemBase.ResourceId and SchedulerItemBase.ResourceIds properties to a data field. The data field is obtained from the data source specified by the DataSource.AppointmentsSourceProperty property.

The bound data field should contain either a collection of resource identifiers or a string in the XML format. If you plan to use a custom storing format, use the Mapping.Converter property to register a custom value converter.

If resources are shared (the DataSource.ResourceSharing option is true in a data-bound mode, or several resource identifiers are added to the SchedulerItemBase.ResourceIds collection), the mapped data field contains a string in XML format. Since resource identifiers are objects, they are base-64 encoded.

The following string is the content of a data field mapped with the ResourceId mapping if Resources is switched on. An appointment is associated with resources having identifiers 1,2 and 3.

<ResourceIds>
<ResourceId Value="~Xtra#Base64AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAIAAAAL" />
<ResourceId Value="~Xtra#Base64AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAEAAAAL" />
<ResourceId Value="~Xtra#Base64AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAMAAAAL" />
</ResourceIds>

Set the SchedulerCompatibility.Base64XmlObjectSerialization to false to stop base64 serialization. In this situation the stored XML string changes as follows:

<ResourceIds>
<ResourceId Type="System.Int32" Value="2" />
<ResourceId Type="System.Int32" Value="1" />
<ResourceId Type="System.Int32" Value="3" />
</ResourceIds>

The following code snippets (auto-collected from DevExpress Examples) contain references to the ResourceId property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also