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.

wpf - XAML MVVM Multibinding -


i have mvvm wpf application, has 'user settings' injected view. these settings contain things last used search terms, or column widths on datagrids etc. works nicely , viewmodel unaware of these settings view specific , viewmodel may shared multiple views.

these values bound in xaml of view.

however, of settings have level of interference properties on viewmodel.

an example:

viewmodel has property of public int maxresults { get; set; } used limit number of results query brings back.

when user changes value from, say, 100 50, ideally want saved in view's settings; enabling next time view used value 50 used rather 100.

my first question:

how can bind both view settings, , viewmodel property same element? thinking multi value converter, unsure of whether there funkier ways of performing operation. need both bindings 2 way, not horrible update loops.

my second question:

sometimes i'll want viewmodel take precedence on values supplied view settings. i'm wondering if has suggestions allowing 1 bound value take precendence on another.

any comments / answers / questions appreciated.

i don't see point in having viewmodel ignorant of these settings. i'd have vm in control of these user preferences , have view pick them via binding.

this has advantage of having control of these prefs view model , can test user preferences being loaded correctly in vm via unit tests.

remember, vm view on model having user preferences loaded via vm makes perfect sense here , less have edge-cases these.


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 -