라디오 버튼 컨트롤과 라디오 버튼이 선택되어있는 기반으로 사용할 수있는 일부 종속 컨트롤이 있습니다.부모의 속성을 기반으로 중첩 된 LayoutGroup에 대해 IsEnabled를 설정합니다.
이렇게하려면 LayoutGroup
에 IsEnabled
을 {Binding IsSelected, ElementName=radioButtonControlName}
으로 바인딩하려고합니다. 그래도 작동하지 않습니다. 나는 ListBoxEdit
제어의 LayoutGroup
의 외부를 이동하는 경우
내 XAML은 예상대로 작동, 덧붙여이
<Grid>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxe:ListBoxEdit ShowBorder="False" StyleSettings="{dxe:RadioListBoxEditStyleSettings}" HorizontalContentAlignment="Stretch">
<dxe:ListBoxEditItem Name="radioButtonA" IsSelected="{Binding IsASelected, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}">
<dxlc:LayoutGroup>
<dxlc:LayoutItem Label="A">
<dxlc:LayoutGroup Name="aLayoutGroup" IsEnabled="{Binding IsSelected, ElementName=radioButtonA}">
<dxlc:LayoutItem Label="Date A">
<dxe:DateEdit EditValue="{Binding DateA, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Text A">
<dxe:TextEdit EditValue="{Binding TextA, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxe:ListBoxEditItem>
<dxe:ListBoxEditItem Name="radioButtonB" IsSelected="{Binding IsASelected, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}">
<dxlc:LayoutGroup>
<dxlc:LayoutItem Label="B">
<dxlc:LayoutGroup Name="bLayoutGroup" IsEnabled="{Binding IsSelected, ElementName=radioButtonB}">
<dxlc:LayoutItem Label="Date B">
<dxe:DateEdit EditValue="{Binding DateB, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Text B">
<dxe:TextEdit EditValue="{Binding TextB, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxe:ListBoxEditItem>
</dxe:ListBoxEdit>
</dxlc:LayoutGroup>
</Grid>
것 같습니다. 그런 다음 문제는 라디오 버튼을 종속 컨트롤과 정렬하는 방법을 모르겠다는 것입니다. 누군가 내가 그 사람들을 적절하게 조정할 수 있다면 그 해결책도 효과가 있다고 생각합니다.