Wizard not showing my controls

Sep 5, 2007 at 11:47 AM
I have created a wizard bound to a recipe. I have placed 1 label and 1 textbox in it however during testing, I can see the wizard however I can't see the label and textbox. Here is the designer code:

CreatePartialWiz.Designer.cs:
namespace Microsoft.Practices.ServiceFactory.Recipes.CreatePartial
{
partial class CreatePartialWiz
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Component Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CreatePartialWiz));
this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.txtClassNm = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
this.SuspendLayout();
//
// infoPanel
//
resources.ApplyResources(this.infoPanel, "infoPanel");
this.infoPanel.Size = new System.Drawing.Size(703, 319);
//
// errorProvider
//
this.errorProvider.ContainerControl = this;
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.txtClassNm);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(700, 144);
this.panel1.TabIndex = 3;
//
// txtClassNm
//
this.txtClassNm.Location = new System.Drawing.Point(286, 48);
this.txtClassNm.Name = "txtClassNm";
this.txtClassNm.Size = new System.Drawing.Size(100, 20);
this.txtClassNm.TabIndex = 6;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(210, 56);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(69, 13);
this.label1.TabIndex = 5;
this.label1.Text = "Class Name :";
//
// CreatePartialWiz
//
resources.ApplyResources(this, "$this");
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel1);
this.Name = "CreatePartialWiz";
this.Size = new System.Drawing.Size(703, 469);
this.Controls.SetChildIndex(this.infoPanel, 0);
this.Controls.SetChildIndex(this.panel1, 0);
((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.ErrorProvider errorProvider;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtClassNm;
private System.Windows.Forms.Label label1;
}
}

CreatePartialWiz.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Microsoft.Practices.ServiceFactory.Library.Presentation.Base;
using Microsoft.Practices.ServiceFactory.Library.Validation;
using Microsoft.Practices.WizardFramework;

namespace Microsoft.Practices.ServiceFactory.Recipes.CreatePartial
{
public partial class CreatePartialWiz : ViewBase, ICreatePartialWizView
{
public CreatePartialWiz()
{
InitializeComponent();
}

public CreatePartialWiz(WizardForm parent)
: base(parent)
{
InitializeComponent();

if(this.DesignMode)
return;

this.txtClassNm.TextChanged += OntxtClassNmTextBoxTextChanged;

}

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
//InitializePresenterAndModel();
Wizard.OnValidationStateChanged(this);
}

public override bool IsDataValid
{
get
{
RequestDataEventArgs<bool> args = new RequestDataEventArgs<bool>();
OnRequestIsDataValid(this, args);
if (args.ValueProvided)
{
return args.Value;
}
return base.IsDataValid;
}
}

#region ICreatePartialWizView Members
RecipeArgument
public string NodeName
{
get
{
return this.txtClassNm.Text;
}
set
{
if (value != null)
{
this.txtClassNm.Text = value;
}
}
}

public event EventHandler<ValidationEventArgs> txtClassNmChanged;
public event EventHandler<RequestDataEventArgs<bool>> RequestIsDataValid;
#endregion

void OntxtClassNmTextBoxTextChanged(object sender, EventArgs e)
{
OntxtClassNmChanged(sender, CreateValidationEventArgs(this.txtClassNm, this.errorProvider));
}

protected void OntxtClassNmChanged(object sender, ValidationEventArgs args)
{
if (txtClassNmChanged != null)
{
txtClassNmChanged(sender, args);
}
}

protected virtual void OnRequestIsDataValid(object sender, RequestDataEventArgs<bool> e)
{
if (RequestIsDataValid != null)
{
RequestIsDataValid(sender, e);
}
}


}
}

Hope to hear from you guys...By the way.. im using the V3B117 Alpha version...