ReSharper 2018.1 Help

Code Inspections in XAML

In XAML, ReSharper 2018.1 provides two kinds of code inspections: 18 inspections that detect errors such as broken syntax, unresolved symbols, compiler errors, etc. (you cannot configure or disable any of these inspections), and 46 proprietary code inspections, any of which you can disable or change its severity level.
These code inspections help you detect code issues in design time in all open files, and additionally they allow you to find code issues in specific scope.

Configurable XAML inspections are listed below, grouped by their categories.

Code Notification (14 inspections)

This category groups code inspections with minor severity levels.
Inspection ID EditorConfig property Default severity
{DynamicResource} can only be used with dependency property Xaml.DynamicResourceError resharper_xaml_dynamic_resource_error_highlighting Error
Constructor not resolved Xaml.ConstructorWarning resharper_xaml_constructor_warning_highlighting Warning
Dependency property descriptor field missing Xaml.DependencyPropertyResolveError resharper_xaml_dependency_property_resolve_error_highlighting Warning
Element name reference not resolved Xaml.ElementNameReferenceNotResolved resharper_xaml_element_name_reference_not_resolved_highlighting Error
Ignored path Xaml.IgnoredPathHighlighting resharper_xaml_ignored_path_highlighting_highlighting Disabled
Mapped path Xaml.MappedPathHighlighting resharper_xaml_mapped_path_highlighting_highlighting Hint
Member of invalid type Xaml.InvalidMemberType resharper_xaml_invalid_member_type_highlighting Error
Object/markup extension of invalid type Xaml.InvalidType resharper_xaml_invalid_type_highlighting Error
Routed event descriptor field missing Xaml.RoutedEventResolveError resharper_xaml_routed_event_resolve_error_highlighting Warning
Static resource not resolved Xaml.StaticResourceNotResolved resharper_xaml_static_resource_not_resolved_highlighting Warning
Unresolved binding path when DataContext is known Xaml.BindingWithContextNotResolved resharper_xaml_binding_with_context_not_resolved_highlighting Warning
Unresolved binding path when DataContext is unknown Xaml.BindingWithoutContextNotResolved resharper_xaml_binding_without_context_not_resolved_highlighting Hint
XAML resource of invalid type Xaml.InvalidResourceType resharper_xaml_invalid_resource_type_highlighting Error
XAML style of invalid target type Xaml.InvalidResourceTargetType resharper_xaml_invalid_resource_target_type_highlighting Error

Common Practices and Code Improvements (3 inspections)

This category groups inspections that hunt for medium severity issues that mainly affect code readability.
Inspection ID EditorConfig property Default severity
Member can be made private (non-private accessibility) MemberCanBePrivate.Global resharper_member_can_be_private_global_highlighting Suggestion
Member can be made protected (non-private accessibility) MemberCanBeProtected.Global resharper_member_can_be_protected_global_highlighting Suggestion
Member or type can be made internal(friend) MemberCanBeInternal resharper_member_can_be_internal_highlighting Disabled

Compiler Warnings (2 inspections)

Inspections in this category detect compiler warnings before you compile.
Inspection ID EditorConfig property Default severity
Use of obsolete type or type member ObsoleteElement resharper_obsolete_element_highlighting Warning
Use of obsolete type or type member (error) ObsoleteElementError resharper_obsolete_element_error_highlighting Error

Constraints Violations (1 inspection)

This category includes code inspections, mostly with the warning severity level, which detect violations related to symbol attributes, including ReSharper's code annotations, and other similar issues.
Inspection ID EditorConfig property Default severity
Inconsistent Naming InconsistentNaming resharper_inconsistent_naming_highlighting Warning

Potential Code Quality Issues (13 inspections)

This category includes inspections that detect critical issues (code smells), mostly with Error or Warning level. This category also includes inspections that ensure localization assistance.
Inspection ID EditorConfig property Default severity
DeveiceFamily-specific view type name does not match generic type name Xaml.XamlMismatchedDeviceFamilyViewClrNameHighlighting resharper_xaml_xaml_mismatched_device_family_view_clr_name_highlighting_highlighting Warning
Duplicate device family view Xaml.XamlDuplicateDeviceFamilyTypeViewHighlighting resharper_xaml_xaml_duplicate_device_family_type_view_highlighting_highlighting Error
Duplicate style property/event setter Xaml.DuplicateStyleSetter resharper_xaml_duplicate_style_setter_highlighting Warning
Grid element column/row index is out of grid definition range Xaml.IndexOutOfGridDefinition resharper_xaml_index_out_of_grid_definition_highlighting Warning
Missing grid column/row setter for non-first child Xaml.MissingGridIndex resharper_xaml_missing_grid_index_highlighting Warning
Non-accessed field (non-private accessibility) NotAccessedField.Global resharper_not_accessed_field_global_highlighting Suggestion
Non-accessed field (private accessibility) NotAccessedField.Local resharper_not_accessed_field_local_highlighting Warning
Path error Xaml.PathError resharper_xaml_path_error_highlighting Warning
RelativeSourceMode is not set explicitly Xaml.XamlRelativeSourceDefaultModeWarningHighlighting resharper_xaml_xaml_relative_source_default_mode_warning_highlighting_highlighting Warning
Style target type is not convertible to base type Xaml.StyleInvalidTargetType resharper_xaml_style_invalid_target_type_highlighting Error
Unknown DeviceFamily Xaml.XamlUnknownDeviceFamilyTypeHighlighting resharper_xaml_xaml_unknown_device_family_type_highlighting_highlighting Warning
x:Key is allowed for resources and dictionary elements only Xaml.XKeyAttributeDisallowed resharper_xaml_x_key_attribute_disallowed_highlighting Error
XAML language level error Xaml.LanguageLevel resharper_xaml_language_level_highlighting Error

Redundancies in Code (11 inspections)

Code inspections in this category look for redundancies and dead code, which affect code readability and style, and could be safely removed. Some code redundancies cannot be fixed automatically, and quick-fixes for them are performed in the interactive mode, requiring the user input. But the majority of the redundancies can be fixed without user interaction, using either fix in scope or code cleanup.
Inspection ID EditorConfig property Default severity
Property value is equal to style-provided Xaml.RedundantStyledValue resharper_xaml_redundant_styled_value_highlighting Warning
Redundant empty collection property setter Xaml.RedundantCollectionProperty resharper_xaml_redundant_collection_property_highlighting Warning
Redundant 'Freeze' attribute Xaml.RedundantFreezeAttribute resharper_xaml_redundant_freeze_attribute_highlighting Warning
Redundant modifiers attribute Xaml.RedundantModifiersAttribute resharper_xaml_redundant_modifiers_attribute_highlighting Warning
Redundant name attribute Xaml.RedundantNameAttribute resharper_xaml_redundant_name_attribute_highlighting Warning
Redundant namespace alias Xaml.RedundantNamespaceAlias resharper_xaml_redundant_namespace_alias_highlighting Warning
Redundant property type qualifier Xaml.RedundantPropertyTypeQualifier resharper_xaml_redundant_property_type_qualifier_highlighting Warning
Redundant resource Xaml.RedundantResource resharper_xaml_redundant_resource_highlighting Warning
Remove redundant attached property setter Xaml.RedundantAttachedProperty resharper_xaml_redundant_attached_property_highlighting Warning
Single grid row/column definition is redundant Xaml.RedundantGridDefinitions resharper_xaml_redundant_grid_definitions_highlighting Warning
Single-cell grid column/row span is redundant Xaml.RedundantGridSpan resharper_xaml_redundant_grid_span_highlighting Warning

Redundancies in Symbol Declarations (2 inspections)

This category includes code inspections, mostly with the warning severity level, which detect empty and unused symbol declarations.
Inspection ID EditorConfig property Default severity
Type or member is never used (non-private accessibility) UnusedMember.Global resharper_unused_member_global_highlighting Suggestion
Type or member is never used (private accessibility) UnusedMember.Local resharper_unused_member_local_highlighting Warning
Last modified: 20 August 2018