From 91c2c99744d80f2c71aacae5d1069e48d5339ac2 Mon Sep 17 00:00:00 2001 From: "sung-su.kim" Date: Tue, 18 May 2021 23:03:51 +0900 Subject: [PATCH] [Tizen] Fix WatchDialog (#14256) --- .../Native/Watch/WatchDialog.cs | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDialog.cs b/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDialog.cs index bca369117c2..96742246c25 100644 --- a/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDialog.cs +++ b/Xamarin.Forms.Platform.Tizen/Native/Watch/WatchDialog.cs @@ -34,20 +34,26 @@ protected override void ApplyButton(ButtonPosition position, EButton button) switch (position) { case ButtonPosition.Neutral: - this.SetButton2Part(button.SetWatchPopupRightStyle()); + if (button != null) + button.SetWatchPopupRightStyle(); + this.SetButton2Part(button); break; case ButtonPosition.Negative: - if (_hasAcceptButton) + if (button != null) { - button.BackgroundColor = EColor.Default; - this.SetButton1Part(button.SetWatchPopupLeftStyle()); - } - else - { - button.BackgroundColor = new EColor(0, 47, 66, 255); - this.SetButton1Part(button.SetBottomStyle()); + if (_hasAcceptButton) + { + button.BackgroundColor = EColor.Default; + button.SetWatchPopupLeftStyle(); + } + else + { + button.BackgroundColor = new EColor(0, 47, 66, 255); + button.SetBottomStyle(); + } } + this.SetButton1Part(button); break; case ButtonPosition.Positive: