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.

graphics - Constructing images in C# WPF/MVVM (drawing lines, arcs, text) -


in wpf standalone-application need draw image based on series of 'commands' such "text @ position x,y" , "draw line x1,y1 x2,y2".

my problems , considerations outlined below - , comments appreciated!

  • the image of water pump constructed our company.

  • the commands generated proprietory system within our company.

  • there no problems interpreting commands.

  • my issue with

    a) wpf control should choose draw 'on' ?

    b) how can move major part of code unit-testable classes?

    a1) have tried pathgeometry, excellent drawing geometric shapes can't draw text.

    a2) have tried shape, supports drawing text, less advanced respect geometry.

    a3) use strength in each of two, , 'apply' pathgeometry shape?

    a4) need handle mouseover after drawing highlight based on mouse position. can done through computing 'behind scenes' object nearest mouse position (though possible, it's heavy!) can choice of rendering control me out?

    b1) not expect end drawing subjectable test?

    b2) how 'deep' should reference controls belonging in gui? gut feeling says no deeper viewmodel (not business level), higher keep it, more code remains in places can't unit tested.

here answers specific wpf:

you can draw on canvas, wich lets set element's position (canvas.setleft, canvas.settop, ...)

and can use pathgeometry, shape, etc... should have loop @ geometrygroup allows group geometry one.

for text, if want text geometry, can use formattedtext buildgeometry method..


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 -