

Public event EventHandler? SeekCompleted Public static readonly BindableProperty SpeedProperty Public static readonly BindableProperty VolumeProperty Public static readonly BindableProperty VideoWidthProperty Public static readonly BindableProperty VideoHeightProperty Public static readonly BindableProperty SourceProperty Public static readonly BindableProperty ShowsPlaybackControlsProperty Public static readonly BindableProperty PositionProperty Public static readonly BindableProperty KeepScreenOnProperty Public static readonly BindableProperty IsLoopingProperty Public static readonly BindableProperty DurationProperty Public static readonly BindableProperty CurrentStateProperty Public static readonly BindableProperty BufferingProgressProperty

Public static readonly BindableProperty AutoPlayProperty Public static readonly BindableProperty AspectProperty Use this instead: var valor = value?.Public class MediaElement : View, IMediaElementController The above can make your application crash if value is null. The second option can be accomplished this way:Īs you can see we are now accessing them through the CollectionView Binding, we do this when we specify the Source and use a Reference.
Colorconverter xamarin code#
The first one will give you more flexibility but at the same time might add repeated code (if all the items will share the same color for example). If you want to make it work: either add these two properties ( TextColor and ButtonBackColor) to the GroupModel class or change the binding so that these two properties are accessed from the parent Binding. The same way the nombre property you are binding to the Label Text Property, is part of the GroupModel class, that way the TextColor and ButtonBackColor properties are expected to be part of the same class you did bind as the ItemSource. You are using a CollectionView and when you set the ItemSource Your issue is not with the ValueConverter but with your Bindings. Public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) Public object Convert(object value, Type targetType, object parameter, CultureInfo culture) Propert圜hanged?.Invoke(this, new Propert圜hangedEventArgs(property)) Īnd Here is my converter: public class ColorConverter : IValueConverter Protected virtual void OnPropert圜hanged( string property = "") Platillos = platillosRepository.GetFilteredByGroup(grupo) PlatillosRepository platillosRepository = new PlatillosRepository() Public ICommand SelectedGrupoCommand => new Command(async grupo => Public ICommand SelectedPlatilloCommand => new Command(async platillo =>Īwait Navigation.PushAsync(new PlatilloView()) GrupoRepository grupoRepository = new GrupoRepository() PlatillosRepository repository = new PlatillosRepository() Public PlatillosViewModel(INavigation navigation) Public event Propert圜hangedEventHandler Propert圜hanged Here is my ViewModel: public class PlatillosViewModel : INotifyPropert圜hanged This is my view code: ?xml version="1.0" encoding="UTF-8"?>

I have a label with black text color inside a frame with white background color, the thing is, I want to assign the background color and text color from the viewmodel, I have created the converter, and did the bindings, but for some reason it isn't working
