AppointmentDescriptionPresenter Class

Displays the AppointmentItem.Description text.

Namespace: DevExpress.Xpf.Scheduling.Visual

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

Declaration

public class AppointmentDescriptionPresenter :
    FastTextBlock,
    INotifyDependencyPropertyChanged
Public Class AppointmentDescriptionPresenter
    Inherits FastTextBlock
    Implements INotifyDependencyPropertyChanged

Remarks

The AppointmentDescriptionPresenter element is the FastTextBlock class descendant whose FastTextBlock.Text property is bound to the Description property of the appointment content presenter.

The base FastTextBlock class provides better display performance by rendering text at the glyph level. The AppointmentDescriptionPresenter.SeparatorBrush and AppointmentDescriptionPresenter.SeparatorThickness properties allow you to specify a separator line at the top of the text block.

NOTE

The AppointmentDescriptionPresenter element is hidden by default. Apply the style with the AppointmentControlBase.ShowDescription set to true to display it.

TIP

Assign the AppointmentDescriptionPresenter element to the AppointmentContentPanel.Description property.

Examples

This code describes a custom template used to display appointment information in the AppointmentControl. The template is applied explicitly in the Day View by assigning its x:Key to the DayViewBase.AppointmentContentTemplate property.

<DataTemplate x:Key="appointmentContentTemplate">
    <dxschv:AppointmentContentPanel>
        <dxschv:AppointmentContentPanel.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0, 1">
                <GradientStop Color="White" Offset="0" />
                <GradientStop Color="Transparent" Offset="0.5" />
            </LinearGradientBrush>
        </dxschv:AppointmentContentPanel.Background>
        <dxschv:AppointmentContentPanel.IntervalSubject>
            <dxschv:AppointmentIntervalSubjectPresenter/>
        </dxschv:AppointmentContentPanel.IntervalSubject>
        <dxschv:AppointmentContentPanel.Location>
            <dxschv:AppointmentLocationPresenter FontWeight="Normal" Foreground="Blue" />
        </dxschv:AppointmentContentPanel.Location>
        <dxschv:AppointmentContentPanel.Description>
            <StackPanel>
                <dxschv:FastTextBlock Text="{Binding Appointment.CustomFields[Note]}" FontWeight="Normal" Foreground="Red"/>
                <dxschv:AppointmentDescriptionPresenter FontWeight="Normal" Margin="0,1,0,0" WordWrap="True"/>
            </StackPanel>
        </dxschv:AppointmentContentPanel.Description>
        <dxschv:AppointmentContentPanel.Images>
            <dxschv:AppointmentImagesPanel/>
        </dxschv:AppointmentContentPanel.Images>
    </dxschv:AppointmentContentPanel>
</DataTemplate>
See Also