Where do I find all XAML static resources for WinRT

David Hoffman 121 Reputation points
2021-09-28T23:16:33.257+00:00

So I want to where I can find the complete list of all Static Resources for XAML controls. Here is an example.`

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Microsoft.UI.Xaml.Controls">
    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Light">
            <StaticResource x:Key="RadioButtonsHeaderForeground" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="RadioButtonsHeaderForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
        </ResourceDictionary>
        <ResourceDictionary x:Key="Dark">
            <StaticResource x:Key="RadioButtonsHeaderForeground" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="RadioButtonsHeaderForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">
            <StaticResource x:Key="RadioButtonsHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
            <StaticResource x:Key="RadioButtonsHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <x:Double x:Key="RadioButtonsColumnSpacing">7</x:Double>
    <x:Double x:Key="RadioButtonsRowSpacing">8</x:Double>

    <Thickness x:Key="RadioButtonsTopHeaderMargin">0,0,0,8</Thickness>
</ResourceDictionary>

In this ResourceDictionary, there are 2 StaticResource(property) and ResourceKey(color) for Radio buttons. There have to be more. I would also say that every control has one or more of these Resources, but for the life of me I can't seem to find the list of all of them for each control. Can anyone shed some light on where all these are located. I want the whole list or as much as I can get, since I bet there is a pattern to the names. Thanks.

Universal Windows Platform (UWP)
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,545 questions
0 comments No comments
{count} votes

Accepted answer
  1. Roy Li - MSFT 32,231 Reputation points Microsoft Vendor
    2021-09-29T03:02:21.84+00:00

    Hello,

    Welcome to Microsoft Q&A!

    All the XAML templates and resources are defined in the Generic.xaml file. There are two ways you could check the file.

    1) You could check the Page you are using, it will predefine a background property using a theme brush. You could select the Theme brush and Press F12, then you will jump to the definition of the theme brush which is exactly the Generic.xaml file.

    2) You could directly go to the C:(Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\<SDK version>\Generic folder from a Windows Software Development Kit (SDK) installation. Then you could find the Generic.xaml file.

    Thank you.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful