ITimeMarker.TimeMarkerBrush

2 posts, 0 answers
  1. Mark
    Mark avatar
    155 posts
    Member since:
    Oct 2010

    Posted 29 Aug 2011 Link to this post

    I've recently moved to the internal build 2011.2.0823 in an effort to overcome a problem with the RadGrid.  In doing so I am now presented with an inability to compile as ITimeMarker "does not contain a defintion for 'TimeMarkerBrush'" ...

    Can you please advise if there has been a change in the interface or if this is a bug in the internal release.

    The full code which was a sample provided from the ScheduleView thread is as follows:

    public partial class TimeMarker : ITimeMarker
        {
            System.Windows.Media.Brush ITimeMarker.TimeMarkerBrush
            {
                get
                {
                    throw new NotImplementedException();
                }
                set
                {
                    throw new NotImplementedException();
                }
            }
      
            public bool Equals(ITimeMarker other)
            {
                return
                    this.TimeMarkerName != other.TimeMarkerName &&
                    this.TimeMarkerBrush != other.TimeMarkerBrush.ToString();
            }
        }


    Many thanks,
    Mark
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 30 Aug 2011 Link to this post

    Hello Mark,

    The TimeMarkerBrush and CategoryBrush properties were removed from the ITimeMarker and ICategory interfaces, but RadScheduleView still could benefit from the same properties on the corresponding classes. In other words, I would recommend removing the explicit implementation of the properties, but keeping the properties in the classes:
    public partial class TimeMarker : ITimeMarker
    {
     System.Windows.Media.Brush TimeMarkerBrush
     {
      get
      {
       throw new NotImplementedException();
      }
      set
      {
       throw new NotImplementedException();
      }
     }

     public bool Equals(ITimeMarker other)
     {
      return this.TimeMarkerName != other.TimeMarkerName &&
       this.TimeMarkerBrush != other.TimeMarkerBrush.ToString();
     }
    }

    Kind regards,
    Valeri Hristov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top