feat: refactor dialog host to accept drawer.
This commit is contained in:
@@ -58,7 +58,7 @@ public static class OverlayDialog
|
||||
{
|
||||
var host = OverlayDialogManager.GetHost(hostId);
|
||||
if (host is null) return;
|
||||
var t = new DialogControl()
|
||||
var t = new CustomDialogControl()
|
||||
{
|
||||
Content = new TView(),
|
||||
DataContext = vm,
|
||||
@@ -72,7 +72,7 @@ public static class OverlayDialog
|
||||
{
|
||||
var host = OverlayDialogManager.GetHost(hostId);
|
||||
if (host is null) return;
|
||||
var t = new DialogControl()
|
||||
var t = new CustomDialogControl()
|
||||
{
|
||||
Content = control,
|
||||
DataContext = vm,
|
||||
@@ -89,7 +89,7 @@ public static class OverlayDialog
|
||||
var view = host.GetDataTemplate(vm)?.Build(vm);
|
||||
if (view is null) view = new ContentControl() { Padding = new Thickness(24) };
|
||||
view.DataContext = vm;
|
||||
var t = new DialogControl()
|
||||
var t = new CustomDialogControl()
|
||||
{
|
||||
Content = view,
|
||||
DataContext = vm,
|
||||
@@ -135,7 +135,7 @@ public static class OverlayDialog
|
||||
{
|
||||
var host = OverlayDialogManager.GetHost(hostId);
|
||||
if (host is null) return Task.FromResult(default(TResult));
|
||||
var t = new DialogControl()
|
||||
var t = new CustomDialogControl()
|
||||
{
|
||||
Content = new TView(),
|
||||
DataContext = vm,
|
||||
@@ -150,7 +150,7 @@ public static class OverlayDialog
|
||||
{
|
||||
var host = OverlayDialogManager.GetHost(hostId);
|
||||
if (host is null) return Task.FromResult(default(TResult));
|
||||
var t = new DialogControl()
|
||||
var t = new CustomDialogControl()
|
||||
{
|
||||
Content = control,
|
||||
DataContext = vm,
|
||||
@@ -168,7 +168,7 @@ public static class OverlayDialog
|
||||
var view = host.GetDataTemplate(vm)?.Build(vm);
|
||||
if (view is null) view = new ContentControl() { Padding = new Thickness(24) };
|
||||
view.DataContext = vm;
|
||||
var t = new DialogControl()
|
||||
var t = new CustomDialogControl()
|
||||
{
|
||||
Content = view,
|
||||
DataContext = vm,
|
||||
@@ -178,7 +178,7 @@ public static class OverlayDialog
|
||||
return t.ShowAsync<TResult?>(token);
|
||||
}
|
||||
|
||||
private static void ConfigureDialogControl(DialogControl control, OverlayDialogOptions? options)
|
||||
private static void ConfigureDialogControl(CustomDialogControl control, OverlayDialogOptions? options)
|
||||
{
|
||||
options ??= OverlayDialogOptions.Default;
|
||||
control.HorizontalAnchor = options.HorizontalAnchor;
|
||||
|
||||
Reference in New Issue
Block a user