# C1.WPF.Schedule.AppointmentsCoverPane

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Schedule_AppointmentsCoverPane" data-uid="C1.WPF.Schedule.AppointmentsCoverPane" class="text-break">AppointmentsCoverPane Class
</h1>
  <div class="markdown level0 summary"><p>Provides a surface for painting appointment boxes over an arbitrary visual
intervals layout.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.visual">Visual</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></div>
    <div class="level4"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.control">Control</a></div>
    <div class="level5"><a class="xref" href="C1.WPF.Schedule.CoverElementsPane.html">CoverElementsPane</a></div>
    <div class="level6"><span class="xref">AppointmentsCoverPane</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.animation.ianimatable">IAnimatable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iframeworkinputelement">IFrameworkInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iinputelement">IInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iqueryambient">IQueryAmbient</a></div>
    <div><span class="xref">IWeakEventListener</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Schedule.html">C1.WPF.Schedule</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Schedule.dll</h6>
  <h5 id="C1_WPF_Schedule_AppointmentsCoverPane_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class AppointmentsCoverPane : CoverElementsPane, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IWeakEventListener</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class AppointmentsCoverPane
    Inherits CoverElementsPane
    Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IWeakEventListener</code></pre>
  </div>
  <h5 id="C1_WPF_Schedule_AppointmentsCoverPane_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p><a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.html">AppointmentsCoverPane</a> allows you to visually represent a set of appointments
that fit in a time range exposed by a current view, and to draw appointment boxes
relative to UI elements representing <a class="xref" href="C1.WPF.Schedule.VisualInterval.html">VisualInterval</a>s covered by the appointment.
The <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.html">AppointmentsCoverPane</a> element, being placed somewhere inside
<a class="xref" href="C1.WPF.Schedule.C1Scheduler.html">C1Scheduler</a> visual tree (usually in C1Scheduler's ControlTemplate),
provides a surface where it draws appointment boxes relative to UI elements
representing VisualIntervals. AppointmentsCoverPane is capable to recognize the
case when the appointment box must be divided into two or more visual boxes,
for example, if appointment covers three days in the Working Week View,
AppointmentsCoverPane will automatically draw three boxes for the appointment,
each box in a corresponding day column, with starting and ending edges positioned
at interval UI elements corresponding to start and end time of the appointment
in this day.</p>
<p>
AppointmentsCoverPane provides this functionality for an arbitrary UI representing 
<a class="xref" href="C1.WPF.Schedule.VisualInterval.html">VisualInterval</a>s. To make it possible, each element that can be 
treated as VisualInterval UI representative (usually it's an outer (root) element 
in the <a class="xref" href="C1.WPF.Schedule.C1Scheduler.VisualIntervalTemplate.html#C1_WPF_Schedule_C1Scheduler_VisualIntervalTemplate">VisualIntervalTemplate</a> definition) must have the 
attached <a class="xref" href="C1.WPF.Schedule.CoverElementsPane.OrientationProperty.html">OrientationProperty</a> assigned 
(<a class="xref" href="C1.WPF.Schedule.CoverElementsPane.html">CoverElementsPane</a> is the base class for 
<a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.html">AppointmentsCoverPane</a>). The assigned value indicates a chronological 
flow direction of interval elements and can take Horizontal or Vertical values. 
For example, interval elements in the Working Week View have it assigned to 
Vertical, while elements of Month View assign it to Horizontal.
A content of an appointment box of AppointmentsCoverPane is represented by 
DataTemplate defined in the <a class="xref" href="C1.WPF.Schedule.C1Scheduler.IntervalAppointmentTemplate.html#C1_WPF_Schedule_C1Scheduler_IntervalAppointmentTemplate">IntervalAppointmentTemplate</a> 
property.
</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane__ctor" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.#ctor">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.-ctor.html#C1_WPF_Schedule_AppointmentsCoverPane__ctor">AppointmentsCoverPane()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new instance of the <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.html">AppointmentsCoverPane</a> pane.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_AppointmentFilterProperty" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.AppointmentFilterProperty">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.AppointmentFilterProperty.html">AppointmentFilterProperty</a>
        </td>
        <td class="markdown level1 summary"><p>The AppointmentFilter attached property can be used to specify
which type of appointments should be drawn by the
<a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.html">AppointmentsCoverPane</a> pane.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_KeepTimesAtDropProperty" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.KeepTimesAtDropProperty">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.KeepTimesAtDropProperty.html">KeepTimesAtDropProperty</a>
        </td>
        <td class="markdown level1 summary"><p>The KeepTimesAtDrop attached property determines the behavior of moved (dragged) appointments.
If this value is True, after dragging an appointment to the desired VisualInterval,
the Appointment start date is changed to the VisualInterval start date.
If this value is False, the Appointment.Start becomes equal to the VisualInterval.StartTime,
and Appointment.Duration becomes equal to the VisualInterval.TimeScale. The default value is False.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_ContentKind" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.ContentKind">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.ContentKind.html#C1_WPF_Schedule_AppointmentsCoverPane_ContentKind">ContentKind</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the type of content acceptable by the current instance of <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.html">AppointmentsCoverPane</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_UseSimpleLayout" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.UseSimpleLayout">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.UseSimpleLayout.html#C1_WPF_Schedule_AppointmentsCoverPane_UseSimpleLayout">UseSimpleLayout</a>
        </td>
        <td class="markdown level1 summary"><p>Only set this property to false if you use complex layout in the custom <a class="xref" href="C1.WPF.Schedule.C1Scheduler.html">C1Scheduler</a> control template
and found problems with laying out appointments at runtime. In such case <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.html">AppointmentsCoverPane</a>
will use more slow algorithm to determine what elements should be used to layout appointments over them.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_GetAppointmentFilter_System_Windows_FrameworkElement_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.GetAppointmentFilter(System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.GetAppointmentFilter.html#C1_WPF_Schedule_AppointmentsCoverPane_GetAppointmentFilter_System_Windows_FrameworkElement_">GetAppointmentFilter(FrameworkElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the value of the AppointmentFilter attached property for a given framework element.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_GetCoverElement_System_Object_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.GetCoverElement(System.Object)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.GetCoverElement.html#C1_WPF_Schedule_AppointmentsCoverPane_GetCoverElement_System_Object_">GetCoverElement(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates new wrapper to represent cover element.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_GetHosts" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.GetHosts">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.GetHosts.html#C1_WPF_Schedule_AppointmentsCoverPane_GetHosts">GetHosts()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the list of the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> elements, which are the root of visual tree to search covered elements.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_GetKeepTimesAtDrop_System_Windows_FrameworkElement_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.GetKeepTimesAtDrop(System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.GetKeepTimesAtDrop.html#C1_WPF_Schedule_AppointmentsCoverPane_GetKeepTimesAtDrop_System_Windows_FrameworkElement_">GetKeepTimesAtDrop(FrameworkElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the value of the KeepTimesAtDrop attached property for a given framework element.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_GetLaneSize_C1_WPF_Schedule_SizingType_System_Object_System_Double_System_Int32_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.GetLaneSize(C1.WPF.Schedule.SizingType,System.Object,System.Double,System.Int32)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.GetLaneSize.html#C1_WPF_Schedule_AppointmentsCoverPane_GetLaneSize_C1_WPF_Schedule_SizingType_System_Object_System_Double_System_Int32_">GetLaneSize(SizingType, object, double, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Overrides base class behavior. If sizingType is <a class="xref" href="C1.WPF.Schedule.SizingType.html#C1_WPF_Schedule_SizingType_ExtendedSingle">ExtendedSingle</a>, always
returns fixed size for all-day or multi-day appointments.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_InitializeAppointment_C1_Schedule_Appointment_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.InitializeAppointment(C1.Schedule.Appointment)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.InitializeAppointment.html#C1_WPF_Schedule_AppointmentsCoverPane_InitializeAppointment_C1_Schedule_Appointment_">InitializeAppointment(Appointment)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the newly created appointment or edits existing one when it is dropped to the AppointmentsCoverPane by the end-user.
This method is called by the C1Scheduler control immediately before firing UserAddingAppointment and BeforeAppointmentDrop events.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_IsHostElementInternal_System_Windows_FrameworkElement_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.IsHostElementInternal(System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.IsHostElementInternal.html#C1_WPF_Schedule_AppointmentsCoverPane_IsHostElementInternal_System_Windows_FrameworkElement_">IsHostElementInternal(FrameworkElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether specified element is hosted in the same host as the current <a class="xref" href="C1.WPF.Schedule.CoverElementsPane.html">CoverElementsPane</a> instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_IsPaneAppointment_C1_Schedule_Appointment_C1_WPF_Schedule_AppointmentFilterEnum_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.IsPaneAppointment(C1.Schedule.Appointment,C1.WPF.Schedule.AppointmentFilterEnum)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.IsPaneAppointment.html#C1_WPF_Schedule_AppointmentsCoverPane_IsPaneAppointment_C1_Schedule_Appointment_C1_WPF_Schedule_AppointmentFilterEnum_">IsPaneAppointment(Appointment, AppointmentFilterEnum)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether the specified appointment should be shown in the current pane.
The default implementation filters appointments according to the AppointmentsCoverPane.AppointmentFilter property value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_IsPaneElementInternal_System_Windows_FrameworkElement_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.IsPaneElementInternal(System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.IsPaneElementInternal.html#C1_WPF_Schedule_AppointmentsCoverPane_IsPaneElementInternal_System_Windows_FrameworkElement_">IsPaneElementInternal(FrameworkElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether specified element is covered by the current <a class="xref" href="C1.WPF.Schedule.CoverElementsPane.html">CoverElementsPane</a> instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_SetAppointmentFilter_System_Windows_FrameworkElement_C1_WPF_Schedule_AppointmentFilterEnum_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.SetAppointmentFilter(System.Windows.FrameworkElement,C1.WPF.Schedule.AppointmentFilterEnum)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.SetAppointmentFilter.html#C1_WPF_Schedule_AppointmentsCoverPane_SetAppointmentFilter_System_Windows_FrameworkElement_C1_WPF_Schedule_AppointmentFilterEnum_">SetAppointmentFilter(FrameworkElement, AppointmentFilterEnum)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the value of the AppointmentFilter attached property for a given framework element.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Schedule_AppointmentsCoverPane_SetKeepTimesAtDrop_System_Windows_FrameworkElement_System_Boolean_" data-uid="C1.WPF.Schedule.AppointmentsCoverPane.SetKeepTimesAtDrop(System.Windows.FrameworkElement,System.Boolean)">
          <a class="xref" href="C1.WPF.Schedule.AppointmentsCoverPane.SetKeepTimesAtDrop.html#C1_WPF_Schedule_AppointmentsCoverPane_SetKeepTimesAtDrop_System_Windows_FrameworkElement_System_Boolean_">SetKeepTimesAtDrop(FrameworkElement, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the value of the KeepTimesAtDrop attached property for a given framework element.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
