Exemplo n.º 1
0
 public ShadowPropertyDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
                                 PropertyDescriptor existingDescriptor)
     : base(existingDescriptor)
 {
     this._parent         = parent;
     this._baseDescriptor = existingDescriptor;
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
			public ShadowPropertyDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
			                                PropertyDescriptor existingDescriptor)
				: base(existingDescriptor)
			{
				this._parent = parent;
				this._baseDescriptor = existingDescriptor;
			}
Exemplo n.º 6
0
			public ShadowTypeDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
			                            ICustomTypeDescriptor existingDescriptor)
				: base(existingDescriptor)
			{
				this._parent = parent;
			}
Exemplo n.º 7
0
 public ShadowTypeDescriptor(DummyValueInsteadOfNullTypeDescriptionProvider parent,
                             ICustomTypeDescriptor existingDescriptor)
     : base(existingDescriptor)
 {
     this._parent = parent;
 }