This project is read-only.

Create a TextBox in C#

Mar 4, 2010 at 8:27 PM

Hello,

My experience in WPF is low. I don't know if this problem concerns WPF
or Avalon. Sorry for that.

I can see the pane but the textbox doesn't appear. What am I doing wrong here?

Thank you
Frédéric

source:

           System.Windows.Forms.TextBox tb = new System.Windows.Forms.TextBox();

           DockableContent dc = new DockableContent();
           dc.Height = 200;
           dc.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
           dc.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
           dc.Title = "MyTextBox";
           dc.Content = tb;
           dc.SetAsActive();

           DockablePane dockPanel = new DockablePane();
           dockPanel.Name = "MyPane";
           dockPanel.Items.Add(dc);

           _mainPane.Children.Add(dockPanel);

xaml:

   <ContentControl x:Name="ContentContainer">
          <ad:DockingManager x:Name="_dockingManager">
               <ad:ResizingPanel x:Name="_mainPane">
               </ad:ResizingPanel>
           </ad:DockingManager>
   </ContentControl>