Exemplo n.º 1
0
        public LibraryManager()
        {
            // Check is the instance doesnt already exist.
            if (Current != null)
            {
                //if there is an instance in the app already present then simply throw an error.
                throw new Exception("Only one library manager can exist in a App.");
            }

            // Setting the instance to the static instance field.
            Current = this;



            library = new Collection <Collection <Collection <object> > >("Library");
            library.Items.Add(new Collection <Collection <object> >("Favoriten", "Library")); // Index 0
            library.Items.Add(new Collection <Collection <object> >("Routes", "Directions"));
            library.Items.Add(new Collection <Collection <object> >("Recent Searches", "Find"));
            library.Items.Add(new Collection <Collection <object> >("Recent Locations", "MapPin"));



            // FILTERED LIBRARY
            filteredLibrary = new Collection <Collection <Collection <object> > >("Library");
            filteredLibrary.Items.Add(new Collection <Collection <object> >("Favoriten", "Library")); // Index 0
            filteredLibrary.Items.Add(new Collection <Collection <object> >("Routes", "Directions"));
            filteredLibrary.Items.Add(new Collection <Collection <object> >("Recent Searches", "Find"));
            filteredLibrary.Items.Add(new Collection <Collection <object> >("Recent Locations", "MapPin"));

            filteredLibraryViewSource                 = new CollectionViewSource();
            filteredLibraryViewSource.Source          = filteredLibrary.Items;
            filteredLibraryViewSource.IsSourceGrouped = true;
            filteredLibraryViewSource.ItemsPath       = new Windows.UI.Xaml.PropertyPath("Items");

            Reload(ReloadParameter.All);
        }
Exemplo n.º 2
0
        public LibraryManager()
        {
            // Check is the instance doesnt already exist.
            if (Current != null)
            {
                //if there is an instance in the app already present then simply throw an error.
                throw new Exception("Only one library manager can exist in a App.");
            }

            // Setting the instance to the static instance field.
            Current = this;
            


            library = new Collection<Collection<Collection<object>>>("Library");
            library.Items.Add(new Collection<Collection<object>>("Favoriten", "Library")); // Index 0
            library.Items.Add(new Collection<Collection<object>>("Routes", "Directions"));
            library.Items.Add(new Collection<Collection<object>>("Recent Searches", "Find"));
            library.Items.Add(new Collection<Collection<object>>("Recent Locations", "MapPin"));



            // FILTERED LIBRARY
            filteredLibrary = new Collection<Collection<Collection<object>>>("Library");
            filteredLibrary.Items.Add(new Collection<Collection<object>>("Favoriten", "Library")); // Index 0
            filteredLibrary.Items.Add(new Collection<Collection<object>>("Routes", "Directions"));
            filteredLibrary.Items.Add(new Collection<Collection<object>>("Recent Searches", "Find"));
            filteredLibrary.Items.Add(new Collection<Collection<object>>("Recent Locations", "MapPin"));

            filteredLibraryViewSource = new CollectionViewSource();
            filteredLibraryViewSource.Source = filteredLibrary.Items;
            filteredLibraryViewSource.IsSourceGrouped = true;
            filteredLibraryViewSource.ItemsPath = new Windows.UI.Xaml.PropertyPath("Items");

            Reload(ReloadParameter.All);
        }