/// </summary>
public string UnpinnedAppName;
+ public bool IsSelectedExceeds;
+
/// <summary>
/// A constructor
/// Initializes installed and pinned app list
}
else
{
+ if(PinnedApps.Count >= 10)
+ {
+ IsSelectedExceeds = true;
+ ViewModel.OnPropertyChanged("IsSelectedExceeds");
+ return;
+ }
DebuggingUtils.Dbg("Pin! : " + selectedApp);
selectedApp.IsChecked = true;
selectedApp.IsPinned = true;
}
}
+ public bool IsSelectedExceeds
+ {
+ get
+ {
+ return appsHolder.IsSelectedExceeds;
+ }
+ }
+
/// <summary>
/// A command will be executed if the cancel button in FooterDeleteStatus is clicked
/// </summary>
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
+
}
}
IsEnabledDeletePopup="{Binding IsEnabledDeletePopup}"
IsPinAppRequested="{Binding IsPinAppRequested}"
DeletePopupAppLabel="{Binding DeletePopupAppLabel}"
- DeletePopupCommand="{Binding DeletePopupCommand}">
+ DeletePopupCommand="{Binding DeletePopupCommand}"
+ IsSelectedExceeds="{Binding IsSelectedExceeds}">
<ContentPage.BindingContext>
<ViewModels:MainPageViewModel />
</ContentPage.BindingContext>
set { SetValue(DeletePopupCommandProperty, value); }
}
+ public static readonly BindableProperty IsSelectedExceedsProperty = BindableProperty.Create("IsSelectedExceeds", typeof(bool), typeof(FooterPinStatus), false, BindingMode.TwoWay);
+
+ public bool IsSelectedExceeds
+ {
+ get { return (bool)GetValue(IsSelectedExceedsProperty); }
+ set { SetValue(IsSelectedExceedsProperty, value); }
+ }
+
/// <summary>
/// A method for animation when application is terminated
/// </summary>
AppList.InitializeFocus();
}
}
+ else if (e.PropertyName.Equals("IsSelectedExceeds"))
+ {
+ if (IsSelectedExceeds)
+ {
+ Toast.DisplayText("Number of selected apps exceeds 10.");
+ IsSelectedExceeds = false;
+ }
+ }
}
/// <summary>