public void Initialize() { _dispatcher.BeginInvoke(new Action(() => { RegionManager.RegisterViewWithRegion(MainStationView.TabViewRegion, typeof(MainTabView)); RegionManager.RegisterViewWithRegion(MainStationView.TabViewRegion, typeof(RecentMixListView)); RegionManager.RegisterViewWithRegion(MainStationView.TabViewRegion, typeof(PopularMixListView)); RegionManager.RegisterViewWithRegion(MainStationView.TabViewRegion, typeof(HotMixListView)); RegionManager.RegisterViewWithRegion(MainStationView.TabViewRegion, typeof(TagsTabView)); //RegionManager.RegisterViewWithRegion(MainStationView.TabViewRegion, typeof (FavoritesView)); TileService.Add <MainStationView>(new TileData { Title = "8tracks", BackgroundImage = new Uri("pack://siteoforigin:,,,/Resources/Tiles/MB_9999_8tracks.png") }); SearchBarService.Add <MainStationView>(new SearchBarData { Category = "Search_By_Tag", WatermarkText = "Search_By_Tag_Watermark", AutoCompleteProvider = GetMixesByTag }, Tuple.Create("Type", "Tag")); SearchBarService.Add <MainStationView>(new SearchBarData { Category = "Search_By_Artist", WatermarkText = "Search_By_Artist_Watermark", AutoCompleteProvider = GetMixesByTag }, Tuple.Create("Type", "Artist")); }), DispatcherPriority.Background); }
public void Start() { Radio.CurrentTrackChanged += RadioOnCurrentTrackChanged; _tileData = new TileData(); _tileData.Title = "Now playing"; _tileData.IsLarge = true; _tileData.BackgroundImage = null; TileService.Add <NowPlayingView>(_tileData, AppRegions.MainRegion); }
public void Initialize() { _dispatcher.BeginInvoke(new Action(() => { RegionManager.RegisterViewWithRegion(AppRegions.ViewRegion, typeof(Views.Browse.Tabs.AlbumView)); RegionManager.RegisterViewWithRegion(AppRegions.ViewRegion, typeof(Views.Browse.Tabs.ArtistView)); RegionManager.RegisterViewWithRegion(Views.Browse.MainStationView.TabViewRegion, typeof(Views.Browse.Tabs.SearchResultsView)); TileService.Add <Views.Browse.MainStationView>(new TileData { Title = "Search", BackgroundImage = new Uri("pack://siteoforigin:,,,/Resources/Tiles/MB_0029_programs.png") }); SearchBarService.Add <Views.Browse.MainStationView>(new SearchBarData { Category = "Search_For_Song_Or_Artist", WatermarkText = "Search_For_Song_Or_Artist", AutoCompleteProvider = SuggestArtists }); SearchBarService.SetActive( sbar => sbar.NavigationUri.OriginalString == typeof(Views.Browse.MainStationView).FullName); }), DispatcherPriority.Background); _dispatcher.BeginInvoke(new Action(() => { RegionManager.RegisterViewWithRegion(Views.Similar.MainStationView.TabViewRegion, typeof(Views.Similar.Tabs.SimilarView)); RegionManager.RegisterViewWithRegion(Views.Similar.MainStationView.TabViewRegion, typeof(Views.Similar.Tabs.RecentView)); TileService.Add <Views.Similar.MainStationView>(new TileData { Title = "Similar artists", BackgroundImage = new Uri("pack://siteoforigin:,,,/Resources/Tiles/MS_0000s_0031_net3.png") }); SearchBarService.Add <Views.Similar.MainStationView>(new SearchBarData { Category = "Search_For_Similar_Artist", WatermarkText = "Search_For_Similar_Artist_Watermark", AutoCompleteProvider = SuggestArtists }); }), DispatcherPriority.Background); _dispatcher.BeginInvoke(new Action(() => { RegionManager.RegisterViewWithRegion(Views.Favorites.MainStationView.TabViewRegion, typeof(Views.Favorites.Tabs.FavoritesView)); TileService.Add <Views.Favorites.MainStationView>(new TileData { Title = "Favorites", BackgroundImage = new Uri("pack://siteoforigin:,,,/Resources/Tiles/MB_0004_favs2.png") }); }), DispatcherPriority.Background); _dispatcher.BeginInvoke(new Action(() => TileService.Add <LoveHateView>(new TileData { Title = "Love or hate", BackgroundImage = new Uri("pack://siteoforigin:,,,/Resources/Tiles/MB_0003_Favs1.png") })), DispatcherPriority.Background); _dispatcher.BeginInvoke(new Action(() => TileService.Add <Views.Style.MainStationView>(new TileData { Title = "Eclectic", BackgroundImage = new Uri("pack://siteoforigin:,,,/Resources/Tiles/MB_0008_touch.png") })), DispatcherPriority.Background); }