Hello,
In my MainWindow I call OnInitialized a XamDialogWindow and add it to the UICollection of a grid:
XamDialogWindow _logon = new XamDialogWindow ();
this.DialogAddContainer.Children.Add(_logon);
My MainWindow has only, something like this:
<Window ...
<Grid Name="DialogAddContainer">
<Grid >
// content
</Grid>
And my XamDialogwindow is in a UserControl:
<UserControl.....
<my:XamDialogWindow
IsModal="True"
So when my goal is to display the dialog window at startup Modal over the rest of my application
and it should be have an alignment the center of the window.
So I get this when setting my UserControl Horizontal and VerticalAlignment to center, then the
XamDialogWindow is displayed in the center of my Window but it is no longer Modal.
How can I get the XamDialogWindow in a Usercontrol to the center of an window and keep it Modal of
my hole window?
regards
Please look at the attached project. If I understand you correctly the project should meets your requirements.
Tell me if you need more assistance on the matter or if you have any questions.
Regards,
Anastas
Helped me alot... my goodness it was so easy ...
Thanks!