This is a migrated thread and some comments may be shown as answers.

XAML Resource 'x' is redundant

2 Answers 109 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Art Kedzierski
Top achievements
Rank 2
Art Kedzierski asked on 12 Jun 2012, 05:20 PM
I updated to JustCode 2012.2.608.4 today and I'm suddenly getting a lot of these "Resource is redundant" messages for items (styles and storyboards) that are clearly single instances.

Any idea what's up?

2 Answers, 1 is accepted

Sort by
0
Art Kedzierski
Top achievements
Rank 2
answered on 12 Jun 2012, 05:42 PM
Never mind. While not technically redundant, the things they were pointing to were more efficiently managed in the C# code where they were being manipulated. For example, I was creating a storyboard placeholder in the XAML that I then populated and manipulated in code-behind. Now I just make the storyboard in code-behind as well.

Live and learn.
0
Svetlozar
Telerik team
answered on 15 Jun 2012, 08:33 AM
Hello,

Thank you for your feedback.

This warning looks for xaml usages only, we don't analyze backend usages with ResourceDictionary["key"].

I was creating a storyboard placeholder in the XAML that I then populated and manipulated in code-behind.
This seems to be a widely used approach, so if you don't want to see that warning you can simply turn it off from the options.

If you have any other problems or suggestions, please don't hesitate to write back.

Greetings,
Svetlozar
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Code Analysis
Asked by
Art Kedzierski
Top achievements
Rank 2
Answers by
Art Kedzierski
Top achievements
Rank 2
Svetlozar
Telerik team
Share this question
or