Showing Popups in .NET MAUI with .NET MAUI Community Toolkit

Поділитися
Вставка
  • Опубліковано 11 жов 2024

КОМЕНТАРІ • 101

  • @BlakeRosss
    @BlakeRosss 2 роки тому +4

    Great video, Gerald! I've been working with these popups for a little while now. Two questions:
    - Any word on when popups will work with hot reload?
    - Is there any effort being put into not having to manually size popups? I'd love for them to just size to their content like any layout would.

  • @stefanosantin2864
    @stefanosantin2864 Рік тому +8

    The way you use the popup is code behind. I have try to use it with mvvm but I can't use the "Close()" . Can you explain how to close a popup in mvvm pattern?

  • @GuildOfCalamity
    @GuildOfCalamity 2 роки тому +1

    Great video! Can you do a demo on creating a custom calendar control? The default one isn't that great, there's no way to select a range of days.
    Would also like to see you go into details on the sizing techniques you mentioned for the popup.

    • @jfversluis
      @jfversluis  2 роки тому

      Check out this one for the calendar: ua-cam.com/video/aw7b_Xt1fng/v-deo.html it also has .NET MAUI support

  • @gohilmilan
    @gohilmilan 2 роки тому +4

    Great. Would you please create one video on how to deal with Popup's own ViewModel and Dependency Inject the services in it, rather than everything in code behind? Real apps uses ViewModel and DI concepts and this kills us 🙂 Thanks.

    • @jfversluis
      @jfversluis  2 роки тому

      The popup is just a page, so whatever you do for any other page, should also work for a popup!

    • @luca058
      @luca058 Рік тому +2

      ​@@jfversluis hi I think what he meant was not to create the popup with new Popup() but with some kind of transient. I would very much like to know how to do so. Btw. is there a way to make the popup fly in with some animation? Thank you very much!

  • @str82hrt
    @str82hrt Рік тому

    Great......i watch your videos and they all are really nice. I always take help from your videos.
    I have a question: Can we use TabbedPage inside ContentPage? Is there any video or can you make any video of it or is there any link regarding this topic ?

  • @mreirik2151
    @mreirik2151 2 роки тому +2

    Great video, but a little buggy feature. XAML hot reloading seems to be not enabled for this control, and with my apps VS restart time of about 30 second it takes to long. But I found it to be copy-paste XAML to and from a normal page to get around this.

    • @jfversluis
      @jfversluis  2 роки тому

      I think hot reload works, you just need to open the popup again for the changes to show

  • @jakobwitczak651
    @jakobwitczak651 3 місяці тому

    Thank you for the great video. How can I trigger the ShowPopupAsync in a ContentView? I'm trying to use the BindableProperty but somehow it doesn't work. Do you have an example for this? Thank you

  • @darrelllubben9119
    @darrelllubben9119 Рік тому

    Gerald I enjoy all of your videos thank you. Not sure where to ask this. Could you do a video on Connectivity to WIFI. Specifically to get SSID Name and Gateway IP address across all platforms. I use to be able to Select the WIFI connection I wanted directly in my App. Not sure how things changed between Xamarin and Maui. The Connectivity interface does not include the things I need.

  • @MalikUsman-td6ed
    @MalikUsman-td6ed 2 роки тому

    Hi @Gerald Versluis very helpful and handy video really needed that one. Can you please show or mention that how to open it from the native code?

  • @yuriyholembyovskyy1223
    @yuriyholembyovskyy1223 2 роки тому +3

    What is the correct approach to get result from popup according to MVVM?

    • @jfversluis
      @jfversluis  2 роки тому

      Probably wrap it in a service and inject that :)

  • @SuperGulamali
    @SuperGulamali 2 роки тому +6

    How do I create a popup that automatically sizes based on its children instead of using Height and Width.

    • @bbhoodsta
      @bbhoodsta 2 роки тому

      Im having this issue as well. I think it works fine on Android but does not resize to the contents on iOS.

  • @yaKaiZen
    @yaKaiZen 2 роки тому

    Another great video & liked it! Thanks!

  • @josa951
    @josa951 23 години тому

    Is it possible to make background transparent on popup, for example I'm having activity indicator, everything around is dimmed, but the square around the circle (loader) is white, I tried setting it up to be transparanent but it does nothing

  • @cbradbaer
    @cbradbaer 2 роки тому +1

    Hi Gerald, thanks for the timely video. Just what I am working on. I am trying to set the size of the popup at runtime. I am using a binding in the header of the xaml. Size="{Binding size}". where size is determined by the format of the device. But it is not changing the size of the popup. Any ideas? For my current test size="411, 914"

  • @abdullanalappad4997
    @abdullanalappad4997 2 роки тому

    Great. Thanks for the video. Do you know if we could apply some animations to the popup when appears/disappears (like we have in Rg.Plugin)?

  • @lanemathlessons
    @lanemathlessons Рік тому

    Can you give more details on anchoring a popup to a point? I'm trying to put in a method to move a popup, and I think anchors are the way to go. I just have no idea how to set an anchor as a point.

  • @BreakingSkiesMedia
    @BreakingSkiesMedia Рік тому

    actually a very helpful thing, dont wanna use the rg pop up any more. but two things I noticed: 1) dont work with hot reload, that needs to be fixed ;) and 2) how can I dismiss the popup from another page? Say I create a user and I wanna show im a popup with a loading icon on it. Now I dont want the user to dismiss the popup himself so I disable that. But I also need to know when the user has been created, so I need to be able to dismiss the popup from the page that originally loaded it

    • @BreakingSkiesMedia
      @BreakingSkiesMedia Рік тому

      oh, nvermind. you can just literally go pop.close() on the instance of the variable :)

    • @BreakingSkiesMedia
      @BreakingSkiesMedia Рік тому

      i did however notice, that the popup doesnt seem to work with displayAlert() function

    • @jfversluis
      @jfversluis  Рік тому +1

      I think Hot Reload works, but you do need to close and reopen the popup to see the change.
      Looks like you figured out the rest in the other comments :)

  • @RamiroPérez-j6u
    @RamiroPérez-j6u Рік тому

    Thanks for the video. Is there a way to pass parameters to the popup? and call a Converter?

  • @erkkitr
    @erkkitr 8 місяців тому

    Hello Gerald, thanks for a greate guiding again. A question: how do you return values from popups?

    • @jfversluis
      @jfversluis  8 місяців тому

      Thank you!
      Although this is Xamarin the concept should be the same: Pass Data From and To Popups with Xamarin Community Toolkit
      ua-cam.com/video/d2SEOj0o5j4/v-deo.html

  • @mikaelmattsson5713
    @mikaelmattsson5713 2 роки тому

    Great video as alsways Gerald!
    I have app running in fullscreen/immersive mode on Android.
    When a popup is displayed, the android navigation buttons at the bottom is displayed.
    Closing the popup hides the navigation buttons again.
    Is this a bug or feature in the popup implementation? (Testing the same with a Shell based app does not hide the navigation buttons after closing a popup)

  • @ricardoalejandroescalantem8217
    @ricardoalejandroescalantem8217 2 роки тому

    A todo dar Gerald, saludos desde la capital nacional del calzado. 😁

    • @jfversluis
      @jfversluis  2 роки тому

      Greetings back my friend! Thanks so much for your support!

  • @iancarroll3918
    @iancarroll3918 2 роки тому +1

    How could we use the popups to ask the user a question or to enter sime details and then get the replies back to the calling program?

  • @431BlackHole
    @431BlackHole 9 місяців тому

    Thank you!

  • @AthiraRNAIR-gr7gc
    @AthiraRNAIR-gr7gc 7 місяців тому

    Hello. Is there any way that we can pass value to a progress bar inside the pop up. Based on the background task download happening in the viewmodel. Basically pass the value after the pop up is loaded

  • @nicwillemse
    @nicwillemse Місяць тому

    Thanks for the video! Unfortunately it seems that you are not able to display a popup from a view model which is a bit of a draw back! The app crashes miserably!

    • @jfversluis
      @jfversluis  Місяць тому +1

      I think we did some fixes for that. If there is still work to do, make sure to open an issue on the repository!

    • @nicwillemse
      @nicwillemse Місяць тому

      @@jfversluis Yup see that now, thank you for responding!

  • @EdRawrDev5813
    @EdRawrDev5813 Рік тому

    Hi sir Gerald I'm having a constant error like MAUI error The Parent must be of type Microsoft.Maui.Handlers.PageHandler every time I try to call .ShowPopup in a view model, any clues?

  • @mishomishev3152
    @mishomishev3152 Рік тому

    Awesome video.

  • @albertostring
    @albertostring 11 місяців тому

    How can I recive values from a viewModel?, there is any animations?, what about close from viewmodel

  • @KravchenkoIgor
    @KravchenkoIgor 2 роки тому

    Nice video preview

  • @mbz686
    @mbz686 Рік тому

    It's not working :/ ... the xaml doesn't recognize the community toolkit namespace. Can you help?

  • @anonimoanonimo3393
    @anonimoanonimo3393 10 місяців тому

    Do you recommend using this library or using the Community one?

    • @jfversluis
      @jfversluis  10 місяців тому

      Both have their own ways I suggest trying both and see what sticks for you

  • @eliaskoukoulas6215
    @eliaskoukoulas6215 2 роки тому

    Is it possible to open a popup inside another popup? I tried it and i got a error: Java.Lang.IllegalStateException
    Message=The specified child already has a parent. You must call removeView() on the child's parent first.

  • @SikandarAmla
    @SikandarAmla Рік тому

    Hey Gerald! Since this Popup is not MVVM aware, how can you use it to display the loader from the view model? If somehow you can manage to show the loader from the code behind (I guess using the PropertyChanged event handler of the view model), how would you close it when the API call is completed? To me, this control is useless since it doesn't offer flexibility. Unless Microsoft doesn't offer a close functionality from outside Popup code behind, this makes very little sense.

    • @jfversluis
      @jfversluis  Рік тому

      Arguably a popup is very much a thing that belongs to a view and thus can safely be triggered with code inside of your view. However, you can easily wrap the whole navigation into a service that can be used with MVVM if that's what you want. So I definitely don't think this is useless.

    • @SikandarAmla
      @SikandarAmla Рік тому

      @@jfversluis I appreciate your reply. Can you create a video that shows Popup in action showing the loader controlled from View Model? Thanks again

    • @jfversluis
      @jfversluis  Рік тому

      I’ll think about it. In the meantime, check the Toolkit sample app, I think there is a sample of it in there.

    • @SikandarAmla
      @SikandarAmla Рік тому

      @@jfversluis I'll check it again.

    • @SikandarAmla
      @SikandarAmla Рік тому

      @@jfversluis I couldn't find any example :(

  • @eliof.7310
    @eliof.7310 5 місяців тому

    Anyone got this error?
    Cannot create instance of type 'CommunityToolkit.Maui.Core.Views.MauiPopup': no Java peer type found.
    I got a simple popup with a color picker and i call it with ShowPopupAsync from a double tap event.
    In debug build works fine, but in release build give this error...

  • @BJBEAR989
    @BJBEAR989 Рік тому

    The videos are great. Is it possible to create tabbed pages inside the popup?

    • @jfversluis
      @jfversluis  Рік тому

      I guess that should be possible! Not sure about the user experience though 😅

  • @androidsavior
    @androidsavior 2 роки тому

    where did you get your shirt ?

    • @jfversluis
      @jfversluis  2 роки тому

      Hey thanks! You can find it here: microsoftmerchandise.com

  • @blinkskaterkc
    @blinkskaterkc 2 роки тому

    Do you know if this MCT popups is equivalent in features to Mopups? Haven't used either yet, but it would seem like Mopups is a better option..

    • @jfversluis
      @jfversluis  2 роки тому +1

      These two plugins do kind of the same but in a different way. If Mopups works better for you, please use that!

  • @henrysauzande7975
    @henrysauzande7975 2 роки тому

    How could we create an actionsheet like ios where the popup is that buttom of the screen and not the center? Otherwise great video as always

    • @jfversluis
      @jfversluis  2 роки тому

      You mean more like the action sheet that is built into .NET MAUI?

    • @henrysauzande7975
      @henrysauzande7975 2 роки тому

      Now how cool is that didn't know it was built-in to .NET MAUI 😀😀

  • @eugenekim1861
    @eugenekim1861 Рік тому

    Do you know how to avoid the popup disappearing when the main window resizes? This happens with Windows platform build.

    • @jfversluis
      @jfversluis  Рік тому

      Nope, sorry! You might want to open an issue on the repo for this one!

  • @sreenivasch9178
    @sreenivasch9178 8 місяців тому

    How can we show the popup in ContentView

  • @sonalirane4667
    @sonalirane4667 2 роки тому

    When can we see the CameraView in Community Toolkit for MAUI

    • @jfversluis
      @jfversluis  2 роки тому

      We don't have any date, but it's being worked on

  • @tanakamawere
    @tanakamawere Рік тому +1

    How do you do this in a ViewModel?

    • @jfversluis
      @jfversluis  Рік тому +1

      Wrap it in a navigation service

    • @princeyu3589
      @princeyu3589 Рік тому +1

      You can directly call the Application context of MainPage just like this one:
      Application.Current.MainPage.ShowPopup(new PopupPage());

  • @chrissevering1090
    @chrissevering1090 Рік тому

    Hello.. Can it be used in razor pages? in a MAUI Blazor app?

    • @jfversluis
      @jfversluis  Рік тому

      I guess technically you could. You would create a .NET MAUI page and add a BlazorWebView to that

    • @chrissevering1090
      @chrissevering1090 Рік тому

      @@jfversluis okay Bedankt!

  • @ebaysher572
    @ebaysher572 9 місяців тому

    Any way to show the popup or some toast out of the application?

    • @jfversluis
      @jfversluis  9 місяців тому

      You can do that with push notifications

    • @ebaysher572
      @ebaysher572 9 місяців тому

      @@jfversluis but what if I want something like popup to display, for oncall event?

    • @jfversluis
      @jfversluis  9 місяців тому

      @@ebaysher572 not sure if I fully understand what you mean. But anything you want to show outside of your application you will have to use push notifications

  • @trustingod0
    @trustingod0 Рік тому

    Can i show a popup like a view? I guess what i am saying is i want the popup functionality but i want it to look just like any other view because i am not using it as a dialogue but to show another view. Thanks

    • @jfversluis
      @jfversluis  Рік тому +1

      Then why not push just another page, maybe as a modal?

    • @trustingod0
      @trustingod0 Рік тому

      @@jfversluis Thank You So Much !!!

  • @stati5tik
    @stati5tik 7 місяців тому

    How can the popup border be rounded?

    • @jfversluis
      @jfversluis  7 місяців тому +1

      You can see an example of that here: github.com/CommunityToolkit/Maui/pull/1463

  • @dilshadzm786
    @dilshadzm786 10 місяців тому

    how to fill the size with screen size?

    • @jfversluis
      @jfversluis  10 місяців тому

      Get the current screen size with DeviceDisplay: learn.microsoft.com/dotnet/maui/platform-integration/device/display

  • @mcladyr7372
    @mcladyr7372 Місяць тому

    6:54 What's a nice color... /*can't think of any nice web color*/ Let's just make it white 😂😂😂

    • @jfversluis
      @jfversluis  Місяць тому

      I just love a functional design 😬

  • @odnalroemosiaw746
    @odnalroemosiaw746 2 роки тому

    @Gerald item not available on Github at the time of writing. Please address.

    • @jfversluis
      @jfversluis  2 роки тому +1

      Whoops, forgot to set it to public, thanks!

    • @odnalroemosiaw746
      @odnalroemosiaw746 2 роки тому

      @@jfversluis smile now available

  • @woistdasniveau8290
    @woistdasniveau8290 Рік тому

    Can Popups have ViewModels too?

  • @ThePredictR4036
    @ThePredictR4036 Рік тому

    If mct:Popup doesn't work for you, try toolkit:Popup

    • @jfversluis
      @jfversluis  Рік тому

      It all depends on what you put in the xmlns in the root of your page!

  • @zoiobnu
    @zoiobnu 2 роки тому

    We need a loading like Acr.UserDialogs loading on net MAUI