using MediaBrowser.Model.Dto;
using MediaBrowser.UI;
using MediaBrowser.UI.Controller;
using MediaBrowser.UI.ViewModels;
using System.Collections.ObjectModel;
namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
{
///
/// Interaction logic for ItemPerformers.xaml
///
public partial class ItemPerformers : BaseDetailsControl
{
///
/// Initializes a new instance of the class.
///
public ItemPerformers()
{
InitializeComponent();
}
///
/// The _itemsResult
///
private ItemsResult _itemsResult;
///
/// Gets or sets the children of the Folder being displayed
///
/// The children.
public ItemsResult ItemsResult
{
get { return _itemsResult; }
private set
{
_itemsResult = value;
OnPropertyChanged("ItemsResult");
Items = DtoBaseItemViewModel.GetObservableItems(ItemsResult.Items);
}
}
///
/// The _display children
///
private ObservableCollection _items;
///
/// Gets the actual children that should be displayed.
/// Subclasses should bind to this, not ItemsResult.
///
/// The display children.
public ObservableCollection Items
{
get { return _items; }
private set
{
_items = value;
//lstItems.ItemsSource = value;
OnPropertyChanged("Items");
}
}
///
/// Called when [item changed].
///
protected override async void OnItemChanged()
{
ItemsResult = await UIKernel.Instance.ApiClient.GetAllPeopleAsync(App.Instance.CurrentUser.Id, itemId: Item.Id);
}
}
}