c# - WPF Groups of controls -
for example have such xaml code:
<window x:class="switchingcontrol.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="350" width="525"> <grid> <grid> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition/> </grid.rowdefinitions> <grid.columndefinitions> <columndefinition/> <columndefinition/> </grid.columndefinitions> <grid grid.columnspan="2"> <stackpanel orientation="horizontal"> <radiobutton content="first"></radiobutton> <radiobutton content="second"></radiobutton> <radiobutton content="third"></radiobutton> </stackpanel> </grid> <grid grid.row="1"> <grid.rowdefinitions> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> </grid.rowdefinitions> <label content="first" grid.row="0" ></label> <label content="second" grid.row="1"></label> <label content="first" grid.row="2"></label> <label content="second" grid.row="3"></label> <label content="third" grid.row="4"></label> <label content="third" grid.row="5"></label> <label content="second" grid.row="6"></label> </grid> </grid> </grid> </window>
i need show labels have content first
first
radiobutton
checked. labels have content second
if second radiobutton
checked. main problem number of labels acn 70-100. there elegant easy way implement it?
Comments
Post a Comment