S
Sean J Donovan
When you have a control, and Localizable = FALSE, all child controls
serialize into the InitializeComponent method. There are some
exceptions, eg. Images have their value written into the .resx file.
Eg. this.label1.Location = new System.Drawing.Point(104, 64);
this.label1.Name = "label1";
this.label1.TabIndex = 0;
this.label1.Text = "Hello";
If you have a control that has Localizable = TRUE, when all child
controls are code-serialized, the actual values are typically written to
the .resx file.
Eg. this.label1.AccessibleDescription =
resources.GetString("label1.AccessibleDescription");
this.label1.AccessibleName =
resources.GetString("label1.AccessibleName");
this.label1.Anchor =
((System.Windows.Forms.AnchorStyles)(resources.GetObject("label1.Anchor")));
PROBLEM #1:
However, we have a case where the Localizable = FALSE, and the
properties are still in the .resx, IMHO, they shouldn't be, and it's a
bug. Has anyone else seen this?
Specifcally, we have a enum property, defined as:
/// <summary>
/// GET/SET the button's style.
/// </summary>
[Category("Behavior")]
[Description("Indicates the button's style.")]
[DefaultValue(ButtonStyle.Simple)]
public ButtonStyle ButtonActionStyle
Even on parent controls that don't have Localizable=TRUE, the enum still
serializes to the .resx:
this._doneButton.ButtonActionStyle =
((Summit.Framework.View.ButtonStyle)(resources.GetObject("_doneButton.ButtonActionStyle")));
This just **shouldn't** be happening.
It becomes a problem, in that we start seeing lots of partial-bind
errors at runtime.
PROBLEM #2:
There is another related problem. We've found that you can't have an
enum defined in a Control based class and have it reliably serialize. I
can provide more information if needed.
Sean
serialize into the InitializeComponent method. There are some
exceptions, eg. Images have their value written into the .resx file.
Eg. this.label1.Location = new System.Drawing.Point(104, 64);
this.label1.Name = "label1";
this.label1.TabIndex = 0;
this.label1.Text = "Hello";
If you have a control that has Localizable = TRUE, when all child
controls are code-serialized, the actual values are typically written to
the .resx file.
Eg. this.label1.AccessibleDescription =
resources.GetString("label1.AccessibleDescription");
this.label1.AccessibleName =
resources.GetString("label1.AccessibleName");
this.label1.Anchor =
((System.Windows.Forms.AnchorStyles)(resources.GetObject("label1.Anchor")));
PROBLEM #1:
However, we have a case where the Localizable = FALSE, and the
properties are still in the .resx, IMHO, they shouldn't be, and it's a
bug. Has anyone else seen this?
Specifcally, we have a enum property, defined as:
/// <summary>
/// GET/SET the button's style.
/// </summary>
[Category("Behavior")]
[Description("Indicates the button's style.")]
[DefaultValue(ButtonStyle.Simple)]
public ButtonStyle ButtonActionStyle
Even on parent controls that don't have Localizable=TRUE, the enum still
serializes to the .resx:
this._doneButton.ButtonActionStyle =
((Summit.Framework.View.ButtonStyle)(resources.GetObject("_doneButton.ButtonActionStyle")));
This just **shouldn't** be happening.
It becomes a problem, in that we start seeing lots of partial-bind
errors at runtime.
PROBLEM #2:
There is another related problem. We've found that you can't have an
enum defined in a Control based class and have it reliably serialize. I
can provide more information if needed.
Sean