을 설정하지 않는이 DependencyProperty
:체크 박스는 내가 가지고있는 종속성 속성
public bool ShowEntireHierarchyEx
{
get { return (bool)GetValue(ShowEntireHierarchyExProperty); }
set { SetValue(ShowEntireHierarchyExProperty, value); }
}
public static readonly DependencyProperty ShowEntireHierarchyExProperty =
DependencyProperty.Register("ShowEntireHierarchyEx", typeof(bool), typeof(CustomizeStatisticsStyleControl), new UIPropertyMetadata(false));
내가 XAML이 CheckBox
에 바인딩 해요 :
<CheckBox Margin="16,5,0,0" x:Name="checkBoxHierarcy"
IsChecked="{Binding ElementName=customizeStatisticsStyle, Path=ShowEntireHierarchyEx, Mode=TwoWay}">
S_how entire gate hierarchy
</CheckBox>
을하지만 CheckBox
는 ShowEntireHierarchy
을 변경하지 않는 몇 가지 이유 속성을 사용하지만 코드에서 ShowEntireHierarchy
속성이 변경되면 CheckBox
이 변경됩니다. 내가 여기서 무엇을 놓치고 있니?
감사합니다.
괜찮아 보입니다. 체크 박스를 토글 할 때 속성이 변경되지 않는다는 것을 어떻게 알 수 있습니까? 거기에 뭔가 다른 속성이 바인딩되어 있고, 다른 것은 응답하지 않습니다? – itowlson
아니요, get 접근 자의 SetValue 줄에 중단 점이 있습니다. CheckBox를 클릭하면 결코 중단되지 않습니다. – Carlo