xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Controls="clr-namespace:TVHome.Controls"
x:Class="TVHome.Controls.MainPanelButton">
- <RelativeLayout Opacity="0.3">
- <BoxView x:Name="ButtonBox"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1.03}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
- Opacity="0" />
+ <RelativeLayout Opacity="0.01"
+ HeightRequest="240"
+ WidthRequest="236"
+ HorizontalOptions="Center"
+ VerticalOptions="Center">
<Image x:Name="ButtonBgImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1.6857}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=-0.343}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
Source="img_tizen_home_menu_focused_bg.png"
Opacity="0"
Scale="0" />
<Image x:Name="ButtonBlurImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1.6857}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=-0.343}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.83}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.83}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.085}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.085}"
Source="home_icon_bg_01.png"
- Scale="0.7"
Opacity="0" />
<Image x:Name="ButtonImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.218}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.390}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.2167}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.2167}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.3916}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.3916}"
Source="{Binding CurrentStateDescription.IconPath}" />
<Label x:Name="ButtonTitle"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.8739}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.126}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.125}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.875}"
Opacity="0"
FontSize="58"
TextColor="White"
switch (Status)
{
case "selected":
-
- ButtonBlurImage.Source = "home_icon_bg_01.png";
- ButtonBgImage.FadeTo(0.875, 1);
await ButtonBlurImage.FadeTo(0.99, 1);
+ uint delay = 10;
+ ButtonBlurImage.Source = "home_icon_bg_01.png";
+ await ButtonBgImage.FadeTo(0.875, delay);
ButtonBlurImage.Source = "home_icon_bg_02.png";
- ButtonBgImage.FadeTo(0.750, 1);
- await ButtonBlurImage.FadeTo((1.0 - 0.01 * 2), 1);
+ await ButtonBgImage.FadeTo(0.750, delay);
ButtonBlurImage.Source = "home_icon_bg_03.png";
- ButtonBgImage.FadeTo(0.625, 1);
- await ButtonBlurImage.FadeTo((1.0 - 0.01 * 3), 1);
+ await ButtonBgImage.FadeTo(0.625, delay);
ButtonBlurImage.Source = "home_icon_bg_04.png";
- ButtonBgImage.FadeTo(0.500, 1);
- await ButtonBlurImage.FadeTo((1.0 - 0.01 * 4), 1);
+ await ButtonBgImage.FadeTo(0.500, delay);
ButtonBlurImage.Source = "home_icon_bg_05.png";
- ButtonBgImage.FadeTo(0.375, 1);
- await ButtonBlurImage.FadeTo((1.0 - 0.01 * 5), 1);
+ await ButtonBgImage.FadeTo(0.375, delay);
ButtonBlurImage.Source = "home_icon_bg_06.png";
- ButtonBgImage.FadeTo(0.250, 1);
- await ButtonBlurImage.FadeTo((1.0 - 0.01 * 6), 1);
+ await ButtonBgImage.FadeTo(0.250, delay);
ButtonBlurImage.Source = "home_icon_bg_07.png";
- ButtonBgImage.FadeTo(0.125, 1);
- await ButtonBlurImage.FadeTo((1.0 - 0.01 * 7), 1);
+ await ButtonBgImage.FadeTo(0.125, delay);
ButtonBlurImage.Source = "home_icon_bg_08.png";
+ await ButtonBgImage.FadeTo(0.125, delay);
ButtonBgImage.FadeTo(0.0, 1);
ButtonTitle.FadeTo(0.0, 1);
await ButtonBlurImage.FadeTo(0.0, 1);
+ ButtonBlurImage.Source = "home_icon_bg_01.png";
break;
case "focused":
ButtonTitle.FadeTo(0.8, 100);
ButtonBgImage.FadeTo(0.99, 100);
ButtonBgImage.ScaleTo(1.0, 100);
+ ButtonBlurImage.ScaleTo(1.0, 100);
await View.FadeTo(0.6, 100);
break;
default:
ButtonTitle.FadeTo(0, 100);
ButtonBgImage.FadeTo(0, 100);
ButtonBgImage.ScaleTo(0.01, 100);
+ ButtonBlurImage.ScaleTo(0.01, 100);
await View.FadeTo(0.3, 100);
break;
}
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_tizen_home_list_dim_apps.png" />
+ Source="img_tizen_home_list_dim_apps.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}"
<Views:MainPanel x:Name="PageMainPanel"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.22}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.21875}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.6537}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.390625}"
OnFocusedCommand="{Binding MainPanelFocusedCommand}"
ItemsSource="{Binding MainList}"/>
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Views="clr-namespace:TVHome.Views"
x:Class="TVHome.Views.MainPanel">
+ <!-- TODO : Grid.ColumnSpacing should be -94 after taking Focus managemant -->
<Grid x:Name="PanelButtonGrid">
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="236" />
+ <ColumnDefinition Width="236" />
+ <ColumnDefinition Width="236" />
+ <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
+ <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
</Grid>
</Views:Panel>
\ No newline at end of file
}
HomeMenuItem menuIndex = HomeMenuItem.Recent;
- var index = 0;
+ var index = 1;
PanelButtonGrid.Children.Clear();
foreach (ShortcutInfo item in ItemsSource)
{
HomeMenuItem ItemName = menuIndex;
button.OnFocusedCommand = new Command(() =>
{
+ PanelButtonGrid.RaiseChild(button.View);
FocusPanel();
OnFocusedCommand.Execute(ItemName);
});
{
item.DoAction();
});
- PanelButtonGrid.Children.Add(button.View, index, 0);
+ PanelButtonGrid.Children.Add(button.View,index,0);
index++;
menuIndex++;
}
+ PanelButtonGrid.ForceLayout();
}
public void InitialFocusing()