xmlns:VM="clr-namespace:TVApps.ViewModels"
x:Class="TVApps.Controls.AppListView"
HorizontalOptions="Fill"
- Orientation="Horizontal">
+ Orientation="Horizontal"
+ IsNoApps="{Binding Path=IsVisible, Source={x:Reference Name=NoContentsView}}">
<RelativeLayout x:Name="AppListGrid"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
}
/// <summary>
+ /// Identifies the IsNoApps bindable property
+ /// </summary>
+ public static readonly BindableProperty IsNoAppsProperty = BindableProperty.Create("IsNoApps", typeof(bool), typeof(AppListView), true);
+
+ /// <summary>
+ /// Gets or sets the value of whether there is no apps or not
+ /// </summary>
+ public bool IsNoApps
+ {
+ get { return (bool)GetValue(IsNoAppsProperty); }
+ set { SetValue(IsNoAppsProperty, value); }
+ }
+
+ /// <summary>
/// A count of items in list
/// </summary>
private int AppCount;
}
/// <summary>
+ /// Identifies the IsNoApps bindable property
+ /// </summary>
+ public static readonly BindableProperty IsNoAppsProperty = BindableProperty.Create("IsNoApps", typeof(bool), typeof(FooterPinStatus), true);
+
+ /// <summary>
+ /// Gets or sets the value of whether there is no apps or not
+ /// </summary>
+ public bool IsNoApps
+ {
+ get { return (bool)GetValue(IsNoAppsProperty); }
+ set { SetValue(IsNoAppsProperty, value); }
+ }
+
+ /// <summary>
/// A constructor
/// </summary>
public FooterPinStatus()
{
Text = "Done",
FontSize = SizeUtils.GetFontSize(28),
- IsEnabled = false
+ IsEnabled = !IsNoApps
};
DoneButton.Clicked += DoneButtonClicked;
- if (SumOfCheckedApp > 0)
- {
- IsEnabled = true;
- }
this.Children.Add(DoneButton,
heightConstraint: Constraint.Constant(SizeUtils.GetHeightSize(80)),
{
if (e.PropertyName.Equals("SumOfCheckedApp"))
{
- if (SumOfCheckedApp > 0)
- {
- DoneButton.IsEnabled = true;
- }
- else
- {
- DoneButton.IsEnabled = false;
- }
-
if (pinnedAppCount > SumOfCheckedApp)
{
AppNameLabel.Text = UnpinnedAppName;
additionalInfo.FadeTo(1, 334);
pinnedAppCount = SumOfCheckedApp;
}
+
+ if (e.PropertyName == "IsNoApps")
+ {
+ DoneButton.IsEnabled = !IsNoApps;
+ }
}
}
}
Grid.RowSpan="5"
x:Name="FooterPin"
IsVisible="false"
+ IsNoApps="{Binding Path=IsNoApps, Source={x:Reference Name=AppList}}"
PinnedAppName="{Binding PinnedAppName}"
UnpinnedAppName="{Binding UnpinnedAppName}"
SumOfCheckedApp="{Binding SumOfCheckedApp}"/>
}
else
{
- BackKeyInfo.Text = "Quit";
+ if (CurrentStatus == AppsStatus.Default)
+ {
+ BackKeyInfo.Text = "Quit";
+ }
}
});
}
FooterNormal.IsVisible = false;
FooterPin.IsVisible = true;
FooterDelete.IsVisible = false;
- BackKeyInfo.Text = "Front";
+ if (IsPinAppRequested)
+ {
+ BackKeyInfo.Text = "Quit";
+ }
+ else
+ {
+ BackKeyInfo.Text = "Front";
+ }
+
AppList.InitializeFocus();
break;
case AppsStatus.Delete: