Exemplo n.º 1
0
        void UnitPicker_OnPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "SelectedItem")
            {
                //string choice = sortingPicker.Items[sortingPicker.SelectedIndex];

                var choice = (SortingsEnum)Enum.Parse(typeof(SortingsEnum), sortingPicker.Items[sortingPicker.SelectedIndex]);
                SortingChanged?.Invoke(this, choice);
            }
        }
Exemplo n.º 2
0
        private async void SortingClicked(object sender, EventArgs e)
        {
            SortingKind sortingKind;

            if (sender == SortByDate)
            {
                sortingKind = SortingKind.ByDate;
            }
            else if (sender == SortByName)
            {
                sortingKind = SortingKind.ByName;
            }
            else
            {
                sortingKind = SortingKind.ByAmount;
            }

            SortingChanged?.Invoke(this, sortingKind);
            await PopupNavigation.PopAsync();
        }