Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
added null check for Element
Browse files Browse the repository at this point in the history
  • Loading branch information
pictos committed Mar 10, 2021
1 parent f0bb778 commit 09baeb4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ void SetBorderColor()
flyoutStyle.Setters.Add(new Windows.UI.Xaml.Setter(FlyoutPresenter.PaddingProperty, 0));
flyoutStyle.Setters.Add(new Windows.UI.Xaml.Setter(FlyoutPresenter.BorderThicknessProperty, new UWPThickness(defaultBorderThickness)));

if (Element == null)
{
Log.Warning("warning", "The PopUpView is null.");
return;
}

var borderColor = Specific.GetBorderColor(Element);
if (borderColor == default(Color))
flyoutStyle.Setters.Add(new Windows.UI.Xaml.Setter(FlyoutPresenter.BorderBrushProperty, Color.FromHex("#2e6da0").ToWindowsColor()));
Expand Down

0 comments on commit 09baeb4

Please sign in to comment.