Hello,
I have a problem with the DialogService drag
option. I'm setting the drag option to true
, and while I can move the dialog form, the initial position remains behind on the screen.
You can see my screen and code attached.
Thank you for your support. By the way, I have explored all topics and examples, but I couldn’t succeed.
I haven’t seen such problem before. How can be reproduced?
Hello again,
I want to post the whole code. Actually I press the mouse button and move the popup dialog. Actually when I release the mouse button it should not show the start screen. But it stays there.
Thank you
We will unable to debug screenshots - use our demos (they are editable) to try to replicate your scenario.
@using Microsoft.JSInterop
@using System.Text.Json
@inject DialogService DialogService
@inject IJSRuntime JSRuntime
<style>
</style>
@code {
public static async Task<bool> ShowPopup<T>(DialogService dialogService, string title, Dictionary<string, object> parameters, DialogOptions options)
where T : ComponentBase
{
var result = await dialogService.OpenAsync<T>(
title,
parameters,
options);
if (result is bool boolResult)
{
return boolResult;
}
return false;
}
}
async Task OpenForm_Kategori()
{
bool result = await PopupForm.ShowPopup<Pages.Kategori.KategoriView>(DialogService, "Kategori", new Dictionary<string, object>
{
{ "popup_screen", true }
},
new DialogOptions()
{
Width = "700px",
Height = "730px",
CloseDialogOnOverlayClick = false,
CssClass = "my-custom-popup",
Draggable=true,
Resizable = true
});
data_list_kategori = await KategoriService.GetAll();
StateHasChanged();
}```
This code is not runnable too. We can't help you if you don't provide a reproduction.