views:

40

answers:

0

First I've create a wpf application, then i add new RibbonWindows to application, say it RibbonWindow1, now i want to set the content of the ribbon control via bellow code and show the ribbon:

 RibbonWindow1 ribWindow = new RibbonWindow1
            {
                Title = "This is a ribbon window",
                Content = new UserControl1()
            };
            ribWindow.ShowDialog();

but i can't see the ribbon bar, if i remove content the ribbon will be shown, also if i use drag and drop i can show it, but i want to do it via a simple code, dynamically. If i can Dock the related control in specific grid cell will be helpful to me. any suggestion :D