How to Open a dialog

I should know this, but I don't. How do I open a Dialog as a dialog?
Its opens as a page, but I don't understand how to just "open it" as a dialog.
I have tried the code at the bottom of the example code, but that didn't work for me. Probably because I don't know where to put place it or ???

I have a single page application, everything is done from Index and IndexBase and the Dialog code is in a class called "KeywordDialog" and I have found all of the forum topics about this, and so I have added the appropriate to the services, and the top of the MainPage.
thank you

You want to use simple dialog (the second button in our demo)? The code you need is:

async Task ShowSimpleDialog() => await dialogService.OpenAsync("Simple Dialog", ds =>
        @<RadzenCard Style="padding: 20px;">
        <p Style="margin-bottom: 10px;">Confirm?</p>
        <div class="row">
            <div class="col-md-12">
                <RadzenButton Text="Ok" Click="()=> ds.Close(true)" Style="margin-bottom: 10px; width: 150px" />
                <RadzenButton Text="Cancel" Click="()=> ds.Close(false)" ButtonStyle="ButtonStyle.Secondary"  Style="margin-bottom: 10px; width: 150px"/>

and here is how to call it:
<RadzenButton Text="Show simple dialog" Click="@ShowSimpleDialog" />

If I do that, as far as I know, I have to have the RadzenButton on the same component.
If I do that, then the component just shows all the time, though I do get a popup asking me if I really want to see it.
I am trying to find a way to use the DialogService built in events to open it, or else maybe you can explain where to put the button in your suggestion if it cannot go on the component to be popped up without the component always showing.
The preferred answer is to go through the DialogService events though, as all my other buttons are currently also routed through events.

(I have substituted () for angle brackets in the following sentence)
What I thought should work is something like DialogService(MyComponent).Open(,,,); but not to be.

thank you and much appreciated,

Nevermind, I found it.
There is a bug in Blazorf that makes things appear to be errors that are not actually errors. When I deleted the obj folder, that fixed this bug and then this was no longer displayed as "Not found" on the Open();
Which even though I knew about the bug, i took the "not found error" to be a real bug.

How to use "RadzenButton Text="Show simple dialog" Click="@ShowSimpleDialog" />" control inside await dialogService.OpenSideDialog..
I need Dialog at the Side of the page