예제 #1
0
 public ShadowPropertyDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
                                 PropertyDescriptor existingDescriptor)
     : base(existingDescriptor)
 {
     this._parent         = parent;
     this._baseDescriptor = existingDescriptor;
 }
예제 #2
0
		/// <summary>
		/// Creates an instance of the specified type, passing the specified arguments to its constructor.
		/// </summary>
		public override object CreateInstance(Type type, params object[] arguments)
		{
			object instance = base.CreateInstance(type, arguments);
			Control control = instance as Control;
			if (control != null) {
				if (control.Background == null) {
					control.Background = _transparentBrush;
				}
				TypeDescriptionProvider provider = new DummyValueInsteadOfNullTypeDescriptionProvider(
					TypeDescriptor.GetProvider(control), "Background", _transparentBrush);
				TypeDescriptor.AddProvider(provider, control);
			}
			return instance;
		}
        /// <summary>
        /// Creates an instance of the specified type, passing the specified arguments to its constructor.
        /// </summary>
        public override object CreateInstance(Type type, params object[] arguments)
        {
            object  instance = base.CreateInstance(type, arguments);
            Control control  = instance as Control;

            if (control != null)
            {
                if (control.Background == null)
                {
                    control.Background = _transparentBrush;
                }
                TypeDescriptionProvider provider = new DummyValueInsteadOfNullTypeDescriptionProvider(
                    TypeDescriptor.GetProvider(control), "Background", _transparentBrush);
                TypeDescriptor.AddProvider(provider, control);
            }
            return(instance);
        }
예제 #4
0
        /// <summary>
        /// Creates an instance of the specified type, passing the specified arguments to its constructor.
        /// </summary>
        public override object CreateInstance(Type type, params object[] arguments)
        {
            object instance = base.CreateInstance(type, arguments);
            Panel  panel    = instance as Panel;

            if (panel != null)
            {
                if (panel.Background == null)
                {
                    panel.Background = TransparentBrushHelper.TransparentBrush;
                }
                TypeDescriptionProvider provider = new DummyValueInsteadOfNullTypeDescriptionProvider(
                    TypeDescriptor.GetProvider(panel), "Background", TransparentBrushHelper.TransparentBrush);
                TypeDescriptor.AddProvider(provider, panel);
            }
            return(instance);
        }
예제 #5
0
			public ShadowPropertyDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
			                                PropertyDescriptor existingDescriptor)
				: base(existingDescriptor)
			{
				this._parent = parent;
				this._baseDescriptor = existingDescriptor;
			}
예제 #6
0
			public ShadowTypeDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
			                            ICustomTypeDescriptor existingDescriptor)
				: base(existingDescriptor)
			{
				this._parent = parent;
			}
예제 #7
0
 public ShadowTypeDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
                             ICustomTypeDescriptor existingDescriptor)
     : base(existingDescriptor)
 {
     this._parent = parent;
 }