I want to create a dialog for editing some field and I need to make custom content for dialog and get the response from it to reload the Data. So, I read all content about dialog and popup in link below
http://zebble.net/docs/alerts-and-dialogs
And then I test this code:
In another page I want to show the popup:
await Nav.ShowPopUp<CustomeDialogPage>();
My custom Zebble page:
<z-Component z-type="CustomeDialogPage"
z-base="Page"
z-namespace="UI.Pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../.zebble-schema.xml">
<Stack CssClass="customedialog">
<Button Text="OK" />
</Stack>
</z-Component>
And then I create stylesheet for that
.customedialog {
width: 300px;
height: 100px;
background: #ffffff;
border: 2px;
padding: 5px;
margin-top: 100px;
}
but, I could not able to close the popup or add a title section for it and I do not know how I can get the result of it. And it is a sample dialog I want to use it like below:
Zebble provides you with other overloads of the Nav pop-up methods to help you achieve that.
Host page:
var result = await Nav.ShowPopup<TargetPage, SomeType>();
// Now you can use "result".
Pop-up page's close button:
...
await Nav.HidePopup(someResultValue);
Notes:
"SomeType" can be a simple type such as boolean or string, or it can be a complex class.
The type of the object returned by the pop-up must match the one expected by the host parent page.
You can check out the full spec here: http://zebble.net/docs/showing-popup-pages