Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new popup page to edit filter settings
        /// </summary>
        /// <param name="filterSettings">filter settings to edit</param>
        public FilterTakeoffDirectionsPopupPage(LocationFilterSettings filterSettings)
        {
            this.CloseWhenBackgroundIsClicked = true;

            this.BindingContext = this.viewModel =
                new FilterTakeoffDirectionsPopupViewModel(filterSettings);

            this.InitializeComponent();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Shows "filter by takeoff directions" popup page and lets the user set the filter
        /// criteria.
        /// </summary>
        /// <param name="filterSettings">filter settings to edit</param>
        /// <returns>filter settings, or null when user canceled the popup dialog</returns>
        public static async Task <LocationFilterSettings> ShowAsync(LocationFilterSettings filterSettings)
        {
            var popupPage = new FilterTakeoffDirectionsPopupPage(filterSettings)
            {
                tcs = new TaskCompletionSource <LocationFilterSettings>()
            };

            await popupPage.Navigation.PushPopupAsync(popupPage);

            return(await popupPage.tcs.Task);
        }