From: Yurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics Date: Fri, 26 Jan 2024 10:31:17 +0000 (+0100) Subject: fix after review X-Git-Tag: accepted/tizen/unified/20240222.163404~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64bacf46e06cbe35baf5a22af9a6a9fe56ebba9b;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsettings.git fix after review --- diff --git a/SettingView/SettingView.cs b/SettingView/SettingView.cs index 34be1c8..79870a1 100644 --- a/SettingView/SettingView.cs +++ b/SettingView/SettingView.cs @@ -455,20 +455,13 @@ namespace SettingView scrollbarStyle.TrackPadding = 8; page.Content.Scrollbar = new Scrollbar(scrollbarStyle); - try - { - // get Thumb ImageView component, since it is internal - var thumb = page.Content.Scrollbar.Children[1] as ImageView; + // get Thumb ImageView component, since it is internal + var thumb = page.Content.Scrollbar.Children.Skip(1).FirstOrDefault() as ImageView; - if(thumb != null ) - { - thumb.CornerRadius = 4; - thumb.BoxShadow = isLightTheme ? new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)) : new Shadow(8.0f, new Color("#FFFFFF29"), new Vector2(0.0f, 1.0f)); - } - } - catch (Exception ex) + if (thumb != null) { - Logger.Error($"Scrollbar cannot be changed - {ex.Message}"); + thumb.CornerRadius = 4; + thumb.BoxShadow = isLightTheme ? new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)) : new Shadow(8.0f, new Color("#FFFFFF29"), new Vector2(0.0f, 1.0f)); } }