public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Project024_Bomberman;component/ControlFolder/Chat.xaml", System.UriKind.Relative));
     this.lbUsers     = ((System.Windows.Controls.ListBox)(this.FindName("lbUsers")));
     this.tabChat     = ((System.Windows.Controls.TabControl)(this.FindName("tabChat")));
     this.tabItem1    = ((System.Windows.Controls.TabItem)(this.FindName("tabItem1")));
     this.chatWindow1 = ((Project023_SilverlightChat.ChatWindow)(this.FindName("chatWindow1")));
     this.grid1       = ((System.Windows.Controls.Grid)(this.FindName("grid1")));
     this.btnSend     = ((System.Windows.Controls.Button)(this.FindName("btnSend")));
     this.txtMessage  = ((System.Windows.Controls.TextBox)(this.FindName("txtMessage")));
     this.btnUsers    = ((System.Windows.Controls.Button)(this.FindName("btnUsers")));
     this.btnAdd      = ((System.Windows.Controls.Button)(this.FindName("btnAdd")));
     this.listBox1    = ((System.Windows.Controls.ListBox)(this.FindName("listBox1")));
 }
 private void UpdateLayout(ChatWindow cw)
 {
     cw.myScrollViewer.UpdateLayout();
     cw.myScrollViewer.ScrollToVerticalOffset(cw.txtChat.ActualHeight);
     cw.myScrollViewer.UpdateLayout();
 }