我有標籤時單選First
或Second
IsChecked=true
和摺疊是建議立即進行刪除可見當Third
或Fourth
IsChecked=false
。 是否只有一種方法可以將按鈕的名稱傳遞給轉換器,並在轉換器中決定是否摺疊或可見?WPF結合知名度
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical">
<RadioButton Content="Visible" x:Name="First"></RadioButton>
<RadioButton Content="Visible" x:Name="Second"></RadioButton>
<RadioButton Content="Collapsed" x:Name="Third"/>
<RadioButton Content="Collapsed" x:Name="Fourth"></RadioButton>
</StackPanel>
<Label Content="Test" Grid.Row="1"></Label>
</Grid>
從綁定isSelected開始 – Paparazzi