private static void OnValuePropertyPropertyChanged(BindableObject bindable, object oldValue, object newValue) { var _this = (EditableView)bindable; var header = Convert.ToString(newValue); DispatcherEx.BeginRise(() => { _this.ReadValue.Text = header; _this.WriteValue.Text = header; }); }
private static void OnItemAppearedPropertyChanged(BindableObject bindable, object oldValue, object newValue) { var _this = (ExtendedListView)bindable; DispatcherEx.BeginRise(() => { _this.ExdListView.Behaviors.Remove(_this.itemAppearingBehavior); _this.itemAppearingBehavior.ItemAppeared = (ICommand)newValue; _this.ExdListView.Behaviors.Add(_this.itemAppearingBehavior); }); }
private static void OnPullToRefreshPropertyChanged(BindableObject bindable, object oldValue, object newValue) { var _this = (ExtendedListView)bindable; DispatcherEx.BeginRise(() => { _this.ExdListView.Behaviors.Remove(_this.pullToRefreshBehavior); _this.pullToRefreshBehavior.PullToRefresh = (ListViewPullToRefreshViewModel)newValue; _this.ExdListView.Behaviors.Add(_this.pullToRefreshBehavior); }); }
private static void OnValuePropertyPropertyChanged(BindableObject bindable, object oldValue, object newValue) { var _this = (DateEditableView)bindable; var val = (DateTime)newValue; DispatcherEx.BeginRise(() => { _this.ReadValue.Text = val.ToString(_this.DateFormat); _this.WriteValue.Date = val; }); }
private static void OnItemSelectedPropertyChanged(BindableObject bindable, object oldValue, object newValue) { var _this = (DateEditableView)bindable; var isEditing = Convert.ToBoolean(newValue); DispatcherEx.BeginRise(() => { _this.WriteLayout.IsVisible = isEditing; _this.ReadLayout.IsVisible = !isEditing; }); }
public void NavigatorPageChanged() { DispatcherEx.BeginRise(() => { PageNavigator.ToolbarMenu.Add(new ToolbarItem() { Icon = "baseline_create_white_24dp.png", Command = Controller.AddNewVoting }); }); }
public void NavigatorPageChanged() { DispatcherEx.BeginRise(() => { PageNavigator.ToolbarMenu.Clear(); PageNavigator.ToolbarMenu.Add(new ToolbarItem() { Icon = "baseline_person_add_white_24dp.png", Command = Controller.AddNewPerson }); }); }
public void SubstrubeTo(INotificationConsumer consumer) { Xamarin.Forms.Device.StartTimer(TimeSpan.FromSeconds(2), () => { try { IEnumerable <NotificationEntity> notify = gateway.GetNotifications(consumer.Account.Id).Result; --count; DispatcherEx.BeginRise(() => consumer.OnNotificationsReceived(notify.Map <NotificationEntity, NotificationModel>())); if (count == 0) { return(false); } } catch (Exception ex) { ex.ToString(); } return(true); }); }
private static void OnItemSelectedPropertyChanged(BindableObject bindable, object oldValue, object newValue) { var _this = (EditableView)bindable; var isEditing = Convert.ToBoolean(newValue); DispatcherEx.BeginRise(() => { _this.WriteLayout.IsVisible = isEditing; _this.ReadLayout.IsVisible = !isEditing; //if (_this.WriteLayout.IsVisible) { // _this.WriteHeader.Text = _this.Header; // _this.WriteValue.Text = _this.Value; //} //if (_this.ReadLayout.IsVisible) { // _this.ReadValue.Text = _this.Value; // _this.ReadHeader.Text = _this.Header; //} }); }
public void NavigatorPageChanged() { DispatcherEx.BeginRise(() => { PageNavigator.ToolbarMenu.Clear(); }); }