Skip to content

Commit

Permalink
Enabling more WPF analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Oct 22, 2020
1 parent 9cb6328 commit d1a3c7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions Fluent.Ribbon.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,11 @@
<Rule Id="SA1649" Action="None" />
</Rules>
<Rules AnalyzerId="WpfAnalyzers" RuleNamespace="WpfAnalyzers.Analyzers">
<Rule Id="WPF0006" Action="None" />
<Rule Id="WPF0010" Action="Info" />
<Rule Id="WPF0012" Action="Error" />
<Rule Id="WPF0022" Action="Error" />
<Rule Id="WPF0033" Action="Info" />
<Rule Id="WPF0041" Action="None" />
<Rule Id="WPF0052" Action="None" />
<Rule Id="WPF0041" Action="Info" />
<Rule Id="WPF0060" Action="Warning" />
<Rule Id="WPF0072" Action="None" />
</Rules>
</RuleSet>
4 changes: 2 additions & 2 deletions Fluent.Ribbon/Controls/ApplicationMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ static ApplicationMenu()
// Disable QAT for this control
CanAddToQuickAccessToolBarProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(BooleanBoxes.FalseBox));
// Make default KeyTip
KeyTipProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(null, CoerceKeyTipKeys));
KeyTipProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(null, CoerceKeys));
}

private static object CoerceKeyTipKeys(DependencyObject d, object basevalue)
private static object CoerceKeys(DependencyObject d, object basevalue)
{
return basevalue ?? RibbonLocalization.Current.Localization.BackstageButtonKeyTip;
}
Expand Down
2 changes: 2 additions & 0 deletions Fluent.Ribbon/Converters/ObjectToImageConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#endif
using Fluent.Internal;

#pragma warning disable WPF0072

/// <summary>
/// Converts <see cref="string"/>, <see cref="Uri"/>, <see cref="System.Drawing.Icon"/> or <see cref="ImageSource"/> to <see cref="System.Windows.Controls.Image"/> or <see cref="ImageSource"/> (dependent upon target type).
/// When converting you can pass a desired size as the converter parameter.
Expand Down

0 comments on commit d1a3c7f

Please sign in to comment.