Skip to content

How to access some styles/resources? #422

Answered by niels9001
ghost1372 asked this question in Q&A
Discussion options

You must be logged in to vote

@ghost1372 If you want to get styles or resources defined in other packages, you can do that by adding this to your Page or App resources. So for the resources defined in the SettingsCard, that would look like this:

<Page.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="ms-appx:///CommunityToolkit.Labs.WinUI.SettingsControls/SettingsCard/SettingsCard.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Page.Resources>

See an example here in the SegmentedControl sample:

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by michael-hawker
Comment options

You must be logged in to vote
1 reply
@michael-hawker
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #420 on April 16, 2023 05:14.