xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TVHome.Controls.SubPanelThumbnailButton">
<RelativeLayout Opacity="0.3">
- <BoxView x:Name = "ButtonBox"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
+ <BoxView x:Name="ButtonBox"
+ WidthRequest="320"
+ HeightRequest="180"
Color="Blue" />
- <Image x:Name="ButtonImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
- Source="{Binding CurrentStateDescription.IconPath}" />
- <Image x:Name="ButtonIcon"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0.4}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.4}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0.6}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.6}"
+ <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="screenshot.png" />
+ <Image x:Name="ThumbnailGradient"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
+ Source="ic_tizen_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="AppIcon.png" />
- <Label x:Name="ButtonTitle"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8}"
+ <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}"
Opacity="0"
LineBreakMode="TailTruncation"
- HorizontalTextAlignment="Center"
- Text="{Binding CurrentStateDescription.Label}" />
- <Button x:Name = "ButtonFocusArea"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
+ HorizontalTextAlignment="Start"
+ VerticalTextAlignment="Center"
+ Text="{Binding CurrentStateDescription.Label}"
+ TextColor="#FFFFFFFF"
+ FontSize="70"/>
+ <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"
/// </summary>
public partial class SubPanelThumbnailButton : ViewCell
{
- public BindableProperty OnFocusedCommandProperty = BindableProperty.Create("OnFocusedCommand", typeof(ICommand), typeof(SubPanelButton));
+ public BindableProperty OnFocusedCommandProperty = BindableProperty.Create("OnFocusedCommand", typeof(ICommand), typeof(SubPanelThumbnailButton));
public ICommand OnFocusedCommand
{
set { SetValue(OnFocusedCommandProperty, value); }
}
- public BindableProperty OnClickedCommandProperty = BindableProperty.Create("OnClickedCommand", typeof(ICommand), typeof(SubPanelButton));
+ public BindableProperty OnClickedCommandProperty = BindableProperty.Create("OnClickedCommand", typeof(ICommand), typeof(SubPanelThumbnailButton));
public ICommand OnClickedCommand
{
OnFocusedCommand.Execute("");
}
- ButtonTitle.FadeTo(0.99, 300);
+ ThumbnailTitle.FadeTo(0.99, 300);
await View.FadeTo(0.6, 300);
}
private async void OnUnfocused(object sender, FocusEventArgs e)
{
- ButtonTitle.FadeTo(0, 300);
+ ThumbnailTitle.FadeTo(0, 300);
await View.FadeTo(0.3, 300);
}