Override theme resource in the scope of a Page

后端 未结 1 1504
鱼传尺愫
鱼传尺愫 2021-02-10 14:06

I want to override a theme resource, specifically the SystemAccentColor, in the scope of a specific page. I have successfully done it in application wide scope. But

1条回答
  •  借酒劲吻你
    2021-02-10 15:00

    The best way is using Visual Studio or 'Blend for Visual Studio'. I'm using Visual Studio

    1. Right click on the Element you want to edit (in your case, Progress bar) > select 'Edit Template' > 'Edit a Copy'

    1. A 'Create Style Resource' shows up, Enter a name for your style & in the 'Define in' section, select 'This Document' (this ensures the style only applies to the page/window and not app wide) and click okay

    Immediately, the Progress Bar includes a style attribute (see last image) using the new style you created. You can go ahead and modify the code snippet inserted by the IDE to suite your imagination.

    I hope this helps out.

    0 讨论(0)
提交回复
热议问题