Coffeehouse Thread

6 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Inconsistency in Silverlight/WPF

Back to Forum: Coffeehouse
  • User profile image

    Hi guys,

    I'm creating this topic, not to flame about silverlight/wpf, but to get some ideas, why the property naming in Silverlight and probably WPF is different than in .net and WinForms.

    I really like what Silverlight enables .net devs to quickly write web apps (relative to HTML+JS+CSS junk), but the naming just freaks me out.

    For example:

    IsEnabled when in Winforms you have Enabled.

    HasCloseButton  when in WinForms ControlBox / MaximumBox / MinimumBox

    IsTabStop, TabIndex  instead of TabStop, TabIndex. In Silverlight they are not bundled together. On WinForms they are next to each other on PropertyGrid.

    Content / Header / Text/ instead of Text.

    And Grid.Column / Grid.RowSpan / Grid. etc/ that really bugs me.


    This really reminds me of good old VB6 days, when you had Caption / Text / Title  on different controls.

    Do you have any clue, why?

  • User profile image

    Before getting into the topic I'll just point out that Silverlight is not a tool for making web apps, it's a runtime that runs within a browser that already has the necessary dependencies, it is not vendor-neutral nor universally supported.


    .IsEnabled only makes sense for read-only properties. I haven't done much Silverlight/WPF to know if .IsEnabled is read-only or writable.


    I gather the .Text property in WinForms is a legacy from the Win32 window's requirement for a "Caption" string, WPF removes that requirement, which gave the control designers more freedom in appropriately naming properties.



  • User profile image

    IsEnabled reads better (ie: FooBar Is Enabled)

    WPF/SL controls can have more than text for content and sometimes more than one "content" property

    Attached properties. They're a way to set properties on a parent element that relate to that child element.

  • User profile image

    Winforms was finally released 6, or so years ago. The world has changed greatly, and better ways of programming, doing and naming things have resulted in WPF.


    In winforms you only have properties, but you have dependency properties in WPF that allow for far greater flexibility. Yes, you can always compare things, and sometimes the older way seems better, but as a package, WPF and WPF/E are acres and acres better.

  • User profile image

    Prefixing properties with "Is" makes it obvious that they are booleans.

    If you didn't know better, TabStop could be a number and get confused with TabIndex.

    Using IsTabStop instead avoids this problem.


    Grouping related properties by category rather than listing them alphabetically brings IsTabstop and TabIndex closer together but the grouping could do with being more granular. The categories are often a little broad.


    In Windows Forms, TabStop and TabIndex are usually in the small category Behaviour.

    In WPF, IsTabStop and TabIndex are often in the large category Other.

  • User profile image

    Names like IsEnabled are following the Framework Design Guidelines ( which is a very consistent guide for naming. Sorry, W3bbo, I can't agree with you about "Is" names only be read-only.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.