Back to Devexpress

AppointmentIntervalSubjectPresenter Class

wpf-devexpress-dot-xpf-dot-scheduling-dot-visual-6a546860.md

latest5.4 KB
Original Source

AppointmentIntervalSubjectPresenter Class

Displays the text which is a combination of the SchedulerItemBase.Start, SchedulerItemBase.End and AppointmentItem.Subject values.

Namespace : DevExpress.Xpf.Scheduling.Visual

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public class AppointmentIntervalSubjectPresenter :
    FastTextBlock,
    INotifyDependencyPropertyChanged
vb
Public Class AppointmentIntervalSubjectPresenter
    Inherits FastTextBlock
    Implements INotifyDependencyPropertyChanged

Remarks

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

The base FastTextBlock class provides better display performance by rendering text at the glyph level.

Tip

Assign the AppointmentIntervalSubjectPresenter element to the AppointmentContentPanel.IntervalSubject property.

Example

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.

View Example

xaml
<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>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AppointmentIntervalSubjectPresenter class.

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.

wpf-scheduler-customize-appointment-appearance/CS/CustomizeAppointmentExample/MainWindow.xaml#L32

xml
<dxschv:AppointmentContentPanel.IntervalSubject>
    <dxschv:AppointmentIntervalSubjectPresenter/>
</dxschv:AppointmentContentPanel.IntervalSubject>

Inheritance

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement FastTextBlock AppointmentIntervalSubjectPresenter

See Also

AppointmentIntervalSubjectPresenter Members

DevExpress.Xpf.Scheduling.Visual Namespace