/// <summary> /// Initializes a new custom instance of the StateViewModel class. /// </summary> /// <param name="parentControl"></param> /// <param name="classes"></param> public StateViewModel(StandingsControlViewModel parentControl, Classification[] classifications) { try { this.ParentControl = parentControl; this.Classifications = new ReadOnlyCollection<ClassificationViewModel>( (from classification in classifications select new ClassificationViewModel(this, classification)) .ToList()); } catch ( Exception ex ) { Globals.ShowExceptionMessage(ex); } }
public StandingsControl() { InitializeComponent(); DataContext = new StandingsControlViewModel(); }