public Dictionary<string, string> PinnedApps;
-
public AppsHolder(IAppsViewModel ViewModel)
{
this.ViewModel = ViewModel;
await Task.WhenAll(pinnedAppsGettingTask, installedAppsGettingTask);
PinnedApps = pinnedAppsGettingTask.Result;
+ ViewModel.OnPropertyChanged("SumOfCheckedApp");
+
var installedApps = installedAppsGettingTask.Result;
foreach (AppShortcutInfo item in installedApps)
selectedApp.IsPinned = true;
PinnedApps.Add(key, key);
}
+
+ ViewModel.OnPropertyChanged("SumOfCheckedApp");
}
public void OptionMenuPinToggle(string key)
PinnedApps.Add(key, key);
}
+ ViewModel.OnPropertyChanged("SumOfCheckedApp");
+
this.UpdatePinnedApps();
ViewModel.ChangeCurrentStatus(AppsStatus.Default);
}
}
}
+ public int SumOfCheckedApp
+ {
+ get
+ {
+ return appsHolder.PinnedApps.Count;
+ }
+ }
+
public Command ButtonDeleteCancelCommand { get; set; }
public Command ButtonPinAppCommand { get; set; }
public Command ButtonDeleteAppCommand { get; set; }
appsHolder.ResetPinnedApps();
ChangeCurrentStatus(AppsStatus.Default);
+ OnPropertyChanged("SumOfCheckedApp");
+
if (IsPinAppRequested)
{
AppControlUtils.SelfTerminate();
<ColumnDefinition Width="500*" />
</Grid.ColumnDefinitions>
- <Label x:Name="FooterAdditionalText"
- Grid.Row="0"
- Grid.Column="1"
- FontSize="56"
- TextColor="White"
- HorizontalTextAlignment="Start"
- VerticalTextAlignment="Center"
- Text="3 Pinned" />
+ <StackLayout Grid.Row="0" Grid.Column="1"
+ Orientation="Horizontal">
+ <Label x:Name="FooterAdditionalText"
+ FontSize="56"
+ TextColor="White"
+ HorizontalTextAlignment="Start"
+ VerticalTextAlignment="Center"
+ Text="{Binding SumOfCheckedApp}" />
+ <Label FontSize="56"
+ TextColor="White"
+ HorizontalTextAlignment="Start"
+ VerticalTextAlignment="Center"
+ Text=" Pinned" />
+ </StackLayout>
<StackLayout Grid.Row="0" Grid.Column="2"
Orientation="Horizontal">
/// </summary>
public partial class FooterPinStatus : Grid
{
+ public static readonly BindableProperty SumOfCheckedAppProperty = BindableProperty.Create("SumOfCheckedApp", typeof(int), typeof(FooterPinStatus), default(int));
+ public int SumOfCheckedApp
+ {
+ get { return (int)GetValue(SumOfCheckedAppProperty); }
+ set { SetValue(SumOfCheckedAppProperty, value); }
+ }
+
public FooterPinStatus()
{
InitializeComponent();