示例#1
0
 private void AddItemToPlaylist(PlaylistMediaViewModel droppedVm, int droppedIndex)
 {
     if (droppedIndex > PlayListItems.Count())
     {
         PlayListItems.Add(droppedVm);
     }
     else
     {
         PlayListItems.Insert(droppedIndex, droppedVm);
     }
 }
示例#2
0
        private void CheckBox_CheckedChanged(object sender, CheckedChangedEventArgs e)
        {
            CheckBox checkBox   = (CheckBox)sender;
            var      selectitem = checkBox.BindingContext.ToString();

            item = selectitem;
            if (PlayListItems == null)
            {
                PlayListItems = new ObservableCollection <string>();
            }
            if (checkBox.IsChecked == true)
            {
                PlayListItems.Add(item);
            }
            else if (checkBox.IsChecked == false)
            {
                PlayListItems.Remove(item);
            }
        }