UWP-028 - XAML Styles

Sign in to queue

The Discussion

  • User profile image
    TomaszS

     Lol, I have never paid attention to "Resource Dictionaries" in "Add new item" menu. Now, I know what it is and how helpful can be :). Thanks.

  • User profile image
    ObelixA

    Is there a possibility to create multiple dictionaries (i.e. buttonstyles.xaml, liststyles.xaml and dontknowwhatelsestyles.xaml) and merge them in one place (something like mymergedstyles.xaml - NOT in the page itself) and only merge mymergedstyles.xaml in the pages.
    The intention is not to have to merge all the files per page AND to have everything in place even after splitting styles over new style files. So one would only have to change the mymergedstyles.xaml to reflect the changed and not to change all pages.

    And as the most viewers here I also have to point out VERY GREAT WORK OF BOB, CLINT AND ANDY!! Bob, I saw so many videos over the last few weeks (starting over with Windows Phone 8 and 8.1 series) that I feel you belong to the family - I see more Bob all day long than my wife :D

  • User profile image
    IamThePeter

    Hey Bob. The only thing you could have done better was to put the ResourceDictionary's into the App.xaml instead of the MainPage.xaml.

    If a person was going to reuse their styles, it would make sense that they would apply them at the application level, and then only put the styles specific to a page in that page.

    Other than that tiny issue,... very good job. Nicely done.

  • User profile image
    iTeeZZZ

    At some point later on, you will find out that you can't use x:Bind inside a DataTemplate that is placed in a Resource Dictionary.
    This blog post of Igor Ralic describes a fix to that problem.how to use compiled bindings from a resource dictionary

Add Your 2 Cents