Esempio n. 1
0
 public async Task SavePreviousEntry(PreviousEntry i)
 {
     if (i == null)
     {
         return;
     }
     using (var ctx = new PreviousEntryService())
     {
         await ctx.UpdatePreviousEntry(i).ConfigureAwait(false);
     }
 }
        public NEWSPickerEntryCell()
            : base()
        {
            InitializeComponent();

            PickerInternal.SetBinding(Picker.ItemsSourceProperty, new Binding(nameof(ItemsSource), mode: BindingMode.OneWay, source: this));
            PickerInternal.SetBinding(Picker.SelectedItemProperty, new Binding(nameof(SelectedItem), mode: BindingMode.TwoWay, source: this));

            MessagingCenter.Subscribe <Picker>(this, "Previous", (p) =>
            {
                if (p == PickerInternal && PreviousEntry != null)
                {
                    PreviousEntry.FocusControl(FocusDirection.Back);
                }
            });

            MessagingCenter.Subscribe <Picker>(this, "Next", (p) =>
            {
                if (p == PickerInternal && NextEntry != null)
                {
                    FocusControl(FocusDirection.Forward);
                }
            });
        }