Windows Programming 20 Years Later

I’ve spent some time recently looking at the Windows Presentation Foundation (WPF). WPF is part of Vista, part of .NET 3.0 and part of Silverlight.

At some level, I’m disappointed with WPF. After hearing so much about it (but ignoring it) during the last few years, I expected it to be a radical new way of writing graphical user interfaces. Instead, it seems like a slightly different way of developing Winforms applications.

With .NET 2.0, you use Visual Studio to design your Windows “forms”. Visual Studio automatically generates code for you that creates all of the visual elements (windows, buttons, list boxes, etc.) at run time. When your form’s constructor is called, it calls “InitializeComponents()” and the generated code does the rest. The Visual Studio forms editor also lets you easily attach code to different events raised by the visual components.

With WPF and .NET 3.0, you use the Expression Blend tool to design your user interface. As with the Visual Studio forms editor, Expression Blend also lets you easily attach code to handle UI events. The output of Expression Blend, however, is not code, it’s XML. When your code’s constructor is called, again, InitializeComponents is called but, this time, the function works by loading the XML and interpreting it (creating forms, buttons, list boxes, etc.) rather than by executing generated code.

At this level, the only advantage/difference of/between WPF and .NET 2.0 Winforms is the use of XML rather than generated code. Mind you, this can be a significant advantage. By managing the UI specification as data separate from code, WPF facilitates the use of skilled graphical designers to develop user interfaces. Designers can use Expression Blend to fine tune UI without worrying about unintended changes to program code.

After looking WPF further, however, I realized how it is more significant than it appears at first blush. The WPF designers have completely reimplemented the basic Windows UI elements (and more) in a much more cohesive, sensible, fashion. The net result (no pun intended) is very cool.

For 20 years now Windows programmers have been suffering the limitations of the original Windows 1.0 design from 1985. Windows 1.0 defined a basic set of UI controls: window, menu, list box, static control, text control, push button, radio button and group box (I think that’s all of them!). These controls were implemented by Windows itself and could be composited by programmers in their own applications. Additionally, programmers could subclass these controls to alter their behavior or to implement their own user-defined controols.

Subsequent versions of Windows introduced new controls. Somewhere along the line, combo boxes, context menus, rich text controls, progress bars and other controls were added. The concept of a small set of built-in controls with narrowly prescribed behavior persisted however. You could do some things like image-based pushbuttons or scrolling lists of images by taking advantage of owner draw features but the amount of customization available with the built-in controls was minimal.

.NET 1.1 and 2.0 added new controls, too, including DataGrid and DataGridView that had no built-in counterparts. These controls, however, resembled the built-in ones in how the could be used and customized.

With WPF, the original Windows UI elements are totally subsumed by the new WPF UI model. It is possible to use WPF to write what looks like a traditional Windows application, but it is also possible to write applications with much more sophisticated user interfaces.

WPF has a very clean notion of containment and transformation. Let me explain what I mean by these. Consider a traditional Windows 1.0 List control. It contains a list of strings and can present these strings in a vertical list, providing scrollbars if they are needed to view all the list contents. In WPF, the ListBox control is a container that will provide a scrolling list of whatever it contains. What can it contain? Anything! Well, any WPF UI element. If you put static text boxes in a WPF list, it’s alot like a Windows 1.0 list. But if you want, you can put editable text boxes or tree views in a WPF ListBox and it will do the right thing with them. There are several container controls in WPF and all of them support this functionality.

Similarly, WPF provides a consistent mechanism for visual transformation. In graphics (and, don’t forget, WPF has full support for 2D and 3D graphics) “transformation” refers to mathematical manipulations to modify the appearance of what is being displayed. There are translation, scaling and rotation transformations that can move, size and rotate graphical data. WPF supports these transformations, too. If you surround a text box with a 90 degree rotation transformation, the text box will appear (and function) vertically instead of horizontally. Transformations can apply to entire graphical elements (for example, our previous ListBox) or to contained elements (we could have one tree view rotated within our list of tree views).

Beyond the generalized concepts of containment and transformation, WPF also adds support for animation including keyframe animation. With keyframe animation, Expression Blend lets you specify the visual characteristics of a UI at two (or more) points in time and the WPF run-time code will take care of gradually transforming the UI for the intervening points. You can, for example, place an image at one (x,y) coordinate to start and at another (x,y) coordinate 10 seconds later. The WPF run-time code will then gradually move the image from the initial to its final location over the course of 10 seconds. Key frame animation can be applied to scaling and rotation transformations as well as to other visual effects (transparency, for example).

So far, I’ve mostly read about WPF. I want to write some non-trivial software to put it through its paces. From the design perspective, I really like it. I also like the relationship between stand-alone WPF applications and Silverlight (browser-based) applications. I’ll post again on the topic when I have more to say.

154 Responses to “Windows Programming 20 Years Later”

  1. Buy Best Proxy

    I found a great…

  2. Tommy Focht says:

    Sweet internet site, super design and style, very clean and employ friendly.

  3. Hurray says:

    Hurray! I just got $1 BitCoin, Free! Earn $10 BitCoin Coupons & Huge Referral Bonus, All Free! Join me NOW: btckick.com

  4. StephenPaply says:

    cheap viagra online canadian pharmacy buy viagra viagra walmart

  5. DanielEmind says:

    viagra amazon viagra no doctor prescription viagra 100mg price

  6. JaredSox says:

    where to buy viagra online viagra low price walmart viagra

  7. WallyLes says:

    ed meds pills drugs ed medicine online top erection pills

  8. ThomasBlelt says:

    vacuum therapy for ed best ed pills non prescription over the counter ed drugs

  9. Stevenslilk says:

    cheap viagra online canadian pharmacy buy generic drugs cheap viagra online

  10. KennethEpite says:

    viagra otc buy generic drugs cheap viagra online canadian pharmacy
    overcoming ed

  11. Stevenslilk says:

    viagra over the counter buy viagra online viagra coupons

  12. Stevenslilk says:

    viagra prices cheap viagra viagra professional

  13. KennethEpite says:

    where can i buy viagra over the counter buy viagra viagra price comparison
    treatment for ed

  14. Tedda says:

    why neuralink is good

  15. DanielEnank says:

    buy cheap prescription drugs online generic ed pills medicine for ed

  16. DanielEnank says:

    new treatments for ed Cheap Erection Pills pain medications without a prescription

  17. DouglasNix says:

    100mg viagra without a doctor prescription generic ed pills best ed drug

  18. DanielEnank says:

    google viagra dosage recommendations cheap ed pills generic ed pills

  19. DanielEnank says:

    erectile dysfunction ED Pills ed and diabetes

  20. Williamphish says:

    viagra without a doctor prescription ed pills online pharmacy ed meds online without prescription or membership

  21. RobertBurry says:

    medication drugs https://canadaedwp.com/ best treatment for ed

  22. Williamphish says:

    erectile dysfunction pills canada ed drugs homeopathic remedies for ed

  23. RobertBurry says:

    homeopathic remedies for ed https://canadaedwp.com/ natural ed

  24. RobertKic says:

    buy generic drugs from india buy generic drugs from canada medications

  25. Williamwat says:

    tadalafil tadalafil

  26. RobertKic says:

    generic drugs from india buy generic drugs online

  27. RobertKic says:

    payday loans no credit check instant approval personal loans for bad credit

  28. Williamwat says:

    drugs from india online pharmacy

  29. RobertKic says:

    tadalafil canada tadalafil online

  30. RobertKic says:

    online pharmacy compare pharmacy

  31. Williamwat says:

    canadian pharmacy buy generic drugs from canada medications

  32. Williamwat says:

    instant online payday loans personal loans with no credit check

  33. It’s going to be ending of mine day, but before ending I am reading this impressive paragraph
    to improve my knowledge.

  34. Douglaspar says:

    best ed pills online https://sildenafilxxl.com/ online pharmacy viagra

  35. RobinAmara says:

    how can i order prescription drugs without a doctor buy Cipro online best ed solution

  36. RobinAmara says:

    best online drugstore canada online pharmacy best ed drugs

  37. Briandicle says:

    viagra without doctor prescription Cipro india ed supplements

  38. RobinAmara says:

    the cost of cialis cialis does medicaid cover cialis

  39. Briandicle says:

    buy viagra online canada viagra coupons 75% off viagra online usa

  40. RobinAmara says:

    pump for ed generic Cipro medication online

  41. RobinAmara says:

    google viagra dosage recommendations Prednisone erectile dysfunction remedies

  42. RobinAmara says:

    male enhancement pharmacy no need prescriptions best medicine for ed

  43. Briandicle says:

    drug store online buy Doxycyline online drugstore

  44. RobinAmara says:

    erection pills viagra online buy Amoxil can ed be reversed

  45. RobinAmara says:

    taking l-citrulline and cialis together cialis tadalafil average price cialis

  46. Briandicle says:

    best medicine for ed online pharmacy canada buy ed drugs

  47. RobinAmara says:

    is cialis generic available cialis for sale cialis for daily use

  48. RobinAmara says:

    medication online generic Amoxil how to overcome ed naturally

  49. TravisLes says:

    natural ed: cheap ed drugs supplements for ed

  50. Philipignof says:

    ed treatments that really work: male enhancement pills erection pills

  51. TravisLes says:

    ed medication online: errection problems prescription drugs online

  52. Larryorelt says:

    online ed pills canadian pharmacy online viagra without doctor prescription

  53. DanielNub says:

    canada viagra buy viagra online usa viagra without a doctor prescription usa

  54. Larryorelt says:

    prices of cialis cialis free trial cialis or viagra

  55. DanielNub says:

    best erectile dysfunction pills canadian drugs without prescription injectable ed drugs

  56. Larryorelt says:

    ed treatment review cheap viagra online canada pharmacy buy prescription drugs online legally

  57. Larryorelt says:

    can i buy zithromax over the counter zithromax 500 mg for sale can you buy zithromax over the counter in mexico

  58. DanielNub says:

    where to get zithromax over the counter can you buy zithromax over the counter zithromax 250 mg tablet price

  59. DanielNub says:

    online medication approved canadian pharmacies online viagra without a doctor prescription

  60. Larryorelt says:

    zithromax tablets where to get zithromax generic zithromax india

  61. Larryorelt says:

    over the counter erectile dysfunction pills how to buy cialis from canada cheap pills online

  62. DanielNub says:

    daily use of cialis buy viagra cialis legitimate cialis by mail

  63. DanielNub says:

    erection pills that work buy viagra online canada pharmacy ed medications list

  64. DavidTek says:

    erection problems ed meds rx best erectile dysfunction medication

  65. WilfredIntep says:

    drugs prices top erectile dysfunction pills ed drugs generic

  66. DavidTek says:

    buy Doxycycline Amoxil home remedies for erectile dysfunction

  67. WilfredIntep says:

    drugs online ed drugs generic buy erectile dysfunction medications online

  68. DavidTek says:

    ed medicines ed meds rx top erectile dysfunction pills

  69. DavidTek says:

    vacuum therapy for ed safe online pharmacies in canada canadian mail in pharmacy

  70. DavidTek says:

    cenmox 250 cenmox 500 how to buy ed meds pills drugs

  71. WilfredIntep says:

    real viagra without a doctor prescription over the counter erectile dysfunction pills cheap erectile dysfunction pills online

  72. DavidTek says:

    buy Amoxil online cheap antibiotics ed drugs

  73. DavidTek says:

    natural ed pills buy erectile dysfunction pills online buy erectile dysfunction medications online

  74. WilfredIntep says:

    buy prescription drugs online best ed drugs ed meds rx

  75. Josephmog says:

    erection pills that work where to buy lipitor lipitor tablets

  76. Josephmog says:

    no prescription viagra when will viagra be generic mail order viagra

  77. HaroldJaips says:

    errectile disfunction buy lipitor online generic lipitor

  78. Josephmog says:

    where can i buy viagra walmart viagra goodrx viagra

  79. HaroldJaips says:

    ed pills comparison canada online pharmacy canada online pharmacy

  80. Josephmog says:

    treat ed canada online pharmacy canadian pharmacies shipping to usa

  81. HaroldJaips says:

    natural treatments for ed canadian online pharmacies canada online pharmacy

  82. Josephmog says:

    buy generic 100mg viagra online viagra without a doctor prescription usa online doctor prescription for viagra

  83. HaroldJaips says:

    buy erection pills prescription meds without the prescriptions treatment of ed

  84. HaroldJaips says:

    prescription meds without the prescriptions lipitor generic lipitor generic india

  85. HaroldJaips says:

    reasons for ed atorvastatin lipitor lipitor generic

  86. HaroldJaips says:

    treatment for ed fda approved canadian online pharmacies fda approved canadian online pharmacies

  87. BtoB (band) says:

    Surprise!! Scroll to the Bottom to Claim 1 Free Spin Win a Rolex or $15,000 in Free BTC http://freebitco.in/?r=14268596&tag=scrapebox

  88. Kennethcut says:

    nsszifvh viagra prescription buy viagra online canada

  89. Kennethcut says:

    wimwdwfu viagra no prescription buy viagra online cheap

  90. IsaacHuche says:

    viagra over the counter https://cheapvgr100.com/ dxvctpie

  91. Kennethcut says:

    how much does viagra cost https://cheapvgr100.com/ bhzrtdil

  92. IsaacHuche says:

    otc viagra https://cheapvgr100.online/ rodkqzer

  93. hey says:

    Taxi moto line
    128 Rue la Boétie
    75008 Paris
    +33 6 51 612 712  

    Taxi moto paris

    I am not sure the place you’re getting your info, but great topic.
    I must spend some time finding out more or understanding more.

    Thanks for great information I used to be on the
    lookout for this info for my mission.

  94. Warrenreesy says:

    alesse order online buying clomid online yasmin brand

  95. Warrenreesy says:

    acyclovir 400 mg tablet cost famvir cost canada valtrex gel

  96. Johnnysweap says:

    can i buy amoxicillin over the counter how to buy amoxycillin bactrim cost

  97. Warrenreesy says:

    benadryl capsules order benadryl online 125 mg benadryl

  98. Warrenreesy says:

    5 benadryl pills benadryl for sale in canada allegra 08701

  99. Johnnysweap says:

    4 benadryl pills allegra sale canada periactin 4mg tablets

  100. Warrenreesy says:

    buy bactrim online without prescription amoxil pharmacy where can i buy zithromax in canada

  101. Warrenreesy says:

    zyrtec 10 mg tablet price allegra 20.80 550 mg benadryl

  102. Johnnysweap says:

    how to buy valtrex online valtrex 100 mg how to get acyclovir prescription

  103. Warrenreesy says:

    order yasmin yasmin cheap levlen pill australia

  104. Johnnysweap says:

    cephalexin 500mg capsule antibiotic best antibiotic for cellulitis zithromax 500mg

  105. Johnnysweap says:

    amoxicillin 200 mg tablet flagyl antibiotic amoxicillin cost australia

  106. btcusd says:

    Surprise!! Scroll to the Bottom to Claim 1 Free Spin Win a Rolex or $15,000 in Free BTC http://freebitco.in/?r=14268596&tag=scrapebox

  107. Surprise!! Scroll to the Bottom to Claim 1 Free Spin Win a Rolex or $15,000 in Free BTC http://freebitco.in/?r=14268596&tag=scrapebox

  108. Edwardjet says:

    eodytzsv viagra price http://viagrastm.com/ viagra prices

  109. Edwardjet says:

    jktqzdug cialis free trial http://cialisirt.com/ cialis tadalafil 20 mg

  110. Edwardjet says:

    wfftnokr how much does viagra cost http://viagrastm.com/ where to get viagra

  111. Jamesarify says:

    is viagra over the counter http://viagrastm.online/ buy viagra online canada

  112. Jamesarify says:

    cheap viagra 100mg http://viagrastm.online/ viagra over the counter usa 2020

  113. Jamesarify says:

    viagra over the counter http://viagrastm.online/ viagra price comparison

  114. Jamesarify says:

    high blood pressure and cialis http://cialisirt.online/ how often to take 10mg cialis

  115. Jamesarify says:

    viagra over the counter walmart http://viagrastm.online/ viagra online canadian pharmacy

  116. JasonCapse says:

    erection problems https://canadianpharmacyvikky.com ed medicine

  117. JasonCapse says:

    cheap medications https://canadianpharmacyvikky.com ed meds online without doctor prescription

  118. GeorgeCip says:

    treatment with drugs https://canadianpharmacyvikky.com new ed drugs

  119. GeorgeCip says:

    erectial disfunction https://canadianpharmacyvikky.com ed pills

  120. I am always browsing online for posts that can assist me. Thx!

  121. I enjoy you because of all of the effort on this blog. Betty delights in carrying out internet research and it’s easy to see why. A lot of people hear all about the compelling form you convey advantageous guidance by means of the blog and attract contribution from other individuals about this area and my child has always been becoming educated a great deal. Enjoy the remaining portion of the new year. You’re carrying out a brilliant job.

  122. Tesha says:

    We are a group of volunteers and starting
    a new scheme in our community. Your site provided us with valuable info to work on.
    You’ve done a formidable job and our whole community will be thankful to
    you.

  123. I’m commenting to let you be aware of of the amazing discovery my child developed browsing the blog. She came to find a good number of details, including how it is like to have a great coaching character to get a number of people clearly completely grasp a number of advanced issues. You actually did more than her desires. I appreciate you for churning out such beneficial, dependable, edifying and cool guidance on that topic to Emily.

  124. Fwsxapeno says:

    erectile dysfunction pills pharmacy open near me canada online pharmacy

  125. PhillipOdodo says:

    ed treatment drugs
    https://canadarx24.com/
    ed men

  126. PhillipOdodo says:

    ed pills cheap
    https://canadarx24.com/
    online ed drugs

  127. Lokuapeno says:

    pharmacy drugstore online online pharmacy canada board of pharmacy

  128. Davidchupt says:

    natural ed remedies https://canadarx24.com/ ed treatment

  129. FgvdExork says:

    cheapest pharmacy canada rx pharmacy best drugstore bronzer

  130. Davidchupt says:

    canadian online drugstore https://canadarx24.com/ new treatments for ed

  131. Jtmfapeno says:

    treatment for erectile dysfunction specialty pharmacy online pharmacy without scripts

  132. Jlloirore says:

    pharmacy coupons best online pharmacy best drugstore bb cream

  133. Khthsmat says:

    on line pharmacy dollar store drug test impotence

  134. Davidchupt says:

    the best ed drug https://canadarx24.com/ best ed supplements

  135. JamesLap says:

    is ed reversible wrthakfk buy generic levitra comfortis for dogs without vet prescription

  136. JamesLap says:

    order viagra online nuigthku buy sildenafil best place to buy viagra online

  137. JamesLap says:

    how much does viagra cost bwhtrvey viagra viagra without a doctor prescription

  138. Daviddilky says:

    taking l-citrulline and cialis together khtgfyjg http://edcheapgeneric.online/ cialis dosages

  139. JamesLap says:

    cialis price cialis generic xoqqgnro side effects of cialis

  140. JamesLap says:

    generic for viagra yecgiyft sildenafil buy viagra online cheap

  141. Daviddilky says:

    ed meds online canada http://canadarx24.online/ ed causes and cures chlywbuu

  142. Robertonelf says:

    eshd amazon viagra http://dietkannur.org dpez qced

  143. Lesterexciz says:

    cialis money order grsdknvq http://tadedmedz.online/ cialis vs levitra

  144. Michaelhamma says:

    cialis going generic in 2019 in us tadalafil generic mzwoejtd cialis prices 20mg

  145. Davidgox says:

    buy prescription viagra viagra Without a Doctor Prescription

  146. BruceMug says:

    viagra only 0.2$ viagra only 0.2$

  147. BruceMug says:

    meds without a doctor prescription buy viagra very cheap

  148. Ilse says:

    If you desire to increase your know-how simply keep visiting this website and be updated with
    the hottest gossip posted here.

Leave a Reply