Re: Serialization Order for IExtenderProvider Properties

Tech-Archive recommends: Speed Up your PC by fixing your registry



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
.



Relevant Pages

  • Re: port or bag it and start over
    ... >> And with the Crystal Reports XI RDC, now a total bitch to deal with. ... >> to what's left of the existing controls. ... >> SQL Server provider that I keep reading I NEED to be using. ... >> process to go from a boat-load of data environment objects bound to ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Deploying a VB.NET Application to IP site
    ... if they dont open an account with http://www.brinkster.com/ and upload your ... > WEB Page provider by my Internet Provider. ... > no TEXTBOX or Button controls present? ... > I have loaded up a personal site using MS Publisher previously without any ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Concerns about exception string revealing internals/data about
    ... the build-in controls in SQL Server2000 or .Net winform/Asp.net controls? ... underlying provider really incoporates well with the underlying database, ... Do you meet the scenario that the Microsoft provider does not provide the ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.clr)
  • RE: IE Web Controls- problems and failures
    ... "tommy" wrote: ... i have download the setup.exe from microsoft ... > controls" and run build.bat. ... i have created a new web application and copy the samples directory ...
    (microsoft.public.dotnet.framework.aspnet)
  • Web Part calling another web part
    ... I have a provider and consumer web parts... ... Similarly for Condition "C" I have ConCtrl1 created if C is true else ... depending on teh controls created. ...
    (microsoft.public.sharepoint.portalserver.development)