Esempio n. 1
0
        private void OnCustomUnboundColumnData(object sender, GridColumnDataEventArgs e)
        {
            Appointment currentApt = (gridControlAppointments.GetRowByListIndex(e.ListSourceRowIndex) as AgendaAppointment).SourceAppointment;

            if (e.Column.FieldName == "gridColumnRecurring" && e.IsGetData && currentApt.IsRecurring)
            {
                e.Value = ImageToBitmapImage.Convert(appointmentImages.Images[2]);
            }

            if (e.Column.FieldName == "gridColumnReminder" && e.IsGetData && currentApt.HasReminder)
            {
                e.Value = ImageToBitmapImage.Convert(appointmentImages.Images[4]);
            }
        }
Esempio n. 2
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            BitmapImage bitmapImage = new BitmapImage();

            System.Drawing.Image bitmap;
            if (value != null)
            {
                return(value);
            }
            else
            {
                bitmap = AgendaViewDemo.Properties.Resources.no_photo_icon;
                return(ImageToBitmapImage.Convert(bitmap));
            }
        }