1

I have a RibbonControl in a small WPF application, and I have a button called Search. My idea is that when I press this button in the Main Window, I load a user control, and I wish to get a result like "TweetDeck" does, ie every time I press the Search button, the user control is pinned in the main window.

Is there a tutorial or an example of how I can do this?

Thanks for your help and time.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
JMon
  • 3,387
  • 16
  • 63
  • 102

2 Answers2

0

"the user control is pinned in the main window". That sounds like a modal dialog, check this : Handling Dialogs in WPF with MVVM

Community
  • 1
  • 1
Natxo
  • 2,917
  • 1
  • 24
  • 36
  • I was thinking more on a simple approach, since I have not gone into MVVM yet. At the moment I have something hardcoded which works – JMon Nov 03 '11 at 14:31
0

Ok managed to solve my problem

    UserControl uc1 = new UCTeamTweet();
    uc1.Width = Convert.ToInt32("300");
    uc1.Height = Convert.ToInt32("700");
    uc1.HorizontalAlignment = HorizontalAlignment.Left;
    uc1.VerticalAlignment = VerticalAlignment.Top;
    stkPnlSearch.Children.Add(uc1);

I do not know if its the right solution though it works fine for my purposes

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
JMon
  • 3,387
  • 16
  • 63
  • 102