Skip to content

Commit

Permalink
Fix styles converter.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkwpsv committed Aug 5, 2021
1 parent e347adf commit 6fe069e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WindowDebugger/Converters/ClassStylesToBoolConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
{
if (values.Length == 2 && values[0] is ClassStyles styles && Enum.TryParse<ClassStyles>((string)values[1], out var style))
{
return style == 0 || (styles & style) != 0;
return style == 0 || (styles & style) == style;
}
return DependencyProperty.UnsetValue;
}
Expand Down
2 changes: 1 addition & 1 deletion WindowDebugger/Converters/WindowStylesExToBoolConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
{
if (values.Length == 2 && values[0] is WindowStylesEx styles && Enum.TryParse<WindowStylesEx>((string)values[1], out var style))
{
return style == 0 || (styles & style) != style;
return style == 0 || (styles & style) == style;
}
return DependencyProperty.UnsetValue;
}
Expand Down

0 comments on commit 6fe069e

Please sign in to comment.