コード例 #1
0
            private Thickness calculateThickness(SudokuPresenter host)
            {
                var sudoku = host.Sudoku;

                if (host.Sudoku == null)
                {
                    return(new Thickness());
                }
                return(new Thickness(host.ElementBorderWidth));
            }
コード例 #2
0
            public BorderThicknessUpdator(SudokuPresenter host)
            {
                if (host == null)
                {
                    throw new ArgumentNullException("host");
                }
                this.host = host;

                DependencyPropertyDescriptor.FromProperty(
                    SudokuPresenter.SudokuBorderWidthProperty,
                    typeof(SudokuPresenter))
                .AddValueChanged(host, UpdateNeeded);
                DependencyPropertyDescriptor.FromProperty(
                    SudokuPresenter.SudokuProperty,
                    typeof(SudokuPresenter))
                .AddValueChanged(host, UpdateNeeded);
            }
コード例 #3
0
 private void updateElementBorderThickness(SudokuPresenter host)
 {
     host.SetSudokuBorderThickness(calculateThickness(host));
 }