/// <summary> /// Update d.MazeString with args.NewValue. /// </summary> /// <param name="d"> MazeUserControl object. </param> /// <param name="args"> /// DependencyPropertyChangedEventArgs with the field "NewValue" as string. /// </param> private static void MazeStringChanged(DependencyObject d, DependencyPropertyChangedEventArgs args) { MazeUserControl maze = (MazeUserControl)d; maze.MazeString = (string)args.NewValue; }
/// <summary> /// Update d.EndLocation with args.NewValue. /// </summary> /// <param name="d"> MazeUserControl object. </param> /// <param name="args"> /// DependencyPropertyChangedEventArgs with the field "NewValue" as Location. /// </param> private static void UpdateEnd(DependencyObject d, DependencyPropertyChangedEventArgs args) { MazeUserControl maze = (MazeUserControl)d; maze.EndLocation = (Location)args.NewValue; }
/// <summary> /// Update d.MazeRows with args.NewValue. /// </summary> /// <param name="d"> MazeUserControl object. </param> /// <param name="args"> /// DependencyPropertyChangedEventArgs with the field "NewValue" as int. /// </param> private static void UpdatedRows(DependencyObject d, DependencyPropertyChangedEventArgs args) { MazeUserControl maze = (MazeUserControl)d; maze.MazeRows = (int)args.NewValue; }