Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
Is there a way to get and set the size of the underlying dayview schedule
posted

Working with day view, I am needing to determine the size of the underlying day view calendar element.  For instance, say I can see appointments for noon thru 4pm, but I am not able to see 8am-noon without scrolling.  I know the bounds of the contol and the bounds of the client area, but how can I determine the size of whole document if my monitor was big enough to see everything without scrolling.

Thanks!

Bob

Parents
  • 2094
    Offline posted

    I guess you could derive the "height" of the entire "dayview" by calculating it from the timeslot height.

    Get the height of a single timeslot and multiply it by the count of timeslots.

    TimeSlots.Height * TimeSlots.Count = FullDayViewHeight

     You could retrieve a timeslot Height by doing the following:

    Private Function GetTimeSlotHeight() as Integer
        Dim TimeSlotUI As Infragistics.Win.UltraWinSchedule.DayView.TimeSlotUIElement
        TimeSlotUI = Me.UltraDayView1.UIElement.GetDescendant(GetType(Infragistics.Win.UltraWinSchedule.DayView.TimeSlotUIElement))
        Return TimeSlotUI.Rect.Height
    End Function

    Now we are simply deriving the control height by using the timeslot height... but I am sure there is probably a particular single UIElement we could reference and get the height of.

    Perhaps a Kind Infragistics employee can tell us the UIElement of the dayview "Container" controls. If we knew what the larger "container" control is then the process would still be very similar to above.

    If you are just trying to get a particular TimeSlot Visible depending on a time then why not just use TimeSlot.EnsureVisible . That should do the trick for scrolling it backup to the top etc.  UltraDayView1.TimeSlots(0).EnsureVisible

    Regards
    Aaron

Reply Children
No Data