Skip to content

Commit

Permalink
Some syntax improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Aug 15, 2020
1 parent 9f5d23e commit 71d2e00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Fluent.Ribbon/Controls/RibbonTabItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,13 @@ protected override void OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs
/// <inheritdoc />
protected override Size MeasureOverride(Size constraint)
{
if (this.contentContainer == null)
if (this.contentContainer is null)
{
return base.MeasureOverride(constraint);
}

if (this.IsContextual && this.Group != null && this.Group.Visibility == Visibility.Collapsed)
if (this.IsContextual
&& this.Group?.Visibility == Visibility.Collapsed)
{
return Size.Empty;
}
Expand Down

0 comments on commit 71d2e00

Please sign in to comment.