Is there a way to remove the "Recurring" and "Reminder" icons from an Appointment when using the UltraMonthSingleView calendar? I want the appoinments to be recurring and have reminders, I just don't want the icons displayed in the appointment when viewing the calendar. I have looked at the properties for the ultraCalendarInfo, ultraCalendarLook and ultraMonthSingleView objects, but cannot find any way to turn off these icons.
Thanks,
Eric
Thanks! That did exactly what I was looking for.
Thanks again,
I am not sure if there are property settings for this but for our Windows Forms controls almost anything can be done with a DrawFilter or a CreationFilter. Removing elements is one of the easier things you can do with a CreationFilter. Here is some code that should do what you are looking for:
using System;using System.Collections.Generic;using System.Text;using Infragistics.Win;using Infragistics.Win.UltraWinSchedule.MonthViewSingle;using Infragistics.Win.UltraWinSchedule;using System.Drawing;
class RemoveIconFilter : IUIElementCreationFilter{ #region IUIElementCreationFilter Members public void AfterCreateChildElements(UIElement parent) { if (parent is SingleDayAppointmentUIElement) { UIElement symbols = parent.GetDescendant(typeof(SymbolCharactersUIElement)); UIElement text = parent.GetDescendant(typeof(EditorWithTextUIElement)); Rectangle newbounds = new Rectangle(text.Rect.Location,new Size((symbols.Rect.Right - text.Rect.Left), text.Rect.Height)); text.Rect = newbounds; parent.ChildElements.Remove(symbols); } }
public bool BeforeCreateChildElements(UIElement parent) { return false; } #endregion}
To hook this filter up to your MonthViewSingle do the following:
ultraMonthViewSingle1.CreationFilter = new RemoveIconFilter();
This was tested using the Office2007 ViewStyle. It may need tweaking for what you are looking to exactly do.
Here is a link to a Devin Rader's blog post that talks about a spy tool that is integral to writing these filters:
http://geekswithblogs.net/devin/archive/2005/11/17/60406.aspx
Help article that explains our Presentation Layer Framework with a link to Filters at the bottom:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Win_Presentation_Layer_Framework_PLF.html
You can find some samples regarding filters in our Knowledge Base:
Creation Filters:
http://devcenter.infragistics.com/Support/KnowledgeBaseResults.aspx?type=Full&query=(creationfilter+or+creation)&articletypes=0&age=0&sort=LastModifiedDate&samplesonly=0
Draw Filters:
http://devcenter.infragistics.com/Support/KnowledgeBaseResults.aspx?type=Full&query=(drawfilter)&articletypes=0&age=0&sort=LastModifiedDate&samplesonly=0