Change ViewCell to RelativeLayout in TVHome
authorHeonjae Jang <heonjae.jang@samsung.com>
Thu, 25 May 2017 03:40:33 +0000 (12:40 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:56 +0000 (18:34 +0900)
Change-Id: Ie1c42edd4136ddd7b80dbaaca164bba995f95d44
Signed-off-by: Heonjae Jang <heonjae.jang@samsung.com>
16 files changed:
TVHome/TVHome/Controls/MainPanelButton.xaml
TVHome/TVHome/Controls/MainPanelButton.xaml.cs
TVHome/TVHome/Controls/PanelButton.cs
TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml
TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs
TVHome/TVHome/Controls/SubPanelButton.xaml
TVHome/TVHome/Controls/SubPanelButton.xaml.cs
TVHome/TVHome/Controls/SubPanelSettingButton.xaml
TVHome/TVHome/Controls/SubPanelSettingButton.xaml.cs
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs
TVHome/TVHome/Views/MainPage.xaml
TVHome/TVHome/Views/MainPanel.xaml.cs
TVHome/TVHome/Views/Panel.cs
TVHome/TVHome/Views/SubPanel.xaml.cs
TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs

index 0468c7d..9f017d4 100755 (executable)
@@ -2,10 +2,9 @@
 <Controls:PanelButton xmlns="http://xamarin.com/schemas/2014/forms"
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
-                      x:Class="TVHome.Controls.MainPanelButton">
-    <RelativeLayout x:Name="ButtonBox"
-                    HorizontalOptions="Center"
-                    VerticalOptions="Center">
+                      x:Class="TVHome.Controls.MainPanelButton"
+                      HorizontalOptions="Center"
+                      VerticalOptions="Center">
         <Image x:Name="ButtonBgImage"
                RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
@@ -42,5 +41,4 @@
                 Unfocused="OnUnfocused"
                 Clicked="OnClicked"
                 Opacity="0" />
-    </RelativeLayout>
 </Controls:PanelButton>
index 77cb61b..e7418e0 100755 (executable)
@@ -47,8 +47,8 @@ namespace TVHome.Controls
         {
             InitializeComponent();
 
-            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(236);
-            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(260);
+            WidthRequest = SizeUtils.GetWidthSize(236);
+            HeightRequest = SizeUtils.GetHeightSize(260);
             ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
             ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
 
index 895eff6..efc0162 100755 (executable)
@@ -24,7 +24,7 @@ namespace TVHome.Controls
     /// TVHome has two panels, MainPanel and SubPanel. The panels have several panel buttons.
     /// The class for handling panel button's events
     /// </summary>
-    public abstract class PanelButton : ViewCell
+    public abstract class PanelButton : RelativeLayout
     {
         public bool isMoveMode;
         public bool isFocused;
index 706b656..8831de0 100755 (executable)
@@ -2,41 +2,39 @@
 <Controls:PanelButton xmlns="http://xamarin.com/schemas/2014/forms"
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
-                      x:Class="TVHome.Controls.SubPanelAllAppsButton">
-  <RelativeLayout x:Name="ButtonBox"
-                  HorizontalOptions="Center"
-                  VerticalOptions="End">
-    <Image x:Name="ButtonImage"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
-           Source="{Binding CurrentStateDescription.IconPath}" />
-    <Image x:Name="ButtonDimmedImage"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
-             Source="img_home_list_dimmed_apps_60.png" />
-    <Label x:Name="ButtonTitle"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.77391}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1303478}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
-           Opacity="0.6"
-           TextColor="White"
-           LineBreakMode="TailTruncation"
-           FontFamily="BreezeSans"
-           HorizontalTextAlignment="Center"
-           Text="{Binding CurrentStateDescription.Label}" />
-    <Button x:Name = "ButtonFocusArea"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-            Focused="OnFocused"
-            Unfocused="OnUnfocused"
-            Clicked="OnClicked"
-            Opacity="0" />
-  </RelativeLayout>
+                      x:Class="TVHome.Controls.SubPanelAllAppsButton"
+                      HorizontalOptions="Center"
+                      VerticalOptions="End">
+  <Image x:Name="ButtonImage"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.120879}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.095652}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.6}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.75824}"
+         Source="{Binding CurrentStateDescription.IconPath}" />
+  <Image x:Name="ButtonDimmedImage"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.120879}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.095652}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.6}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.75824}"
+           Source="img_home_list_dimmed_apps_60.png" />
+  <Label x:Name="ButtonTitle"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.120879}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.77391}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.1303478}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.758241}"
+         Opacity="0.6"
+         TextColor="White"
+         LineBreakMode="TailTruncation"
+         FontFamily="BreezeSans"
+         HorizontalTextAlignment="Center"
+         Text="{Binding CurrentStateDescription.Label}" />
+  <Button x:Name = "ButtonFocusArea"
+          RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+          RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+          RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+          RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+          Focused="OnFocused"
+          Unfocused="OnUnfocused"
+          Clicked="OnClicked"
+          Opacity="0" />
 </Controls:PanelButton>
\ No newline at end of file
index beb6120..17004d1 100755 (executable)
@@ -38,8 +38,8 @@ namespace TVHome.Controls
         {
             InitializeComponent();
 
-            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(182);
-            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(230);
+            WidthRequest = SizeUtils.GetWidthSize(182);
+            HeightRequest = SizeUtils.GetHeightSize(230);
             ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
             ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
         }
@@ -56,7 +56,7 @@ namespace TVHome.Controls
                 OnClickedCommand.Execute("");
             }
 
-            await View.FadeTo(0.99, 300);
+            await this.FadeTo(0.99, 300);
         }
 
         /// <summary>
index 4f5aeb2..cb5e655 100755 (executable)
@@ -2,55 +2,53 @@
 <Controls:PanelButton xmlns="http://xamarin.com/schemas/2014/forms"
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
-                      x:Class="TVHome.Controls.SubPanelButton">
-  <RelativeLayout x:Name="ButtonBox"
-                  HorizontalOptions="Center"
-                  VerticalOptions="End">
-    <Image x:Name="ButtonImage"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
-           Source="{Binding CurrentStateDescription.IconPath}" />
-    <Image x:Name="ButtonDimmedImage"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
-           Source="img_home_list_dimmed_apps_60.png" />
-    <Label x:Name="ButtonTitle"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.77391}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1303478}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
-           Opacity="0.6"
-           TextColor="White"
-           FontFamily="BreezeSans"
-           LineBreakMode="TailTruncation"
-           HorizontalTextAlignment="Center"
-           Text="{Binding CurrentStateDescription.Label}" />
-    <Button x:Name = "ButtonFocusArea"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-           Focused="OnFocused"
-           Unfocused="OnUnfocused"
-           Clicked="OnClicked"
-           Opacity="0" />
-    <Image x:Name="LeftBtnImg"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.326923}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.156521}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.06044}"
-           Source="btn_home_list_move_left.png"
-           Opacity="0"/>
-    <Image x:Name="RightBtnImg"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.93956}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.326923}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.156521}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.06044}"
-            Source="btn_home_list_move_right.png"
-           Opacity="0"/>
-  </RelativeLayout>
+                      x:Class="TVHome.Controls.SubPanelButton"
+                      HorizontalOptions="Center"
+                      VerticalOptions="End">
+  <Image x:Name="ButtonImage"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.120879}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.095652}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.6}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.75824}"
+         Source="{Binding CurrentStateDescription.IconPath}" />
+  <Image x:Name="ButtonDimmedImage"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.120879}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.095652}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.6}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.75824}"
+         Source="img_home_list_dimmed_apps_60.png" />
+  <Label x:Name="ButtonTitle"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.120879}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.77391}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.1303478}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.758241}"
+         Opacity="0.6"
+         TextColor="White"
+         FontFamily="BreezeSans"
+         LineBreakMode="TailTruncation"
+         HorizontalTextAlignment="Center"
+         Text="{Binding CurrentStateDescription.Label}" />
+  <Button x:Name = "ButtonFocusArea"
+          RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+          RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+          RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+          RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+          Focused="OnFocused"
+          Unfocused="OnUnfocused"
+          Clicked="OnClicked"
+          Opacity="0" />
+  <Image x:Name="LeftBtnImg"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.326923}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.156521}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.06044}"
+         Source="btn_home_list_move_left.png"
+         Opacity="0"/>
+  <Image x:Name="RightBtnImg"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.93956}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.326923}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.156521}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.06044}"
+         Source="btn_home_list_move_right.png"
+         Opacity="0"/>
 </Controls:PanelButton>
\ No newline at end of file
index 270c4b3..ce84884 100755 (executable)
@@ -44,8 +44,8 @@ namespace TVHome.Controls
         {
             InitializeComponent();
 
-            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(182);
-            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(230);
+            WidthRequest = SizeUtils.GetWidthSize(182);
+            HeightRequest = SizeUtils.GetHeightSize(230);
             ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
             ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
 
@@ -125,7 +125,7 @@ namespace TVHome.Controls
                 }
             };
 
-            popup.Show(View, View.Width / 2, View.Height - (moveTransitionHeight + selectTransitionHeight));
+            popup.Show(this, Width / 2, Height - (moveTransitionHeight + selectTransitionHeight));
             ButtonTitle.FadeTo(0, 300);
             isShowOptions = true;
         }
@@ -145,7 +145,7 @@ namespace TVHome.Controls
                     OnClickedCommand.Execute("");
                 }
 
-                await View.FadeTo(0.99, 300);
+                await this.FadeTo(0.99, 300);
             }
             else
             {
@@ -179,12 +179,12 @@ namespace TVHome.Controls
             {
                 if (!isDefault)
                 {
-                    await View.TranslateTo(SizeUtils.GetWidthSize((int)View.TranslationX), 0, 300);
+                    await this.TranslateTo(SizeUtils.GetWidthSize((int)TranslationX), 0, 300);
                 }
                 else
                 {
-                    await View.TranslateTo(0, SizeUtils.GetHeightSize((int)View.TranslationY), 0);
-                    await View.TranslateTo(0, 0, 300);
+                    await this.TranslateTo(0, SizeUtils.GetHeightSize((int)TranslationY), 0);
+                    await this.TranslateTo(0, 0, 300);
                 }
 
                 OnFocused(null, null);
@@ -203,13 +203,13 @@ namespace TVHome.Controls
             if (showOptions)
             {
 #pragma warning disable CS4014
-                View.TranslateTo(0, -moveTransitionHeight, 300);
+                this.TranslateTo(0, -moveTransitionHeight, 300);
                 ButtonImage.ScaleTo(1, 300);
 #pragma warning restore CS4014
             }
             else
             {
-                await View.TranslateTo(0, 0, 300);
+                await this.TranslateTo(0, 0, 300);
                 OnFocused(null, null);
             }
 
index 8d11d0c..74bcc11 100755 (executable)
@@ -2,27 +2,26 @@
 <Controls:PanelButton xmlns="http://xamarin.com/schemas/2014/forms"
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
-                      x:Class="TVHome.Controls.SubPanelSettingButton">
-  <RelativeLayout x:Name="ButtonBox"
-                  HorizontalOptions="Center"
-                  VerticalOptions="End">
+                      x:Class="TVHome.Controls.SubPanelSettingButton"
+                      HorizontalOptions="Center"
+                      VerticalOptions="End">
     <Image x:Name="ButtonImage"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.120879}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.095652}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.6}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.75824}"
            Source="{Binding CurrentStateDescription.IconPath}" />
     <Image x:Name="ButtonDimmedImage"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.120879}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.095652}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.6}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.75824}"
            Source="img_home_list_dimmed_apps_60.png" />
     <Label x:Name="ButtonTitle"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.77391}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1303478}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.120879}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.77391}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.1303478}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.758241}"
            Opacity="0.6"
            TextColor="White"
            FontFamily="BreezeSans"
            HorizontalTextAlignment="Center"
            Text="{Binding CurrentStateDescription.Label}"/>
     <Button x:Name = "ButtonFocusArea"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=1}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=1}"
            Focused="OnFocused"
            Unfocused="OnUnfocused"
            Clicked="OnClicked"
            Opacity="0" />
-  </RelativeLayout>
 </Controls:PanelButton>
\ No newline at end of file
index bc97f1e..5d63ae3 100755 (executable)
@@ -38,8 +38,8 @@ namespace TVHome.Controls
         {
             InitializeComponent();
 
-            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(182);
-            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(230);
+            WidthRequest = SizeUtils.GetWidthSize(182);
+            HeightRequest = SizeUtils.GetHeightSize(230);
             ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
             ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
         }
@@ -56,7 +56,7 @@ namespace TVHome.Controls
                 OnClickedCommand.Execute("");
             }
 
-            await View.FadeTo(0.99, 300);
+            await this.FadeTo(0.99, 300);
         }
 
         /// <summary>
index e9c2e88..7d2a541 100755 (executable)
@@ -3,47 +3,45 @@
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelThumbnailButton">
-  <RelativeLayout x:Name="ButtonBox">
-    <Image x:Name="ThumbnailImage"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-            Source="{Binding ScreenshotPath}" />
-    <Controls:NinePatchImage x:Name="ThumbnailGradient"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-            Aspect="Fill"
-            BorderTop="2"
-            BorderBottom="2"
-            BorderLeft="1"
-            BorderRight="1"
-            Source="ic_list_thumbnail_gradient_normal.9.png" />
-    <Image x:Name="ThumbnailIcon"
-            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.043}"
-            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.689}"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.131}"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.233}"
-            Source="{Binding CurrentStateDescription.IconPath}" />
-    <Label x:Name="ThumbnailTitle"
-            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.206}"
-            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.722}"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75}"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.166}"
-            LineBreakMode="TailTruncation"
-            FontFamily="BreezeSans"
-            Text="{Binding CurrentStateDescription.Label}"
-            TextColor="#FFFFFF"/>
-      <Image x:Name="ThumnailDimLayer"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-            Aspect="Fill"
-            Opacity="0.99"
-            Source="img_tizen_home_list_dimmed_recent.png"/>
-    <Button x:Name="ButtonFocusArea"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-            Focused="OnFocused"
-            Unfocused="OnUnfocused"
-            Clicked="OnClicked"
-            Opacity="0" />
-  </RelativeLayout>
+  <Image x:Name="ThumbnailImage"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=1}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=1}"
+         Source="{Binding ScreenshotPath}" />
+  <Controls:NinePatchImage x:Name="ThumbnailGradient"
+                           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=1}"
+                           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=1}"
+                           Aspect="Fill"
+                           BorderTop="2"
+                           BorderBottom="2"
+                           BorderLeft="1"
+                           BorderRight="1"
+                           Source="ic_list_thumbnail_gradient_normal.9.png" />
+  <Image x:Name="ThumbnailIcon"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.043}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.689}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.131}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.233}"
+         Source="{Binding CurrentStateDescription.IconPath}" />
+  <Label x:Name="ThumbnailTitle"
+         RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.206}"
+         RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.722}"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=0.75}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=0.166}"
+         LineBreakMode="TailTruncation"
+         FontFamily="BreezeSans"
+         Text="{Binding CurrentStateDescription.Label}"
+         TextColor="#FFFFFF"/>
+  <Image x:Name="ThumnailDimLayer"
+         RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=1}"
+         RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=1}"
+         Aspect="Fill"
+         Opacity="0.99"
+         Source="img_tizen_home_list_dimmed_recent.png"/>
+  <Button x:Name="ButtonFocusArea"
+          RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Width, Factor=1}"
+          RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,  Property=Height, Factor=1}"
+          Focused="OnFocused"
+          Unfocused="OnUnfocused"
+          Clicked="OnClicked"
+          Opacity="0" />
 </Controls:PanelButton>
\ No newline at end of file
index b5bc31b..9e4aeb6 100755 (executable)
@@ -38,8 +38,8 @@ namespace TVHome.Controls
         {
             InitializeComponent();
 
-            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(320);
-            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(180);
+            WidthRequest = SizeUtils.GetWidthSize(320);
+            HeightRequest = SizeUtils.GetHeightSize(180);
             ThumbnailTitle.FontSize = SizeUtils.GetFontSize(26);
             ThumbnailTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
 
@@ -99,7 +99,7 @@ namespace TVHome.Controls
                 OnClickedCommand.Execute("");
             }
 
-            await View.FadeTo(0.9, 300);
+            await this.FadeTo(0.9, 300);
         }
 
         /// <summary>
@@ -121,7 +121,7 @@ namespace TVHome.Controls
             ThumbnailTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
             //ThumbnailTitle.FadeTo(0.8, 300);
 #pragma warning restore CS4014
-            await View.ScaleTo(1.2, 300);
+            await this.ScaleTo(1.2, 300);
         }
 
         /// <summary>
@@ -137,7 +137,7 @@ namespace TVHome.Controls
             ThumbnailGradient.Source = "ic_list_thumbnail_gradient_normal.9.png";
             ThumbnailTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
 #pragma warning restore CS4014
-            await View.ScaleTo(1.0, 300);
+            await this.ScaleTo(1.0, 300);
         }
 
         /// <summary>
@@ -190,7 +190,7 @@ namespace TVHome.Controls
                 isPopupShowing = false;
             };
 
-            popup.Show(View);
+            popup.Show(this);
             isPopupShowing = true;
         }
 
index 6bef84f..984104b 100755 (executable)
@@ -7,63 +7,54 @@
              xmlns:Controls="clr-namespace:TVHome.Controls"
              CurrentStatus="{Binding CurrentStatus}"
              SelectedMenuName="{Binding SelectedMenuName}">
-    <ContentPage.BindingContext>
-        <ViewModels:MainPageViewModel />
-    </ContentPage.BindingContext>
-    <ContentPage.Content>
-        <RelativeLayout>
-            <Controls:NinePatchImage x:Name="DimmedBgImage"
-                  RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
-                  RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                  RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
-                  RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
-                  Source="bg_home_gradient_dimmed.9.png"
-                  Aspect="Fill"
-                  BorderTop="2"
-                  BorderBottom="2"
-                  BorderLeft="2"
-                  BorderRight="2"/>
-            <Views:MainPanel x:Name="PageMainPanel"
-                             RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.22}"
-                             RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                             RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.6537}"
-                             OnFocusedCommand="{Binding MainPanelFocusedCommand}"
-                             ItemsSource="{Binding MainList}"/>
+  <ContentPage.BindingContext>
+    <ViewModels:MainPageViewModel />
+  </ContentPage.BindingContext>
+  <ContentPage.Content>
+    <RelativeLayout>
+      <Controls:NinePatchImage x:Name="DimmedBgImage"
+            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+            Source="bg_home_gradient_dimmed.9.png"
+            Aspect="Fill"
+            BorderTop="2"
+            BorderBottom="2"
+            BorderLeft="2"
+            BorderRight="2"/>
+      <Views:MainPanel x:Name="PageMainPanel"
+                       RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.22}"
+                       RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+                       RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.6537}"
+                       OnFocusedCommand="{Binding MainPanelFocusedCommand}"
+                       ItemsSource="{Binding MainList}"/>
 
-            <Views:SubThumbnailPanel x:Name="RecentSubPanel"
-                            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.224}"
-                            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.89}"
-                            OnFocusedCommand="{Binding SubPanelFocusedCommand}"
-                            OnClearVMCommand="{Binding OnClearCommand}"
-                            OnClearAllVMCommand="{Binding OnClearAllCommand}"
-                            ItemsSource="{Binding RecentList}"
-                            ShowNoContentsInfo="{Binding IsShowNoRecentContents}">
-            </Views:SubThumbnailPanel>
+      <Views:SubThumbnailPanel x:Name="RecentSubPanel"
+                      RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.224}"
+                      RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+                      RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.89}"
+                      OnFocusedCommand="{Binding SubPanelFocusedCommand}"
+                      OnClearVMCommand="{Binding OnClearCommand}"
+                      OnClearAllVMCommand="{Binding OnClearAllCommand}"
+                      ItemsSource="{Binding RecentList}"
+                      ShowNoContentsInfo="{Binding IsShowNoRecentContents}" />
 
-            <Views:SubPanel x:Name="AppsSubPanel"
-                            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2370}"
-                            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8833}"
-                            OnFocusedCommand="{Binding SubPanelFocusedCommand}"
-                            OnMoveVMCommand="{Binding OnMoveCommand}"
-                            OnUnpinVMCommand="{Binding OnUnpinCommand}"
-                            ItemsSource="{Binding AppList}" >
-            </Views:SubPanel>
+      <Views:SubPanel x:Name="AppsSubPanel"
+                      RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2370}"
+                      RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+                      RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8833}"
+                      OnFocusedCommand="{Binding SubPanelFocusedCommand}"
+                      OnMoveVMCommand="{Binding OnMoveCommand}"
+                      OnUnpinVMCommand="{Binding OnUnpinCommand}"
+                      ItemsSource="{Binding AppList}" />
 
-            <Views:SubPanel x:Name="SettingsSubPanel"
-                            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2370}"
-                            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8833}"
-                            OnFocusedCommand="{Binding SubPanelFocusedCommand}"
-                            ItemsSource="{Binding SettingsList}">
-                <Views:SubPanel.ItemTemplate>
-                    <DataTemplate>
-                        <Controls:SubPanelButton/>
-                    </DataTemplate>
-                </Views:SubPanel.ItemTemplate>
-            </Views:SubPanel>
-
-        </RelativeLayout>
-    </ContentPage.Content>
+      <Views:SubPanel x:Name="SettingsSubPanel"
+                      RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2370}"
+                      RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+                      RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8833}"
+                      OnFocusedCommand="{Binding SubPanelFocusedCommand}"
+                      ItemsSource="{Binding SettingsList}" />
+    </RelativeLayout>
+  </ContentPage.Content>
 </ContentPage>
\ No newline at end of file
index 6e4ad58..ac6ac45 100755 (executable)
@@ -69,8 +69,7 @@ namespace TVHome.Views
             foreach (ShortcutInfo item in ItemsSource)
             {
                 var button = new MainPanelButton();
-                button.View.BindingContext = item;
-                button.SetBinding(MainPanelButton.StatusProperty, new Binding("BindingContext.Status", source: button.View));
+                button.BindingContext = item;
                 HomeMenuItem ItemName = menuIndex;
                 button.OnFocusedCommand = new Command(() =>
                 {
@@ -82,7 +81,7 @@ namespace TVHome.Views
                     OnItemSelectedHandler?.Invoke(ItemName);
                     //item.DoAction();
                 });
-                PanelButtonGrid.Children.Add(button.View, index, 0);
+                PanelButtonGrid.Children.Add(button, index, 0);
 
                 index++;
                 menuIndex++;
@@ -130,18 +129,23 @@ namespace TVHome.Views
         /// <summary>
         /// A method for translating when panel is selected
         /// </summary>
-        public async void SelectPanel()
+        public void SelectPanel()
         {
-            await Task.Delay(300);
-            await this.TranslateTo(0, selectTransitionHeight, 300);
+            AnimationExtensions.AbortAnimation(this,"PanelAnimation");
+            var currentTranslationY = TranslationY;
+            var diff = selectTransitionHeight - currentTranslationY;
+            Animation animation = new Animation();
+            Animation translateAnimation = new Animation(v => TranslationY = (currentTranslationY + diff * v));
+            animation.Add(0.5, 1, translateAnimation);
+            animation.Commit(this, "PanelAnimation", length: 600);
         }
 
         /// <summary>
         /// A method for scaling the panel when the panel is showed
         /// </summary>
-        public override async void ShowPanel()
+        public override void ShowPanel()
         {
-            await this.ScaleTo(1, 0);
+            Scale = 1;
         }
 
         /// <summary>
index bb2e57c..1c8b1f8 100755 (executable)
@@ -127,20 +127,6 @@ namespace TVHome.Views
         }
 
         /// <summary>
-        /// Identifies the ItemTemplate bindable property
-        /// </summary>
-        public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create("ItemTemplate", typeof(DataTemplate), typeof(SubPanel));
-
-        /// <summary>
-        /// Gets or set DataTemplate to display item
-        /// </summary>
-        public DataTemplate ItemTemplate
-        {
-            get { return (DataTemplate)GetValue(ItemTemplateProperty); }
-            set { SetValue(ItemTemplateProperty, value); }
-        }
-
-        /// <summary>
         /// A flag indicates whether the panel is focused or not
         /// </summary>
         public bool isFocused;
index 8f17af5..283fb96 100755 (executable)
@@ -93,7 +93,7 @@ namespace TVHome.Views
                             OnShowOptionsCommand?.Execute(isShowOptions);
                             item.ShowContextPopup();
                             item.ChangeShowOptionsMode(isShowOptions);
-                            ChangeIsEnabledProperty(item.View, false);
+                            ChangeIsEnabledProperty(item, false);
                         }
                     }
                 }
@@ -138,7 +138,7 @@ namespace TVHome.Views
                                 return;
                             }
 
-                            int index = ButtonViewList.IndexOf(button.View);
+                            int index = ButtonViewList.IndexOf(button);
                             if (direction.Equals("Right"))
                             {
                                 button.rightMoving = true;
@@ -156,7 +156,7 @@ namespace TVHome.Views
                             isMoveMode = !isMoveMode;
                             isShowOptions = false;
 
-                            ChangeIsEnabledProperty(button.View, false);
+                            ChangeIsEnabledProperty(button, false);
                             button.ChangeMoveMode(isMoveMode, false);
 
                             if (!isMoveMode)
@@ -173,16 +173,16 @@ namespace TVHome.Views
                     button = new SubPanelSettingButton();
                 }
 
-                button.View.BindingContext = item;
+                button.BindingContext = item;
                 button.OnFocusedCommand = new Command(() =>
                 {
                     FocusPanel();
 
-                    if (SizeUtils.GetWidthSize((int)button.View.X) - SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) < 0)
+                    if (SizeUtils.GetWidthSize((int)button.X) - SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) < 0)
                     {
                         ScrollToLeft();
                     }
-                    else if (SizeUtils.GetWidthSize((int)button.View.X) + SizeUtils.GetWidthSize(216) > SizeUtils.GetWidthSize(1920))
+                    else if (SizeUtils.GetWidthSize((int)button.X) + SizeUtils.GetWidthSize(216) > SizeUtils.GetWidthSize(1920))
                     {
                         ScrollToRight();
                     }
@@ -197,7 +197,7 @@ namespace TVHome.Views
                 });
                 button.OnUnpinCommand = new Command(() =>
                 {
-                    AppShortcutInfo shortcut = (AppShortcutInfo)button.View.BindingContext;
+                    AppShortcutInfo shortcut = (AppShortcutInfo)button.BindingContext;
                     OnUnpinVMCommand?.Execute(shortcut.AppID);
                 });
                 button.OnDefaultModeCommand = new Command(() =>
@@ -209,8 +209,8 @@ namespace TVHome.Views
                     OnShowOptionsCommand?.Execute(param);
                 });
 
-                PanelButtonStack.Children.Add(button.View);
-                ButtonViewList.Add(button.View);
+                PanelButtonStack.Children.Add(button);
+                ButtonViewList.Add(button);
             }
 
             OnItemSourceChanged(EventArgs.Empty);
@@ -346,12 +346,12 @@ namespace TVHome.Views
                 {
                     if (item.isMoveMode)
                     {
-                        ChangeIsEnabledProperty(item.View, true);
+                        ChangeIsEnabledProperty(item, true);
                         item.ChangeMoveMode(isMoveMode, true);
                     }
                     else
                     {
-                        item.View.TranslateTo(0, 0, 0);
+                        item.TranslateTo(0, 0, 0);
                     }
                 }
 
@@ -370,7 +370,7 @@ namespace TVHome.Views
                     if (item.isFocused)
                     {
                         item.ChangeShowOptionsMode(isShowOptions);
-                        ChangeIsEnabledProperty(item.View, true);
+                        ChangeIsEnabledProperty(item, true);
                     }
                 }
             }
index 3e293a3..0e9de65 100755 (executable)
@@ -117,15 +117,15 @@ namespace TVHome.Views
                 foreach (RecentShortcutInfo item in ItemsSource)
                 {
                     PanelButton button = new SubPanelThumbnailButton();
-                    button.View.BindingContext = item;
+                    button.BindingContext = item;
                     button.OnFocusedCommand = new Command(() =>
                     {
                         FocusPanel();
-                        if (SizeUtils.GetWidthSize((int)button.View.X) - SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) < 0)
+                        if (SizeUtils.GetWidthSize((int)button.X) - SizeUtils.GetWidthSize((int)PanelScrollView.ScrollX) < 0)
                         {
                             ScrollToLeft();
                         }
-                        else if (SizeUtils.GetWidthSize((int)button.View.X) + SizeUtils.GetWidthSize(320) > SizeUtils.GetWidthSize(1920))
+                        else if (SizeUtils.GetWidthSize((int)button.X) + SizeUtils.GetWidthSize(320) > SizeUtils.GetWidthSize(1920))
                         {
                             ScrollToRight();
                         }
@@ -142,7 +142,7 @@ namespace TVHome.Views
                     {
                         OnClearAllVMCommand.Execute("");
                     });
-                    PanelButtonStack.Children.Add(button.View);
+                    PanelButtonStack.Children.Add(button);
                     ButtonList.Add(button);
                 }