Just look at sample for dialogwindow. The code like:
XamDialogWindow win = CreateDialogWindow();win.ModalBackgroundEffect = null;win.IsModal = true;win.Content = new MyUsercontrol();this.LayoutRoot.Children.Add(win);
So it means when open a dialog, you must find out a parent container for it. My situation is:
I have a toolbar user control with height like height = 25. Then there is a button to open a dialogwindow.
Then I use this toolbar control in any other user control, when open dialogwindow with above kind of code, it will expand toolbar height because it is inside the tool bar and messed up the UI layout.
But what I want it the dialogwindow can be opened based on brower window, not the control.
How to reslove this problem it?
This has nothing to do with limitations of Silverlight, but rather the desing of the XamDialogWindow control. I just blogged about how to show the XamDialogWindow in a ViewModel without it being part of the visual tree. Of course, as the post says, I would still use a Dialog Service to show the dialog as your VM should be ignorant to Views.
http://brianlagunas.com/2013/05/18/showing-the-xamdialogwindow-from-a-viewmodel-in-silverlight-and-wpf/