/// <summary> /// Panels the status changed. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void PanelStatus_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs e) { PanelItem ctr = sender as PanelItem; PanelItemStatus res = (PanelItemStatus)e.NewValue; Brush brush; if (res == PanelItemStatus.Ok) { brush = new SolidColorBrush(Color.FromArgb(127, 0, 255, 0)); } else if (res == PanelItemStatus.Error) { brush = new SolidColorBrush(Color.FromArgb(127, 255, 0, 0)); } else if (res == PanelItemStatus.Selected) { brush = new SolidColorBrush(Color.FromArgb(127, 237, 255, 54)); } else { brush = new SolidColorBrush(Color.FromArgb(51, 225, 237, 247)); } ctr.panelArea.Background = brush; }
/// <summary> /// Gets the panel status. /// </summary> /// <param name="target">The target.</param> public static void SetPanelStatus(PanelItem target, PanelItemStatus value) { target.PanelStatus = value; }