R# does not know about ComponentResourceKeys?

I attached a sample app that demonstrates the problem I'm having. Roughly..

A ResourceDictionary that contains a ComponentResourceKey:

    class Dictionary2
    {
        public readonly static ComponentResourceKey SampleBrush = new ComponentResourceKey(typeof(Dictionary2), "Orange");
    }

    <SolidColorBrush x:Key="{x:Static Themes:Dictionary2.SampleBrush}" Color="DarkKhaki"/>

It is merged into the Generic.xaml along with a default style for a custom control. R# cannot find this key when used in a window xaml, like this:

9-16-2010 2-25-15 PM.png

Yet WPF finds the resource just fine. When I run the app, I get a DarkKhaki colored custom control in the main window. Why the difference? Is this a bug in WPF or R#?

This is build 5.1.1751.8.



Attachment(s):
WpfResourceTests-2010-09-16.1.zip

Please sign in to leave a comment.