private static readonly DependencyProperty MyProperty = DependencyProperty.Register("MyNumber", typeof(int), typeof(int), null);
=>바인딩 안됨
=>변경된 코드
private static readonly DependencyProperty MyProperty = DependencyProperty.Register("MyNumber", typeof(object), typeof(object), null);
type을 값형식이 아닌 참조형식으로 설정해야 바인딩이 가능하다.
'C#' 카테고리의 다른 글
| 문자열에서 숫자 추출 (0) | 2024.08.13 |
|---|---|
| 오프라인 Nuget package 설치 ...온라인 패키지 원본을 모두 사용할 수 있는지 확인하세요... (0) | 2024.06.24 |
| String to Enum (0) | 2024.04.02 |
| as (0) | 2024.02.01 |
| Parallel.ForEach (0) | 2024.01.22 |