Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out which style(s) is applied to the control?

Tags:

styles

wpf

I have a huge XAML theme with multiple control templates and styles. I need to find out which styles from this list are being applied to which of my controls. I see that the style of my control has changed, but I can't find the source template/style for that change. For example, I have a Grid and I see that the background has changed, but I can't find the the templates/styles that have that Grid as its TargetType with any of that Grid's parameters.

like image 659
user133367 Avatar asked Nov 24 '09 04:11

user133367


People also ask

How do you use style in XAML?

Put simply, where you declare a style affects where the style can be applied. For example, if you declare the style in the root element of your app definition XAML file, the style can be used anywhere in your app. If you declare the style in one of the app's XAML files, the style can be used only in that XAML file.


1 Answers

Use the Snoop tool that can show you all your layout hierarchy and if element's attribute was set locally or inherited.

like image 106
Mart Avatar answered Sep 22 '22 05:09

Mart