2 posts, 0 answers
  1. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 17 Feb 2014 Link to this post


    I created a CustomSlotSelectionBehavior class to limit the slots selection in a single day. In the GetSelectionOverride protected method, I use the "pState.CurrentSelection" to determine the date of the initial slot. If the "CurrentSlot.Start" or the "CurrentSlot.End" are not on the same day than the "pState.CurrentSelection", I want to return a new object with the with "pState.CurrentSelection.Start.Date" or "pState.CurrentSelection.End.Date" and I need to know what is the "DayStartTime/DayEndTime" of the viewdefinition to complete my object. So accomplish that, what shoulf I do?

  2. Kalin
    Kalin avatar
    1349 posts

    Posted 20 Feb 2014 Link to this post

    Hi Alain,

    In order to get the DayStartTime and DayEndTime of the ActiveViewDefinition you will need to firstly bind the ActiveViewDefinition property of the ScheduleView to a property in the ViewModel. Then you will need to add an additional property of CustomSlotSelectionBehavior which will hold the reference of the ViewModel which afterward will be used in order to get the desired properties of the ActiveViewDefinition. The final step will be to define the ViewModel as Resource in XAML so you can pass it to the property as StaticResource. Please check the attached sample project which demonstrates the exact approach.

    Hope this helps.

Back to Top