private void ShowSearchLocationPanel() { SearchLocationPanel.Opacity = 0; SearchLocationPanel.Visibility = Visibility.Visible; SearchLocationPanel.Offset(0, 0).Fade(1).Start(); PageLocationContent.Offset(0, 50, 0).Then() .Offset(0, -50).Fade(0).Start(); CmdCancelAddCity.Visibility = Visibility.Visible; CmdAddNewCity.Visibility = Visibility.Collapsed; SearchLocationBox.Focus(FocusState.Programmatic); }
public SongKickSourceContents() { //HscrollbarPolicy = PolicyType.Never; //VscrollbarPolicy = PolicyType.Automatic; viewport = new Viewport (); viewport.ShadowType = ShadowType.None; main_box = new HBox () { Spacing = 6, BorderWidth = 5, ReallocateRedraws = true }; search_by_artist_contents_box = new SearchEventsBox (new EventsByArtistSearch()); search_by_location_contents_box = new SearchEventsBox (new EventsByLocationSearch()); search_location_contents_box = new SearchLocationBox (new LocationSearch()); search_artists_contents_box = new SearchArtistsBox (new ArtistSearch()); recommendations_contents_box = new RecommendedArtistsBox(); recommendations_contents_box.RowActivated += OnRecommendedArtistRowActivate; search_location_contents_box.View.RowActivated += SearchLocationRowActivate; search_artists_contents_box.View.RowActivated += SearchArtistRowActivate; menu_box = BuildTiles(); main_box.PackStart (menu_box, false, false, 0); contents_box = new HBox (); main_box.PackStart (contents_box, true, true, 0); // set default contents box SetView (this.presonal_recommendation_view); // Clamp the width, preventing horizontal scrolling /* SizeAllocated += delegate (object o, SizeAllocatedArgs args) { // TODO '- 10' worked for Nereid, but not for Cubano; properly calculate the right width we should request main_box.WidthRequest = args.Allocation.Width - 30; }; */ viewport.Add (main_box); #pragma warning disable 612 StyleSet += delegate { viewport.ModifyBg (StateType.Normal, Style.Base (StateType.Normal)); viewport.ModifyFg (StateType.Normal, Style.Text (StateType.Normal)); }; #pragma warning restore 612 recommendations_contents_box.LoadAndPresentRecommendations (); AddWithFrame (viewport); ShowAll (); }