I made the status 'DependencyProperty', so that it 'notifies' of a change:
public static readonly DependencyProperty DroneStatusProperty = DependencyProperty.Register("DroneStatus", typeof(object), typeof(drone_pl), new UIPropertyMetadata(0)); public Enum_pl.DroneStatuses DroneStatus { get { return (Enum_pl.DroneStatuses)GetValue(DroneStatusProperty); } set { SetValue(DroneStatusProperty, value); } }
<Button IsEnabled="{Binding Path=DroneStatus ???, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource myButtonGroup1}" Grid.Column="0" Name="SendDroneToCharge" Content="SEND TO CHARGE" Click="SendDroneToChargeClick"/>
public bool IsDroneEnabled => DroneStatus == xxx; ... Binding Path=IsDroneEnabled
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)