예제 #1
0
        /// <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;
        }
예제 #2
0
        /// <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;
        }
예제 #3
0
        /// <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;
        }