ComponentOne Scheduler for WPF and Silverlight
Scheduler Components and Controls / C1Scheduler Commands
In This Topic
    C1Scheduler Commands
    In This Topic

    In order to offer the ability to use some types of C1Scheduler functionality declaratively in XAML, C1Scheduler provides a number of commands that can be issued with the help of instances of the ButtonBase derived classes.

    The following table describes the Navigation commands:

     

    Navigation Commands (an example of a sender of these commands is the C1SchedulerScrollBar control)

    DecrementStartTimeSmallCommand

    Decrements the C1Scheduler.VisualStartTime property value on the amount specified in the C1Scheduler.SmallStartTimeChange property.

    DecrementStartTimeLargeCommand

    Decrements the C1Scheduler.VisualStartTime property value on the amount specified in the C1Scheduler.LargeStartTimeChange property.

    IncrementStartTimeSmallCommand

    Increments the C1Scheduler.VisualStartTime property value on the amount specified in the C1Scheduler.SmallStartTimeChange property.

    IncrementStartTimeLargeCommand

    Increments the C1Scheduler.VisualStartTime property value on the amount specified in the C1Scheduler.LargeStartTimeChange property.

    SetRelativeStartTimeCommand

    Sets the C1Scheduler.VisualStartTime property to a value between the Start and End property values based on the specified coefficient.

    Command parameter: a floating point number in a range between 0 and 1 or its string representation.

    NavigateToPreviousAppointmentCommand

    Set focus to the nearest appointment before the C1Scheduler.SelectedDateTime is visible in the control UI.

    NavigateToNextAppointmentCommand

    Sets focus to the nearest appointment after the C1Scheduler.SelectedDateTime is visible in the control UI.

     

    The following table describes the Dialog commands:

     

    Dialog Commands

    EditAppointmentDialogCommand

    Opens the Edit Appointment dialog box for an existing appointment. Command parameter is one of the next values:

    • the Appointment to edit;
    • IList of Appointment objects to edit;
    • IList of Reminder objects whose parent appointments should be edited.

    If a parameter value is not specified, then the control will try to get an appointment from the sender’s DataContext.

    NewAppointmentDialogCommand

    Adds a new appointment and opens the Edit Appointment dialog box for it. The time interval for which an appointment will be created is determined by the sender’s DataContext.

    EditRecurrenceDialogCommand

    Opens the Edit Recurrence dialog box for an appointment’s recurrence. Command parameter: the Appointment whose RecurrencePattern will be edited. If a parameter value is not specified, then the control will try to get an appointment from the sender’s DataContext.

    SelectFromListDialogCommand

    Opens the Select Resources/Categories/Contacts, and so on dialog box.

    Command parameter should be an array from 4 or 5 values:

    1. The master list to choose from. For example ResourceStorage.Resources.
    2. The resulting list where to put selected items. For example, the Appointment.Resources list.
    3. The System.Type value specifying the type of items in both lists.
    4. The reference to the owning window if any.
    5. The String value to show as the dialog window title. This parameter is optional.

     

    The following table describes the Import/Export commands:

     

    Import/Export Commands

     

    ImportCommand

    Imports C1Scheduler data from the file. This command opens the "Open File" dialog box and then tries to import data from the selected file.

    ExportCommand

    Exports C1Scheduler data to the file. This command opens "Save File" dialog and then exports data to file.

    Command parameter is one of the next values:

    • the Appointment for saving;
    • Ilist<Appointment> for saving;
    • null – to export all Scheduler data.

     

    The following table describes the Reminder commands:

     

    Reminder Commands

    DismissCommand

    Dismisses reminders.

    Command parameter is one of the next values:

    • IList of Reminder objects to dismiss;
    • the Reminder object to dismiss.

    If a command parameter is not specified, all active reminders will be dismissed.

    SnoozeCommand

    Snoozes reminders.

    Command parameter may contain an array of 2 values:

    1. The TimeSpan value specifying time interval used for snoozing.
    2. One of the next values:
    • IList of Reminder objects to snooze;
    • the Reminder object to snooze.

    This item is optional. If it is not specified, all active reminders will be snoozed.

     

    The following table describes some additional commands:

     

    Other Commands

    DeleteSelectedAppointmentCommand

    Deletes an appointment which is currently selected in the UI and referenced in the C1Scheduler.SelectedAppointment property.

    ChangeStyleCommand

    Changes the Style property with the specified Style or a style referenced by the specified ResourceDictionary key.

    Command parameter: Style or a ResourceDictionary key representing a Style.

    NavigateToPreviousGroupCommand

    Defines the command that navigates C1Scheduler UI to the previous SchedulerGroupItem object.

    Optional command parameter is one of the next values:

    • "Page" for the page navigation. The page size is determined by the GroupPageSize property value.
    • "Home" for navigating to the first group.

    NavigateToNextGroupCommand

    Defines the command that navigates C1Scheduler UI to the next SchedulerGroupItem object.

    Optional command parameter is one of the next values:

    • "Page" for the page navigation. The page size is determined by the GroupPageSize property value
    • "End" for navigating to the last group.

    HideGroupCommand

    Defines the command that hides the specified SchedulerGroupItem object. Command parameter must specify the SchedulerGroupItem object to hide.