Implement Support for Retrieving Identification Property Values

In this section, you implement the property value retrieval interface in the CalendarSrv class to support retrieving the values of identification properties from the Calendar control.

You specified, in the WPF Custom Server Setup dialog box, that you want to customize property retrieval. Therefore, the ICalendarProperties interface that you specified was defined in the CalendarSrv.cs file, tagged with the CustomPropInterface attribute, and implemented in the CalendarSrv class for an example property, MyCustomProperty.

  1. Locate the ICalendarProperties interface definition in the CalendarSrv.cs file.

    [CustomPropInterface()]
        public interface ICalendarProperties
        {
            object MyCustomProperty
            {
                get;
            }
        }
    
  2. Replace the example object MyCustomProperty with bool is_today_highlighted to complete the interface definition.

  3. Locate the interface implementation in the CalendarSrv class:

    public object MyCustomProperty
    {
        get
        {
            return null;
        }
    }
    
  4. Modify the example implementation to retrieve the value for the is_today_highlighted identification property:

    public bool is_today_highlighted
    {
        get
        {
            return MyCalendar.IsTodayHighlighted;
        }
    }
    

Continue to Deploy and Test Your Basic Custom Server and Identification Property Support.