question

DavidHoffman-6474 avatar image
0 Votes"
DavidHoffman-6474 asked DavidHoffman-6474 commented

Where do I find all XAML static resources for WinRT

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.

windows-uwpc++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RoyLi-MSFT avatar image
1 Vote"
RoyLi-MSFT answered DavidHoffman-6474 commented

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks. I would never have found that file.

0 Votes 0 ·