Hi.
I have a question about the WindowedDocumentUIService.
I am using the code below to pop up the pop-up window.
I always want to show a pop-up window in the center of my parents' window.
But it does not appear in the center of the parent window.
The pop-up window is always located in the center of the main window.
How can I implement the functionality I want?
-----------------------------------------Code----------------------------------------------
XAML<MainWindow.xaml>
<dxmvvm:Interaction.Behaviors>
<dx:WindowedDocumentUIService x:Name="DocumentPopupService" WindowStartupLocation="CenterOwner" DocumentShowMode="Dialog" />
<dx:WindowedDocumentUIService x:Name="DocumentModalessPopupService" WindowStartupLocation="CenterOwner" DocumentShowMode="Default"/>
</dxmvvm:Interaction.Behaviors>
<MainWindowViewModel>
C#void IMain.OpenDocumentPopup(...... object parent)
{
IDocument doc = DocumentModalessPopupService.FindDocumentByIdOrCreate(id, sv =>
{
IDocument document = sv.CreateDocument(viewName, parameter, parent); <<<<<<<<< parent
document.DestroyOnClose = true;
document.Title = title;
return document;
});
doc.Show();
DocumentModalessPopupService.ActiveDocument = doc;
}
<Sub1ViewModel>
object parent = this;
Main.OpenDocumentPopup(… parent); <<<<<<<<< parent