private void PackagesScrolled(object sender, ItemsViewScrolledEventArgs e) { var top = e.VerticalOffset < 1; var transY = Convert.ToInt32(SearchBarView.TranslationY); if (transY == 0 && e.VerticalDelta > 15 && !top) { var trans = SearchBarView.Height + SearchBarView.Margin.Top; var safeInsets = On <Xamarin.Forms.PlatformConfiguration.iOS>().SafeAreaInsets(); Task.WhenAll( SearchBarView.TranslateTo(0, -(trans + safeInsets.Top), 250, Easing.CubicIn), SearchBarView.FadeTo(0.25, 200)); } else if (transY != 0 && (e.VerticalDelta < 0 && (Math.Abs(e.VerticalDelta) > 10) || top)) { Task.WhenAll( SearchBarView.TranslateTo(0, 0, 250, Easing.CubicOut), SearchBarView.FadeTo(1, 200)); } }
protected override void OnAppearing() { base.OnAppearing(); Task.WhenAll( SearchBarView.TranslateTo(0, 0, 250, Easing.CubicOut), SearchBarView.FadeTo(1, 200)); }
public void SetUp() { const string prefabAssetPath = "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/SearchBar/SearchBarView.prefab"; var prefab = AssetDatabase.LoadAssetAtPath <SearchBarView>(prefabAssetPath); view = Object.Instantiate(prefab); }
protected override void OnAppearing() { base.OnAppearing(); // Show SearchBar if it was previously hidden when navigating back to this page Task.WhenAll( SearchBarView.TranslateTo(0, 0, 250, Easing.CubicOut), SearchBarView.FadeTo(1, 200)); }
public SectionsHandler(ISectionsController sectionsController, IScenesViewController scenesViewController, ILandController landController, SearchBarView searchBarView) { this.sectionsController = sectionsController; this.scenesViewController = scenesViewController; this.searchBarView = searchBarView; this.landController = landController; sectionsController.OnSectionShow += OnSectionShow; sectionsController.OnSectionHide += OnSectionHide; scenesViewController.OnSceneSelected += OnSelectScene; }
/// <summary> /// Unity function OnEnable, called when the window gets initialized. /// </summary> internal override void OnEnable() { base.OnEnable(); _searchBar = new SearchBarView(); _searchBar.OnSearchChanged += SearchChanged; // this searches in the default folder Editor Default Resources for the texture _selectionTexture = EditorGUIUtility.Load(_selectionTextureName) as Texture; _selectedTexture = EditorGUIUtility.Load(_selectedTextureName) as Texture; _tildeFolderTexture = EditorGUIUtility.Load(_tildeFolderTextureName) as Texture; _folderTexture = AssetDatabase.GetCachedIcon(_defaultFolderName) as Texture; _warningTexture = EditorGUIUtility.Load(_warningTextureName) as Texture; _fileTexture = EditorGUIUtility.Load(_fileTextureName) as Texture; }
protected override void OnAppearing() { base.OnAppearing(); DefaultDataWrapper = AppModel.Instance.CurrentConnectionsWrapper; CurrentDataWrapper = DefaultDataWrapper; var searchBarView = new SearchBarView(); searchBarView.Clear += OnSearchClear; searchBarView.Search += OnSearch; int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 20; _gridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 0, ContentPaddingLeft = 0, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 60, ItemsSource = CurrentDataWrapper, ItemTemplate = new DataTemplate(typeof(ConnectionFastCell)) }; var container = new PageViewContainer { HorizontalOptions = LayoutOptions.StartAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Content = new ContentPage { Content = _gridView } }; Content = new StackLayout { Orientation = StackOrientation.Vertical, Children = { new UserHeaderView(CurrentDataWrapper.LoginedUser, false), searchBarView, container } }; AppController.Instance.DownloadAllUsers(null); UserController.Instance.UpdateProfileData(AppModel.Instance.CurrentUser, true); }
protected override void OnAppearing() { base.OnAppearing(); var searchBarView = new SearchBarView(); searchBarView.Padding = new Thickness(20, 20, 20, 5); searchBarView.Clear += OnSearchClear; searchBarView.Search += OnSearch; int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 20; DefaultDataWrapper = new ExhibitorsGridWrapper(AppModel.Instance.Exhibitors); CurrentDataWrapper = DefaultDataWrapper; _gridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 0, ContentPaddingLeft = 0, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 60, ItemsSource = CurrentDataWrapper, ItemTemplate = new DataTemplate(typeof(ExhibitorFastCell)) }; var container = new PageViewContainer { HorizontalOptions = LayoutOptions.StartAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Content = new ContentPage { Content = _gridView } }; Content = new StackLayout() { Children = { searchBarView, container } }; AppController.Instance.DownloadExhibitorsData(null); }
public DetailView(SearchBarView searchBarView, PlayerView playerView) { TranslatesAutoresizingMaskIntoConstraints = false; WantsLayer = true; SearchBarView = searchBarView; SearchBarView.SetContentHuggingPriorityForOrientation(251, NSLayoutConstraintOrientation.Vertical); PlayerView = playerView; PlayerView.SetContentHuggingPriorityForOrientation(251, NSLayoutConstraintOrientation.Vertical); BreadcrumbView = new BreadcrumbView(); AddSubview(SearchBarView); AddSubview(PlayerView); AddDefaultLayoutConstraints(); }
public App() { InitializeComponent(); MainPage = new SearchBarView(); }
public ConnectionPage() { Title = AppResources.Connect; BackgroundColor = Color.Transparent; CurrentModel = AppModel.Instance.CurrentConnectionsWrapper; PendingConnectionsDataWrapper = GetPendingConnectionsDataWrapper(); UserController.Instance.UpdateProfileData(CurrentModel.LoginedUser); searchBarView = new SearchBarView(); searchBarView.Clear += OnSearchClear; searchBarView.Search += OnSearch; _wrapper = new ConnectListWrapper(CurrentModel); UserListView = new ListView { RefreshCommand = _wrapper.RefreshCommand, HasUnevenRows = true, ItemTemplate = new DataTemplate(typeof(ConnectionCell)), SeparatorVisibility = SeparatorVisibility.None, IsPullToRefreshEnabled = false, ItemsSource = GetItemsSource(), //ItemsSource = CurrentModel, BindingContext = _wrapper }; UserListView.SetBinding <ConnectListWrapper>(ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay); var buttonLayout = new StackLayout { Orientation = StackOrientation.Horizontal, Spacing = 0, HorizontalOptions = LayoutOptions.Fill, Children = { new ContentView { Content = GetButton(AppResources.ProfileAllContacsBtnHeader, AppResources.MenuColor, OnAllContactsClicked), WidthRequest = AppProvider.Screen.Width / 3 }, new ContentView { Content = GetButton(AppResources.ProfilePendingContacsBtnHeader, AppResources.AgendaCongressoColor, OnPendingContactsClicked), WidthRequest = AppProvider.Screen.Width / 3 }, new ContentView { Content = GetButton(AppResources.ProfileRatingBtnHeader, AppResources.AgendaExpoColor, OnRankingClicked), WidthRequest = AppProvider.Screen.Width / 3 }, }, Padding = new Thickness(0) }; lowerLayout = new StackLayout { Orientation = StackOrientation.Vertical, }; GetLowerLayoutChidren(selectedContactedList); StackLayout layout = new StackLayout { Orientation = StackOrientation.Vertical, Children = { new UserHeaderView(CurrentModel.LoginedUser, false, false, false), buttonLayout, lowerLayout } }; BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, true, true); // BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true); //Content = layout; Content = bgLayout; }