I'm getting a NOT_RESOLVED error in the ReSharper XAML inspection.  The XAML works fine at design time and runtime.  Attached is the XAML.

The NOT_RESOLVED error is on the MethodName="GetProperties" element on line 15.  Any ideas?  Is there a way to disable this error, or disable XAML inspection for a single file?

<UserControl x:Class="My.ColorPicker"
             xmlns:sys="clr-namespace:System;assembly=mscorlib" Height="25" Width="180" Name="uccolorpicker"
            <ObjectDataProvider MethodName="GetType" ObjectType="{x:Type sys:Type}" x:Key="ColorsTypeOdp">
                    <sys:String>System.Windows.Media.Colors, PresentationCore,Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35</sys:String>
            <ObjectDataProvider ObjectInstance="{StaticResource ColorsTypeOdp}" MethodName="GetProperties" x:Key="ColorPropertiesOdp" />
        <ComboBox ItemsSource="{Binding Source={StaticResource ColorPropertiesOdp}}" SelectedValuePath="Name"  SelectedValue="{Binding ElementName=uccolorpicker, Path=SelectedColor}">
                    <StackPanel Orientation="Horizontal" >
                        <TextBlock Width="15" Height="18" Margin="2" Background="{Binding Name}" VerticalAlignment="Center"/>
                        <TextBlock Text="{Binding Name}" Margin="5,2,0,2" Style="{StaticResource InputNameStyle}" VerticalAlignment="Center"/>

Source code follows:

using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace My
    /// <summary>
    /// Interaction logic for <see cref="ColorPicker"/>.xaml
    /// </summary>
    /// <remarks>
    /// Thanks to Sudheer Muhammed http://www.codeproject.com/Articles/140521/Color-Picker-using-WPF-Combobox
    /// </remarks>
    public partial class ColorPicker : UserControl
        public ColorPicker()

        public Brush SelectedColor
            get { return (Brush)GetValue(SelectedColorProperty); }
            set { SetValue(SelectedColorProperty, value); }

        // Using a DependencyProperty as the backing store for SelectedColor.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SelectedColorProperty =
            DependencyProperty.Register("SelectedColor", typeof(Brush), typeof(ColorPicker), new UIPropertyMetadata(null));
Comment actions Permalink

Hello Wade,

What Resharper version do you use? This XAML looks fine on my ReSharper 7.1.2 - could you please attach a small sample project/solution, which will demonstrate this issue? Maybe it is something about particular project settings here.

Thanks in advance!

Comment actions Permalink

There is a project on the CodeProject site.  Search for "wpf colorpicker" and it should be the first one that pops up.  Here's a shortcut to the download link.


Comment actions Permalink

Also, I installed the 7.1.2 Resharper update and the problem still appears.

Comment actions Permalink

I posted a sample in the topic.

Comment actions Permalink

Hi Wade,

Thanks for the link to the source code. I've confirmed this issue in ReSharper 7.1.2 and logged it here for further fixing: http://youtrack.jetbrains.com/issue/RSRP-339425

Thank you very much for the report.


Please sign in to leave a comment.