예제 #1
0
        public SendsPage(Func <SendView, bool> filter, bool type = false)
        {
            InitializeComponent();
            _vm        = BindingContext as SendsPageViewModel;
            _vm.Page   = this;
            _vm.Filter = filter;
            if (type)
            {
                _vm.PageTitle = AppResources.SearchType;
            }
            else
            {
                _vm.PageTitle = AppResources.SearchSends;
            }

            if (Device.RuntimePlatform == Device.iOS)
            {
                ToolbarItems.Add(_closeItem);
                _searchBar.Placeholder = AppResources.Search;
                _mainLayout.Children.Insert(0, _searchBar);
                _mainLayout.Children.Insert(1, _separator);
            }
            else
            {
                NavigationPage.SetTitleView(this, _titleLayout);
            }
        }