public DirectionsViewModel() { Directions = new ObservableCollection<DirectionViewModel>(); foreach (var direction in GKManager.Directions) { var deviceViewModel = new DirectionViewModel(direction); Directions.Add(deviceViewModel); } }
public DirectionsViewModel() { SetZoneGuardCommand = new RelayCommand(OnSetZoneGuard, CanSetZoneGuard); UnSetZoneGuardCommand = new RelayCommand(OnUnSetZoneGuard, CanUnSetZoneGuard); Directions = new ObservableCollection<DirectionViewModel>(); foreach (var direction in XManager.Directions) { var deviceViewModel = new DirectionViewModel(direction.State); Directions.Add(deviceViewModel); } }