API Standards question: FrameworkElement.Focusable

K

Keith Patrick

Does anyone know why FrameworkElement.Focusable is not IsFocusable for
consistency with the rest of WPF? I only noticed this recently (mainly
because I've only just started messing with it but never realized it wasn't
in the Is* group in autocomplete) I imagine there are other cases where
this is true, but I haven't run into any that I recall.
 

My Computer

N

Nick Kramer [MSFT]

Yeah, in a better world, it probably would be called IsFocusable. We've
tried to follow all the managed code naming guidelines, and got most of
them, but we obviously missed this property. But one of the things we've
noticed is we can spend a near infinite amount of time tweaking the APIs,
and after a certain point it doesn't add as much value as the other work its
crowding out, and costs people a lot of time updating their programs with
each new CTP, so we've tried to really ratchet down the number of API
changes we're making.

-Nick Kramer [MSFT]
http://blogs.msdn.com/nickkramer

---
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Keith Patrick" <[email protected]> wrote in message
news:[email protected]
> Does anyone know why FrameworkElement.Focusable is not IsFocusable for
> consistency with the rest of WPF? I only noticed this recently (mainly
> because I've only just started messing with it but never realized it
> wasn't in the Is* group in autocomplete) I imagine there are other cases
> where this is true, but I haven't run into any that I recall.
>
>
 

My Computer

K

Keith Patrick

So you're OK with having ground zero of the framework being inconsistent
with the rest of the API (and MS API "standards") so people don't get
compilation errors using a CTP? This is version 1, AND a CTP, so if not
now, when?!?!? It's not like catching a compilation bug like that is a huge
chore (well, unless you use the VS2005 refactoring, which is godawfully
slow, but CTRL-SHIFT-H should suffice), or it'll break explorer.exe, so why
not make it consistent *before* the API has gone gold? It's not like anyone
is going to be surprised by a CTP introducing a breaking change (and I've
gotten breaking changes in my UI that have taken orders of magnitude more
time to track down and fixed than a simple compilation error)
 

My Computer

D

Drew Marsh

Keith Patrick wrote:

> So you're OK with having ground zero of the framework being
> inconsistent with the rest of the API (and MS API "standards") so
> people don't get compilation errors using a CTP? This is version 1,
> AND a CTP, so if not now, when?!?!? It's not like catching a
> compilation bug like that is a huge chore (well, unless you use the
> VS2005 refactoring, which is godawfully slow, but CTRL-SHIFT-H should
> suffice), or it'll break explorer.exe, so why not make it consistent
> *before* the API has gone gold? It's not like anyone is going to be
> surprised by a CTP introducing a breaking change (and I've gotten
> breaking changes in my UI that have taken orders of magnitude more
> time to track down and fixed than a simple compilation error)


Have to jump in with a +1 on this one. It's not like it's a serious change
to the architecture, it's a simple find and replace for developers who should
expect stuff like this when working with a Beta/CTP product.

Just my 2¢,
Drew
___________________________________
Drew Marsh
Chief Software Architect
Mimeo.com, Inc. - http://www.mimeo.com
Microsoft C# / WPF MVP
Weblog - http://blog.hackedbrain.com/
 

My Computer

David Mack

New Member
I know I'm 12 years late to this party, but I can definitively answer this question!

I was a developer on the WPF team back in 2005 and we had a tool (FxCop???) that automatically scanned the code and generated bug tickets for violations of naming conventions. Now I didn't originally create or name this property, but one day one of those tickets landed on my desk complaining about "Focusable" being a bool property not beginning with "Is". I renamed the property, fixed everything it broke internally, and followed protocol and sent out a "breaking change" notification to the appropriate e-mail distribution list saying "speak now or forever hold your peace" and waited the prescribed 5 days (or whatever it was) before submitting the change. During that time I receive no response from anyone. Then on the big day, before committing the change, I sent out one last e-mail saying "ok, nobody complained so here I go...". And then the responses started coming in! The big complaint seemed to be "'Focusable' is not a word!" I replied with examples like "But Baush & Laumb use it on their web site talking about binoculars!" or "Other frameworks use the term" and finally "If I don't change it to 'IsFocusable' it will still be 'Focusable'" - still the bickering on the e-mail thread would not stop. And as luck would have it the hard drop dead date for any public/breaking API changes was the next day, and "Focusable" was forever cast in concrete.

I know it's likely no one will ever read this post, but it's always bugged me!
 

My Computer

System One

  • Operating System
    Windows 10
Top