0
我想,基於狀態,顯示一個或分配到網格的小區中的其他控制,如:我可以將兩個元素放在網格的同一個單元格中,並且一次只顯示一個元素嗎?
<Button x:Name="btnBla" Grid.Row=42 Grid.Column=7></Button>
<TextBlock x:Name="txtblockOh" Grid.Row=42 Grid.Column=7 IsEnabled="false"></TextBlock>
...,然後在後臺代碼:
btnBla.IsEnabled = someBool;
txtblockOh.IsEnabled = ! btnBla.IsEnabled;
這是完成此操作的首選方法嗎?
啊,是的,能見度,確保萬無一失。 –