I want to call a function from a .xaml.cs file from within a .blazor page. The goal is to call it when a specific button is clicked, but I can't find any information on how to accomplish this; the most I've found is communicating from MainLayout.razor, which isn't helpful to me. Having the button be directly inserted into the .xaml file won't work either, because I need it to be inaccessible except under certain conditions determined inside the .blazor page. I tried Application.Current.MainPage, but sadly that does not allow me to reach the function. Any and all help is appreciated!
↧