Prism - Using Composite Commands

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 24

  • @taab84
    @taab84 5 лет назад +3

    Prism changed the way i design WPF applications, thanks for this amazing Library

    • @BrianLagunas
      @BrianLagunas  5 лет назад

      Thank you for such kind words. I'm so happy Prism has provided value to you and your applications

  •  6 лет назад +5

    awesome, I can't live without prism :) thank you Sir Brian

  • @LeonardHarrisLH
    @LeonardHarrisLH 9 месяцев назад

    Hi Brian! We are using Prism MAUI, what if you need to refresh a page with tab views and its structured in a way that each tab has a command to be executed that refreshes its own content that the parent page can invoke, and each command may require a different parameter provided, can the Composite Command handle this type of situation? I don't currently see a way to do so but then maybe I am not using it as intended.

  • @rahulmathew8713
    @rahulmathew8713 4 года назад

    Hi Brian, You said to unregister the compositecommand after use. But where should we write that code. In your example you didnt include that.
    Please advise

    • @BrianLagunas
      @BrianLagunas  4 года назад

      If you're using the latest version of Prism, you can have your VM implement IDestructible and do this in the destroy method.

  • @zigggy5224
    @zigggy5224 4 года назад

    Is there a reason you created the ApplicationCommands class in a separate library? It seems like this could be just placed in the ModuleA project since this is the only place where this particular command will be used. Unless, the plan is to put all Composite Commands for all Modules in this one class?

    • @BrianLagunas
      @BrianLagunas  4 года назад

      You are correct. Only place something in the shared project if all modules will use it. Otherwise, put it where it is used.

  • @张校源
    @张校源 4 года назад +1

    Do you have soure code ?

    • @BrianLagunas
      @BrianLagunas  4 года назад +1

      Here is a sample: github.com/PrismLibrary/Prism-Samples-Wpf/tree/master/12-UsingCompositeCommands

  • @sikhas3789
    @sikhas3789 3 года назад

    How do we get around Composite command Can execute? I want to have an OR condition on Can Execute of all registered commands

    • @BrianLagunas
      @BrianLagunas  3 года назад +1

      Don't provide a CanExecute. Instead add the logic to check to invoke your command logic in the Execute method.

    • @sikhas3789
      @sikhas3789 3 года назад

      @@BrianLagunas Thank you. So the button stays enabled always rt? I am using it to Save all the changes throughout the application. It would have been so much more userfriendly if we can disable the button when there is nothing to Save, like the individual Save buttons

  • @Hilarychizi
    @Hilarychizi 4 года назад

    I just started with Prism and also more like a beginner in c#.
    My major challenge is how to connect different views to the shell when you have different modules.
    Also, trying to follow up on this, it was throwing up error.

    • @BrianLagunas
      @BrianLagunas  4 года назад

      You don't do anything special to navigate many views that belong to different modules into the same region. It just works. If you are getting errors, then you are doing something wrong.

    • @Hilarychizi
      @Hilarychizi 4 года назад

      @@BrianLagunas, do you have a link that will help me? The video on IEventAggregator didn't show the code code for initializing the modules.

  • @hamarasansarharsh
    @hamarasansarharsh 6 лет назад

    can you please make videos for important feature that can achieve using prism in wpf

    • @BrianLagunas
      @BrianLagunas  6 лет назад

      I'm sorry, could you please provide more detail for your request. What "important feature" are you referring to?

    • @hamarasansarharsh
      @hamarasansarharsh 6 лет назад

      @@BrianLagunas first of all thanks for reply.
      i mean what we can do extra in prism. you uploaded only 6 video. is this enough features in prism or more are there?
      I like your video that's why i want to go more deaper in prism.

    • @BrianLagunas
      @BrianLagunas  6 лет назад

      @@hamarasansarharsh Actually, I have 10 videos so far, and these are just the first of many. There are many many many more features in Prism that make building applications more productive, easier to maintain, easier to test, and easier to extend. Stay tuned for more videos :)

    • @hamarasansarharsh
      @hamarasansarharsh 6 лет назад

      @@BrianLagunas thanks waiting

  • @CatTrainerYT
    @CatTrainerYT 5 лет назад

    Can I get source code of all your demos?

    • @BrianLagunas
      @BrianLagunas  5 лет назад +2

      You can find the code for this on the Prism Library GitHub repo under the Wpf Samples