any suggestion for me if I want to make Telerik popup like the following way: modal popup and wait for user input, then do next step based on user choose?
1 Answer, 1 is accepted
0
Accepted
Lance | Senior Manager Technical Support
Telerik team
answered on 28 Mar 2023, 04:56 PM
Hi Scofield,
Technically that UI element in the screenshot is not a modal dialog, it's an inline UI element in the same form as the Label above it. In this case you can use VerticalStackPanel with the design elements to create the box.
If you are just asking about replicating that appearance inside a RadPopup, you can definitely do that because the RadPopup lets you put whatever content you want into it. Please visit the following documentation tutorial about how to set the popup's Content property => .NET MAUI Popup Documentation - Content.
If you're asking for UI design guidance on how to make a layout like that, I'm afraid that UI-UX design replication this is a bit outside the scope of this forum. That said, I can tell you what I think I see in there:
Two labels
The top label has a larger font size, but is also using Bold
The bottom label is standard size and weight
Two buttons
Both buttons have no borders (i.e. BorderThickness=0)
Both buttons have Transparent background color (so that only the text is visible
You can use a Grid as the root layout
Place the two Label in a VerticalstackLayout and set top-left orientation inside the Grid
Place the two Buttons ins a HorizontalStackLayout and set the bottom-right orientation inside the Grid
Regards,
Lance | Manager Technical Support
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Lance thanks for your feedback, but I'm not asking the UX design of Popup, the purpose is checking if we can get user input inside of popup after we close it, so I'm using Action callback in popup close event.
Lance | Senior Manager Technical Support
Telerik team
commented on 29 Mar 2023, 07:28 PM
Thanks for further clarifying the end goal! It depends on how you're defining the content. You can directly access the x:Names of elements inside the popup content after the close button is pressed.
This is a different paradigm you might have used before where a dialog is in a visual tree island, inaccessible to the rest of the page code, so you're forced to use a callback to receive any info from the dialog (e.g. the other style Xamarin/MAUI ShowDialog)
So in the case of the RadPopup, you'd just use the NO button click event handler or the YES button click handler. Of course, I imagine the real implementation is a little more complicated than just a Yes/No button set, but just know that you have access to the XAML elements inside the popup in the your page code.