hi,
what would be the correct way to display a horizontal line at the current time in IGCalendarView day view?
Thank you
Mark
Hi Mark,
We don't currently expose a way to easily do that. Technically you could navigate the subViews and find the correct place, but that could be tricky.
It would however would make a good feature request:
http://ideas.infragistics.com/forums/211525-nuclios
-SteveZ
Stephen,
here is what I ended up doing.
in DayChanged for today date I add another view to "MultiDayViewArea" at the offset calculated based on a time. That works great.
The problem I have that that view is covered by the appointment view (if there is an appointment at the current time), the strange thing is - if i change the date and then go back the view stays on top. So initially it is displayed under and i cannot figure out how to make it on top or perhaps make change the actual appointment view alpha.
if (dateTime.ToShortDateString() == DateTime.Now.ToShortDateString()) {
var calendarViewContainer = GetView(calendar, "CalendarViewContainer"); if (calendarViewContainer != null) { var dayView = GetView(calendarViewContainer, "DayView"); if (dayView != null) { var multiDayViewArea = GetView(dayView, "MultiDayViewArea"); if (multiDayViewArea != null) {
try {
var scrollView = (UIScrollView) multiDayViewArea.Subviews[0].Subviews[0].Subviews[0];
_dayLine = new UILabel(new CGRect(0, getCurrentTimeOffset(), scrollView.Frame.Width, 2)) { AutoresizingMask = UIViewAutoresizing.FlexibleWidth, TextAlignment = UITextAlignment.Left, BackgroundColor = UIColor.Red,
};
scrollView.AddSubview(_dayLine);
} catch (Exception) { }
} } }
}