Re: Serialization Order for IExtenderProvider Properties
- From: Alvaro <AGonzalezv@xxxxxxxxx>
- Date: Fri, 13 Jan 2006 17:03:07 -0500
Hi;
in this site found the solution sample, but it's in Spanish.
http://www.elguille.org/colabora/puntoNET/konamiman_ExtendiendoCodeDomSerializer.htm
I has this same problem and apply this solution.
Tommy wrote:
I figured out the reason why this works this way: alphabetical order (duh). I did not think this was the problem since the method calls all start with Set and were still in different places but it uses the ProvideProperty declaration for the class. I renamed all these to start with "Z" and they were last in the InitializeComponent section.
Tommy
"Tommy" wrote:
I have created a component that implements several properties as an Extender Provider. I store each controls location and dimensions for portrait and landscape screen orientations (for a Tablet PC app). Everything works great except that when the calls to add the extender provider properties are serialized in the InitializeComponent method of the container form, it adds my custom properties before setting the control's name which is a problme since I use the name to keep up with each controls properties internally in my component. Another odd psrt of this is that it sets one set of the properties (the landscape ones) , then sets the name of the control, and then sets the rest of the custom properties (for portrait). How can I control this order? Or is there another design to work around this? Below is an example of the InitializeComponent method:
this.layoutController1.SetLandscapeHeight(this.textBox1, 20); this.layoutController1.SetLandscapeLeft(this.textBox1, 224); this.layoutController1.SetLandscapeTop(this.textBox1, 80); this.layoutController1.SetLandscapeWidth(this.textBox1, 280); this.textBox1.Location = new System.Drawing.Point(224, 80); this.textBox1.Name = "textBox1"; this.layoutController1.SetPortraitHeight(this.textBox1, 20); this.layoutController1.SetPortraitLeft(this.textBox1, 224); this.layoutController1.SetPortraitTop(this.textBox1, 80); this.layoutController1.SetPortraitWidth(this.textBox1, 168); this.textBox1.Size = new System.Drawing.Size(168, 20); this.textBox1.TabIndex = 1; this.textBox1.Text = "textBox1";
i need the Name property set first.
Thanks,
Tommy
.
- Prev by Date: Re: Extreme 3-Tier Binding Problem
- Next by Date: Customizing TableLayoutPanel control designer
- Previous by thread: Re: Extreme 3-Tier Binding Problem
- Next by thread: Customizing TableLayoutPanel control designer
- Index(es):
Relevant Pages
|