이 코드를 변경하고 싶습니다.
public string Height
{
get => (string)GetValue(HeightProperty);
set => SetValue(HeightProperty, value);
}
=>
예를 들어 get 및 set에서 발생하는 일 전후에 더 많은 코드 줄을 사용 하고 추가 하지 않도록 코드를 변경하려면 어떻게 해야합니까?
get
및 set
다음에 코드 블록을 열 수 있습니다 .
public string Height
{
get {
// do something
return (string)GetValue(HeightProperty);
}
set {
// validations, etc...
SetValue(HeightProperty, value);
}
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다