WinUI 3 | XAML | Tutorial - Switch Themes Light Dark | C#

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

КОМЕНТАРІ • 19

  • @zakitahri3359
    @zakitahri3359 4 місяці тому +1

    that was so helpful, thank you so much

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

    Is there a way to make "Default" use the actual system theme instead of defaulting to Dark mode?

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

      "Default" does use the system theme. I reconfirmed it with a test project, and it works as expected.🤔

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

      @@AndrewKeepCoding I think I figured out what the issue was. For some reason if the text isn't "Default" it won't work. I was trying to use "Use system setting" and it would just change to the default setting in my app. I got around this by having the option called "Use system setting" and changing the text to "Default" before applying the theme.

  • @dariovillegas2067
    @dariovillegas2067 3 місяці тому +1

    This is great, but what if you want to customize de light and dark themes, for example if you want to override the background color in both themes. How can you do that?

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

      You might be able to do that with ThemeResources. Can you post a question with more details in StackOverflow with a [winui-3] tag?
      stackoverflow.com/users/2411960/andrew-keepcoding?tab=summary

  • @AllKnowing114
    @AllKnowing114 5 місяців тому +1

    how do i set this across the whole app?

    • @AndrewKeepCoding
      @AndrewKeepCoding  5 місяців тому

      AFAIK, you need to set this on each Page.🤔

  • @user-yp1dn9ne9z
    @user-yp1dn9ne9z 3 місяці тому +1

    hi! how to do this, if I use combobox instead of radiobuttons??

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

      Hi! I add some sample code in the GitHub repo. Let me know if you have further questions.
      github.com/AndrewKeepCoding/SwitchingThemesSampleApp#update

    • @user-yp1dn9ne9z
      @user-yp1dn9ne9z 3 місяці тому +1

      @@AndrewKeepCoding yes, I saw it. I tried it, but there is no Command attribute in the ComboBox in xaml. In this case there are no problems. This is the most beautiful place. network so you can help me? Thank you in advance

    • @AndrewKeepCoding
      @AndrewKeepCoding  2 місяці тому

      I guess it might be easier to do this in StackOverflow. Can you post a question with the [winui-3] tag?
      stackoverflow.com/users/2411960/andrew-keepcoding

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

    Nice tutorial, Andrew-san. Can you make one on implementing basic commands through mvvm on WinUi

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

      Do you mean a tutorial about how to use Community Toolkit MVVM commands? I think it's a great one but it might take time. If you have any questions, you can ask me here (^o^)

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

      @@AndrewKeepCoding Yes... WinUi and Maui will heavily dependent on Microsoft's MVVM toolkit. Will be awesome if you made a series on different utilities it has ☺️

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

      I'll do my best! Thanks for the suggestion!😎

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

    muchas gracias por tus videos, quetal si podrias compartir tu codigo en Github, el tutorial de pagina de microsoft no me funciona porque es para UWP, y estoy en WinUI3

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

      Acabo de subir los codigos de este tutorial a GitHub. Chequea la descripciones de este video. (・∀・)