Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exactly when should you call InitializeComponent()?
Message
From
30/07/2008 11:46:01
 
 
To
All
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Title:
Exactly when should you call InitializeComponent()?
Miscellaneous
Thread ID:
01335283
Message ID:
01335283
Views:
54
when is the right time to call InitializeComponent();?
     public Window1()
        {

            HolePatterns = new ObservableCollection<HolePattern>();
            HolePatterns.CollectionChanged += new NotifyCollectionChangedEventHandler(HolePatterns_CollectionChanged);

            CurrentHolePattern = new HolePattern();
            CurrentHolePattern.PatternName = "Test Pattern Name";

            //-- Set some default values for the UI
            CurrentHolePattern.BoltCirDia = 12.0;
            CurrentHolePattern.HoleCount = 6;
            CurrentHolePattern.StartAngle = 0;

            HolePatterns.Add(CurrentHolePattern);
            
            InitializeComponent();
            
            SketchX0 = canvas1.Width / 2;
            SketchY0 = canvas1.Height / 2;                   
            SketchBoltCirRad = canvas1.Width / 2 * .7;


            CoordinateGrid.ItemsSource = CurrentHolePattern.HoleList;

            RedrawScreen();


        }
Next
Reply
Map
View

Click here to load this message in the networking platform