private static void HandleActionRightCanExecutePropertyChanged(BindableObject bindable, object oldValue, object newValue) { TitleViewBasic targetView; targetView = (TitleViewBasic)bindable; if (targetView != null && newValue != null) { bool currentvalue = (bool)newValue; targetView.ActionRightImageCtrl.TextColor = currentvalue ? StyleResources.WhiteColor() : StyleResources.Primary400Color(); targetView.ActionRightLabelCtrl.TextColor = currentvalue ? StyleResources.WhiteColor() : StyleResources.Primary400Color(); targetView.ActionRightImageCtrl.IsEnabled = currentvalue; targetView.ActionRightLabelCtrl.IsEnabled = currentvalue; targetView.ActionRightStackLayout.IsEnabled = currentvalue; } }
private static void HandleActionLeftCanExecutePropertyChanged(BindableObject bindable, object oldValue, object newValue) { TitleViewBasic targetView; targetView = (TitleViewBasic)bindable; //Här sker logiken föra att ställa om knappen utseende if (targetView != null && newValue != null) { bool currentvalue = (bool)newValue; targetView.ActionLeftImageCtrl.TextColor = currentvalue ? StyleResources.WhiteColor() : StyleResources.Primary400Color(); targetView.ActionLeftLabelCtrl.TextColor = currentvalue ? StyleResources.WhiteColor() : StyleResources.Primary400Color(); targetView.ActionLeftImageCtrl.IsEnabled = currentvalue; targetView.ActionLeftLabelCtrl.IsEnabled = currentvalue; targetView.ActionLeftStackLayout.IsEnabled = currentvalue; } }