Why is XAML "Thickness" invalid because the expected type is "Thickness" when the actual type is indeed "Thickness"?

378 views Asked by At

I had noticed that I got the red squigglies on this line of XAML:

<Thickness x:Key="SubHeaderMargin">0,20,0,10</Thickness>

...but I didn't worry too much about it, as all seemed to look fine, but when running Resharper's "Issues in Solution", it complains with:

MainPage.xaml:333 Invalid resource type: expected type is 'Thickness', actual type is 'Thickness'.

Say what? I thought R# was created by coders, not congressmen! This obviously (apparently?) makes no sense...what is it trying to tell me?

In case it's of any help, the line that gets the warning is:

It complains on this line:

<TextBlock Text="Filter By Location" Foreground="{StaticResource SubHeaderColor}" Margin="{StaticResource SubHeaderMargin}" >

Resharper relatedly claims this, "Thickness is not accessible", referencing this line:

<Thickness x:Key="SubHeaderMargin">0,20,0,10</Thickness>
0

There are 0 answers