/// <summary> /// Initializes a new instance of the <see cref="CurrentSwitchBindingContext"/> class. /// </summary> /// <param name="component">The component that creates the behavior.</param> /// <param name="simulation">The simulation for which the behavior is created.</param> /// <param name="behaviors">The created behaviors.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="component"/>, <paramref name="simulation"/> or <paramref name="behaviors"/> is <c>null</c>.</exception> public CurrentSwitchBindingContext(ICurrentControllingComponent component, ISimulation simulation, IBehaviorContainer behaviors) : base(component, simulation, behaviors) { var branch = ControlBehaviors.GetValue <IBranchedBehavior <double> >().Branch; ControlValue = () => branch.Value; }
public Control() { Controls = new ControlCollection(this); margin = DefaultMargin; padding = DefaultPadding; bounds = new Rectangle(Point.Empty, DefaultSize); behaviors = ControlBehaviors.Selectable; }
public Control() { Controls = new ControlCollection(this); margin = DefaultMargin; padding = DefaultPadding; bounds = new Rectangle(Point.Empty, DefaultSize); behaviors = ControlBehaviors.Selectable; Theme.ThemeChanged += (o, e) => is_dirty = true; }