Ejemplo n.º 1
0
        private void LoadLibraryCollection()
        {
            LibraryCollection.Clear();
            ContainerLibraries.Visibility = Visibility.Visible;
            ItemCollection.Clear();
            ContainerMovies.Visibility = Visibility.Collapsed;
            CastCollection.Clear();
            ContainerCast.Visibility          = Visibility.Collapsed;
            MainGrid.RowDefinitions[2].Height = new GridLength(0);

            lvLibrarySections.ItemsSource = null;

            foreach (DataRow row in Database.GetLibrarySections().Rows)
            {
                LibraryCollection.Add(new Library()
                {
                    id   = long.Parse(row["id"].ToString()),
                    name = row["name"].ToString()
                });
            }

            lvLibrarySections.ItemsSource = LibraryCollection;
        }