R
Ron Vecchi
I have a custom control inheriting from System.Web.UI.Control. I
implemented the ExpandableObjectConverter and everything is working fine in
the designer. The proerty is expanded and I can select the child properties
and the change is displayed to the parent.
When my custom control renders, an html atribute is created from the values
of both child properties of the parent property. ex (salign="LB").
How can I get this to show up in my Html View when I set the child
properties in design view? Right now nothing is displayed in the controls
html view when I change the properties in design. Also when I build my
project my newly set child properties are rcleared from the poperties
window.
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
//////////////////// Custom control property
///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
[Browsable(true),
Description("Gets or Sets the Flash Horizontal and Vertical Alignment
Parameters."),
Category("Alignment"),
PersistenceMode(PersistenceMode.InnerProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public FlashMovieAlignment FlashAlignment {
get {return this._mflashalign;}
set {this._mflashalign = value;}
}
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
//////////////////// Class that is Expandable in design view of custom
control ////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
[TypeConverter(typeof(ExpandableObjectConverter))]
public class FlashMovieAlignment {
private FlashHorizontalAlignment _halign;
private FlashVerticalAlignment _valign;
[DefaultValue(typeof(DHelixWebControls.UI.FlashHorizontalAlignment),"Center"
),
NotifyParentProperty(true),
RefreshProperties(RefreshProperties.Repaint)]
public FlashHorizontalAlignment HorizontalAlign {
get {return this._halign;}
set {this._halign = value;}
}
[DefaultValue(typeof(DHelixWebControls.UI.FlashVerticalAlignment),"Center"),
NotifyParentProperty(true),
RefreshProperties(RefreshProperties.Repaint)]
public FlashVerticalAlignment VerticalAlign {
get {return this._valign;}
set {this._valign = value;}
}
public FlashMovieAlignment() {
this.Initialize(FlashHorizontalAlignment.Center,FlashVerticalAlignment.Cente
r);
}
}
Thanks
implemented the ExpandableObjectConverter and everything is working fine in
the designer. The proerty is expanded and I can select the child properties
and the change is displayed to the parent.
When my custom control renders, an html atribute is created from the values
of both child properties of the parent property. ex (salign="LB").
How can I get this to show up in my Html View when I set the child
properties in design view? Right now nothing is displayed in the controls
html view when I change the properties in design. Also when I build my
project my newly set child properties are rcleared from the poperties
window.
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
//////////////////// Custom control property
///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
[Browsable(true),
Description("Gets or Sets the Flash Horizontal and Vertical Alignment
Parameters."),
Category("Alignment"),
PersistenceMode(PersistenceMode.InnerProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public FlashMovieAlignment FlashAlignment {
get {return this._mflashalign;}
set {this._mflashalign = value;}
}
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
//////////////////// Class that is Expandable in design view of custom
control ////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
[TypeConverter(typeof(ExpandableObjectConverter))]
public class FlashMovieAlignment {
private FlashHorizontalAlignment _halign;
private FlashVerticalAlignment _valign;
[DefaultValue(typeof(DHelixWebControls.UI.FlashHorizontalAlignment),"Center"
),
NotifyParentProperty(true),
RefreshProperties(RefreshProperties.Repaint)]
public FlashHorizontalAlignment HorizontalAlign {
get {return this._halign;}
set {this._halign = value;}
}
[DefaultValue(typeof(DHelixWebControls.UI.FlashVerticalAlignment),"Center"),
NotifyParentProperty(true),
RefreshProperties(RefreshProperties.Repaint)]
public FlashVerticalAlignment VerticalAlign {
get {return this._valign;}
set {this._valign = value;}
}
public FlashMovieAlignment() {
this.Initialize(FlashHorizontalAlignment.Center,FlashVerticalAlignment.Cente
r);
}
}
Thanks