better form start position detection
This commit is contained in:
@@ -44,13 +44,13 @@ partial class RadDialogBase
|
||||
|
||||
public static T Show<T>(T dialogPanel, IWin32Window? parent, string? title, object? icon) where T : RadFlyoutBase
|
||||
{
|
||||
CreateForm(dialogPanel, parent, title, icon).Show();
|
||||
CreateForm(dialogPanel, parent, title, icon, FormStartPosition.CenterScreen).Show();
|
||||
return dialogPanel;
|
||||
}
|
||||
|
||||
public static T ShowDialog<T>(T dialogPanel, IWin32Window? parent, string? title, object? icon) where T : RadFlyoutBase
|
||||
{
|
||||
CreateForm(dialogPanel, parent, title, icon).ShowDialog();
|
||||
CreateForm(dialogPanel, parent, title, icon, FormStartPosition.CenterParent).ShowDialog();
|
||||
return dialogPanel;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ partial class RadDialogBase
|
||||
return dialogPanel;
|
||||
}
|
||||
|
||||
private static RadDialogBase CreateForm<T>(T dialogPanel, IWin32Window? parent, string? title, object? icon) where T : RadFlyoutBase
|
||||
private static RadDialogBase CreateForm<T>(T dialogPanel, IWin32Window? parent, string? title, object? icon, FormStartPosition startPosition) where T : RadFlyoutBase
|
||||
{
|
||||
dialogPanel.Dock = DockStyle.Fill;
|
||||
|
||||
@@ -74,7 +74,7 @@ partial class RadDialogBase
|
||||
{
|
||||
Text = title,
|
||||
Icon = icon as Icon,
|
||||
StartPosition = parent == null ? FormStartPosition.CenterScreen : FormStartPosition.CenterParent,
|
||||
StartPosition = startPosition,
|
||||
ClientSize = dialogPanel.Size
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>2.12.3</Version>
|
||||
<Version>2.12.4</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user