From: cskim Date: Tue, 18 Apr 2017 11:53:46 +0000 (+0900) Subject: Make the TVHome update app list focus management if the app list is modified. X-Git-Tag: submit/tizen/20170808.015446~99 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=976d0794bc21d3e26c118edbd724d8f803f6471c;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Make the TVHome update app list focus management if the app list is modified. Change-Id: I17a016eefa7e3cf4755b05fb8d5379f057dc250e Signed-off-by: cskim --- diff --git a/TVHome/TVHome/Views/MainPage.xaml.cs b/TVHome/TVHome/Views/MainPage.xaml.cs index 84622da..0d0df05 100755 --- a/TVHome/TVHome/Views/MainPage.xaml.cs +++ b/TVHome/TVHome/Views/MainPage.xaml.cs @@ -22,6 +22,7 @@ using Xamarin.Forms.PlatformConfiguration.TizenSpecific; namespace TVHome.Views { + using System.Runtime.CompilerServices; using Tizen = Xamarin.Forms.PlatformConfiguration.Tizen; /// /// A custom view for displaying main page of TV Home @@ -167,8 +168,14 @@ namespace TVHome.Views { base.OnAppearing(); + AppsSubPanel.ItemSourceChanged += (s, e)=> + { + InitializeAppsSubPanelButtonFocusChain(); + }; + InitializeMainPanelButtonFocusChain(); - InitializeSubPanelButtonFocusChain(); + InitializeAppsSubPanelButtonFocusChain(); + InitializeSettingsSubPanelButtonFocusChain(); PageMainPanel.InitialFocusing(); } @@ -195,19 +202,22 @@ namespace TVHome.Views } } - private void InitializeSubPanelButtonFocusChain() + private void InitializeAppsSubPanelButtonFocusChain() { List appsSubPanelButtons = new List(AppsSubPanel.GetSubPanelButtons()); - List settingSubPanelButtons = new List(SettingsSubPanel.GetSubPanelButtons()); - Button appsMainPanelButton = PageMainPanel.GetButtonToFocusing(1); - Button settingMainPanelButton = PageMainPanel.GetButtonToFocusing(2); foreach (var item in appsSubPanelButtons) { item.FindByName