Exemple #1
0
 private void customDateNavigator2_ContextButtonCustomize(object sender, CalendarContextButtonCustomizeEventArgs e)
 {
     if (e.Cell.Date.Day % 2 != 0)
     {
         e.Item.Glyph        = Properties.Resources.Party;
         e.Item.Visibility   = ContextItemVisibility.Visible;
         e.Item.ToolTip      = "blah-blah-blah";
         e.Item.ShowToolTips = true;
     }
 }
Exemple #2
0
        private void CalendarControl1_ContextButtonCustomize(object sender, CalendarContextButtonCustomizeEventArgs e)
        {
            string holidayText;

            if (Holidays.IsHoliday(e.Cell.Date, out holidayText))
            {
                e.Item.Glyph        = global::Calendar_CellStyleProvider.Properties.Resources.Party;
                e.Item.Visibility   = ContextItemVisibility.Visible;
                e.Item.ToolTip      = holidayText;
                e.Item.ShowToolTips = true;
            }
        }
Exemple #3
0
        void Calendar_ContextButtonCustomize(object sender, CalendarContextButtonCustomizeEventArgs e)
        {
            PopupCalendarControl popupCalendarControl = (PopupCalendarControl)sender;

            MyCellStyleProvider provider = (MyCellStyleProvider)popupCalendarControl.CellStyleProvider;
            MyCustomCellData    data     = ((MyCellStyleProvider)popupCalendarControl.CellStyleProvider).GetCell(e.Cell.Date);

            if (data == null || string.IsNullOrEmpty(data.InfoText))
            {
                e.Item.Visibility = ContextItemVisibility.Hidden;
                return;
            }
            e.Item.Tag   = data;
            e.Item.Glyph = data.InfoGlyph;
        }