G
Guest
Is there a fix for the bug in the SplitContainer control?
When the designer generates the code for a SplitContainer, it does so in
this order:
this.mainSplitContainer.Panel2MinSize = 290;
this.mainSplitContainer.Size = new System.Drawing.Size(587, 315);
this.mainSplitContainer.SplitterDistance = 290;
The first line of this sequence throws an InvalidOperationException with a
message of: "SplitterDistance must be between Panel1MinSize and Width -
Panel2MinSize."
If you move the initialization of the Size property above the initilization
of the Panel2MinSize property, the code works fine. I have found a few other
places that discuss this error including a feedback post from when Visual
Studio was in Beta, but apparantely, this one slipped through the cracks.
Has Microsoft released any kind of fix or workaround for this yet?
When the designer generates the code for a SplitContainer, it does so in
this order:
this.mainSplitContainer.Panel2MinSize = 290;
this.mainSplitContainer.Size = new System.Drawing.Size(587, 315);
this.mainSplitContainer.SplitterDistance = 290;
The first line of this sequence throws an InvalidOperationException with a
message of: "SplitterDistance must be between Panel1MinSize and Width -
Panel2MinSize."
If you move the initialization of the Size property above the initilization
of the Panel2MinSize property, the code works fine. I have found a few other
places that discuss this error including a feedback post from when Visual
Studio was in Beta, but apparantely, this one slipped through the cracks.
Has Microsoft released any kind of fix or workaround for this yet?