Professional Documents
Culture Documents
docu"ent viewing in addition to nor"al #D $ra !ics and controls would !ave to learn several inde endent tec!nologies. WPF covers all t!ese wit! consisting rogra""ing "odel as well as tig!t integration w!en eac! ty e of "edia gets co" osited and rendered. #. %esolution Inde endence: WPF a lications are device inde endent i.e., s"art client a lications. &i'e nor"al a lications it won(t get decrease t!e si)e as t!e resolution gets increase. *!is is ossi+le +ecause WPF e" !asis on vector gra !ics. 3. ,ardware -cceleration: WPF is +uilt on to of Direct 3D, content in a WPF a lication w!et!er #D or 3D, $ra !ics or te.t is converted to 3D triangles, te.tures and ot!er Direct 3D o+/ects and t!en rendered +y !ardware. WPF a lications can get t!e +enefit of !ardware acceleration for s"oot!er gra !ics and all round +etter erfor"ance. 0. Declerative Progra""ing: WPF ta'es t!e declarative rogra""ing to t!e ne.t level wit! t!e introduction of 1.tensi+le - lication 2ar'u &anguage34-2&5, ronounced as 67a""el8. 4-2& is li'e ,*2& in we+ used for creating t!e interface, resulting gra !ical designers are e" owered to contri+ute directly to t!e loo' and feel of a lications. 9. %ic! :o" osition and :usto"i)ation: WPF controls are e.tre"ely co" osta+le. 1g: we can create co"+o +o. wit! ani"ated +uttons.
Dispatcher !"ect: It is an a+stract +ase class for classes t!at are +ound to one t!read. :lasses t!at are derived fro" Dis atc!er=+/ect !ave an associated Dis atc!er o+/ect t!at can +e used to switc! t!e t!reads. Application: In every WPF a lication, one instance of - lication class is created. *!is class i" le"ents a singleton attern for access to t!e window of a lication, resources and ro erties. See t!e +elow i"age.
Dependenc# !"ect: It is t!e +ase class for all t!e classes t!at su orts De endency ro erty. $isual: It is t!e +ase class for all t!e visual ele"ents of WPF. *!is class includes features for transfor"ation. %I&lement: It is t!e a+stract +ase class for all WPF ele"ents t!at need +asic resentation feature. *!is class rovides evens suc! as "ouse "ove, drag and dro , clic', etc. Framewor'&lement: It is derived fro" +ase class ;I1le"ents and i" le"ents t!e default +e!aviour of t!e "et!ods defined +y t!e +ase class. Shape: S!a e is t!e +ase class for all t!e s!a e ele"ents suc! as, line, rectangle, elli se, olygon. Control: It is derived fro" Fra"ewor'1le"ent and is t!e +ase class for all t!e user>interactive ele"ents.
Panel: -s t!e na"e suggest it is t!e a+stract +ase class for all t!e anels and is derived fro" Fra"ewor'1le"ent. Panel class !as a :!ildren ro erty for all t!e ;I>1le"ent t!at is inside a anel and defines "et!ods for arranging t!e c!ild controls. Panel defines different classes to define t!e +e!aviour of c!ild controls suc! as, Wra Panel, Stac'Panel, $rid and :anvas. ContentControl: ( It is t!e +ase class for all t!e controls t!at !ave a single content suc! as, Buttons, &a+els, :!ec'Bo., %adioButton, etc.
?ou can also find t!e class !ierarc!y of your a lication using Object Browser in VS #@@A. *o view =+/ect Browser go to view "enu and select =+/ect Browser. =+/ect Browser also contains all t!e na"es aces and its classes. See t!e +elow i"age for WPF class !ierarc!y. It is t!e class !ierarc!y of a si" le WPF a lication t!at we !ave created earlier. ;sing =+/ect Browser you can find all t!e "et!ods, ro erties and events of a articular class +y selecting t!at class.
Some WPF Namespaces: S#stem. Windows:( It is t!e core na"es ace of WPF. ?ou will find all t!e +ase classes suc! as, - lication, De endency=+/ect , De endencyPro erty and Fra"ewor'1le"ent !ere. S#stem. Windows. Controls:( *!is na"es aces contains all t!e controls of WPF. ?ou will also find classes to wor' wit! co" le. controls suc! as Po ; , ScrollBar, StatusBar, *a+Panel, etc. as well as all t!e +asic controls. S#stem. Windows. Data:( *!is na"es ace is used +y WPF for Data Binding. S#stem. Windows. Input:( *!is na"es ace rovides several classes for co""and !andling, 'ey+oard in ut, etc. S#stem. Windows. )ar'up:( *!is na"es ace !el er classes for 4-2& "ar'u code. S#stem. Windows. )edia:( *!is na"es ace is res onsi+le to wor' wit! i"ages, audio, and "ulti"edia.
S#stem. Windows. Shapes:( *!is na"es ace rovides core classes for ;I suc! as &ine, %ectangle, 1lli se, etc. S#stem. Windows. *hreading:( *!is na"es ace rovides classes to wor' wit! "ulti le t!reads. S#stem. Windows. Navigation:( *!is na"es ace rovides classes for navigation +etween WPF ages articularly w!en wor'ing wit! We+ - lications.