Beispiel #1
0
            public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
            {
                PropertyDescriptor[] properties = new PropertyDescriptor[3];
                properties[0] = new ShadowProperty(
                    "DayHeadersBackColor",
                    TypeDescriptor.CreateProperty(
                        typeof(DayHeadersStyle),
                        DayHeadersBackColorName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(ColorExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultDayHeadersBackcolor)))));

                properties[1] = new ShadowProperty(
                    "DayHeadersBorderStyle",
                    TypeDescriptor.CreateProperty(
                        typeof(DayHeadersStyle),
                        DayHeadersBorderName,
                        typeof(DesignLineStyle),
                        new TypeConverterAttribute(typeof(DesignLineStyle.Converter)),
                        new DefaultValueAttribute(typeof(DesignLineStyle), string.Format("{0}, {1}, {2}",
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultDayHeadersBorderColor)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertLengthToString(CalendarData.DefaultDayHeadersBorderWidth)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayHeadersBorderStyle))))));

                properties[2] = new ShadowProperty(
                    "DayHeadersFontStyle",
                    TypeDescriptor.CreateProperty(
                        typeof(DayHeadersStyle),
                        DayHeadersFontStyleName,
                        typeof(DesignTextStyle),
                        new TypeConverterAttribute(typeof(DesignTextStyle.Converter)),
                        new DefaultValueAttribute(typeof(DesignTextStyle), string.Format("{0}, {1}, {2}, {3}, {4}, {5}",
                                                                                         ExpressionInfo.FromString(CalendarData.DefaultDayHeadersFontFamily),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertLengthToString(CalendarData.DefaultDayHeadersFontSize)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayHeadersFontStyle)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayHeadersFontWeight)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayHeadersFontDecoration)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultDayHeadersFontColor))))));
                PropertyDescriptorCollection pdc = new PropertyDescriptorCollection(properties);

                return(pdc.Sort(PropertySortOrder));
            }
Beispiel #2
0
 set => SetValue(ShadowProperty, value);
Beispiel #3
0
            public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
            {
                PropertyDescriptor[] properties = new PropertyDescriptor[5];
                // backcolor
                properties[0] = new ShadowProperty(
                    "DayBackcolor",
                    TypeDescriptor.CreateProperty(
                        typeof(DayStyle),
                        DayBackcolorPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(ColorExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultDayBackcolor)))));
                // border style
                properties[1] = new ShadowProperty(
                    "DayBorderStyle",
                    TypeDescriptor.CreateProperty(
                        typeof(DayStyle),
                        DayBorderStylePropertyName,
                        typeof(DesignLineStyle),
                        new TypeConverterAttribute(typeof(DesignLineStyle.Converter)),
                        new DefaultValueAttribute(typeof(DesignLineStyle), string.Format("{0}, {1}, {2}",
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultDayBorderColor)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertLengthToString(CalendarData.DefaultDayBorderWidth)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayBorderStyle))))));
                // font style
                properties[2] = new ShadowProperty(
                    "DayFontStyle",
                    TypeDescriptor.CreateProperty(
                        typeof(DayStyle),
                        DayFontStylePropertyName,
                        typeof(DesignTextStyle),
                        new TypeConverterAttribute(typeof(DesignTextStyle.Converter)),
                        new DefaultValueAttribute(typeof(DesignTextStyle), string.Format("{0}, {1}, {2}, {3}, {4}, {5}",
                                                                                         ExpressionInfo.FromString(CalendarData.DefaultDayFontFamily),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertLengthToString(CalendarData.DefaultDayFontSize)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayFontStyle)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayFontWeight)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayFontDecoration)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultDayFontColor))))));
                // text align
                properties[3] = new ShadowProperty(
                    "DayTextAlign",
                    TypeDescriptor.CreateProperty(
                        typeof(DayStyle),
                        DayTextAlignPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(EnumExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayTextAlign)))));
                // vertical align
                properties[4] = new ShadowProperty(
                    "DayVerticalAlign",
                    TypeDescriptor.CreateProperty(
                        typeof(DayStyle),
                        DayVerticalAlignPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(EnumExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultDayVerticalAlign)))));
                PropertyDescriptorCollection pdc = new PropertyDescriptorCollection(properties);

                return(pdc);
            }
Beispiel #4
0
            public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
            {
                PropertyDescriptor[] properties = new PropertyDescriptor[5];
                // backcolor
                properties[0] = new ShadowProperty(
                    "WeekendBackcolor",
                    TypeDescriptor.CreateProperty(
                        typeof(WeekendStyle),
                        WeekendBackcolorPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(ColorExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultWeekendBackcolor)))));
                // border style
                properties[1] = new ShadowProperty(
                    "WeekendBorderStyle",
                    TypeDescriptor.CreateProperty(
                        typeof(WeekendStyle),
                        WeekendBorderStylePropertyName,
                        typeof(DesignLineStyle),
                        new TypeConverterAttribute(typeof(DesignLineStyle.Converter)),
                        new DefaultValueAttribute(typeof(DesignLineStyle), string.Format("{0}, {1}, {2}",
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultWeekendBorderColor)),
                                                                                         EvaluatorService.EmptyExpression,
                                                                                         EvaluatorService.EmptyExpression))));
                // font style
                properties[2] = new ShadowProperty(
                    "WeekendFontStyle",
                    TypeDescriptor.CreateProperty(
                        typeof(WeekendStyle),
                        WeekendFontStylePropertyName,
                        typeof(DesignTextStyle),
                        new TypeConverterAttribute(typeof(DesignTextStyle.Converter)),
                        new DefaultValueAttribute(typeof(DesignTextStyle), string.Format("{0}, {1}, {2}, {3}, {4}, {5}",
                                                                                         EvaluatorService.EmptyExpression,
                                                                                         EvaluatorService.EmptyExpression,
                                                                                         EvaluatorService.EmptyExpression,
                                                                                         EvaluatorService.EmptyExpression,
                                                                                         EvaluatorService.EmptyExpression,
                                                                                         EvaluatorService.EmptyExpression))));
                // text align
                properties[3] = new ShadowProperty(
                    "WeekendTextAlign",
                    TypeDescriptor.CreateProperty(
                        typeof(WeekendStyle),
                        WeekendTextAlignPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(EnumExpressionInfoConverter)),
                        new DefaultValueAttribute((object)EvaluatorService.EmptyExpression)));
                // vertical align
                properties[4] = new ShadowProperty(
                    "WeekendVerticalAlign",
                    TypeDescriptor.CreateProperty(
                        typeof(WeekendStyle),
                        WeekendVerticalAlignPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(EnumExpressionInfoConverter)),
                        new DefaultValueAttribute((object)EvaluatorService.EmptyExpression)));
                PropertyDescriptorCollection pdc = new PropertyDescriptorCollection(properties);

                return(pdc.Sort(PropertySortOrder));
            }
Beispiel #5
0
            public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
            {
                PropertyDescriptor[] properties = new PropertyDescriptor[6];
                // back color
                properties[0] = new ShadowProperty(
                    "EventBackcolor",
                    TypeDescriptor.CreateProperty(
                        typeof(AppointmentStyle),
                        EventBackcolorPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(ColorExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultAppointmentBackcolor)))));
                // border color
                properties[1] = new ShadowProperty(
                    "EventBorderColor",
                    TypeDescriptor.CreateProperty(
                        typeof(AppointmentStyle),
                        EventBorderColorPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(ColorExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultAppointmentBorderColor)))));
                // font style
                properties[2] = new ShadowProperty(
                    "EventFont",
                    TypeDescriptor.CreateProperty(
                        typeof(AppointmentStyle),
                        EventFontPropertyName,
                        typeof(DesignTextStyle),
                        new TypeConverterAttribute(typeof(DesignTextStyle.Converter)),
                        new DefaultValueAttribute(typeof(DesignTextStyle), string.Format("{0}, {1}, {2}, {3}, {4}, {5}",
                                                                                         ExpressionInfo.FromString(CalendarData.DefaultAppointmentFontFamily),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertLengthToString(CalendarData.DefaultAppointmentFontSize)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultAppointmentFontStyle)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultAppointmentFontWeight)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultAppointmentFontDecoration)),
                                                                                         ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertColorToString(CalendarData.DefaultAppointmentFontColor))))));
                // text align
                properties[3] = new ShadowProperty(
                    "EventTextAlign",
                    TypeDescriptor.CreateProperty(
                        typeof(AppointmentStyle),
                        EventTextAlignPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(EnumExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultAppointmentTextAlign)))));
                // format
                properties[4] = new ShadowProperty(
                    "EventFormat",
                    TypeDescriptor.CreateProperty(
                        typeof(AppointmentStyle),
                        EventFormatPropertyName,
                        typeof(ExpressionInfo),
                        new TypeConverterAttribute(typeof(StringExpressionInfoConverter)),
                        new DefaultValueAttribute((object)ExpressionInfo.FromString(CalendarData.DefaultAppointmentFormat))));
                // vertical align
                properties[5] = new ShadowProperty(
                    "EventImage",
                    TypeDescriptor.CreateProperty(
                        typeof(AppointmentStyle),
                        EventImagePropertyName,
                        typeof(DesignImage),
                        new TypeConverterAttribute(typeof(DesignImage.Converter)),
                        new DefaultValueAttribute(typeof(DesignImage), string.Format("{0}, {1}, {2}",
                                                                                     ExpressionInfo.FromString(ToolsNamespace.Utils.ConvertToString(CalendarData.DefaultAppointmentImageSource)),
                                                                                     ExpressionInfo.FromString(CalendarData.DefaultAppointmentImageValue),
                                                                                     ExpressionInfo.FromString(CalendarData.DefaultAppointmentMimeType)))
                        ));
                PropertyDescriptorCollection pdc = new PropertyDescriptorCollection(properties);

                return(pdc.Sort(PropertySortOrder));
            }