Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Grid of Checkboxes in WPF -


i have wpf usercontrol's datacontext tied class this:

public class checkboxgridviewmodel {   public list<list<bool>> checkboxes {get; set;} } 

i want display grid of checkboxes. i'm assuming can use itemscontrol, don't know how dynamic set of columns each row.

this question seems answer mine, except answer didn't give example , can't figure how write out.

so question is, how write xaml display checkboxes of checkboxes property lined in nice grid?

the outer list each row , inner list each column of row.

it's not clear if you're expecting each inner list same size if can use simple setup. using nested itemscontrols single row/column uniformgrids give distribution , automatically handle collections of size without needing setup row , column definitions grid:

<itemscontrol itemssource="{binding checkboxes}">   <itemscontrol.itemtemplate>     <datatemplate>       <itemscontrol itemssource="{binding}">         <itemscontrol.itemtemplate>           <datatemplate>             <checkbox ischecked="{binding}"/>           </datatemplate>         </itemscontrol.itemtemplate>         <itemspaneltemplate>           <uniformgrid rows="1"/>         </itemspaneltemplate>       </itemscontrol>     </datatemplate>   </itemscontrol.itemtemplate>   <itemscontrol.itemspanel>     <itemspaneltemplate>       <uniformgrid columns="1"/>     </itemspaneltemplate>   </itemscontrol.itemspanel> </itemscontrol> 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -