Wow, enfin je peux parler de WPF en français!! Ca fait du bien :)
Bon, on ne va pas ennuyer nos amis ricains plus longtemps? Sorry guys,
back to EN :)
The classic answer to the "Why shouldn't I subclass" answer is Kevin
Moore's post:
http://work.j832.com/2007/06/don-subclass-panel-unless-you-making.html
In short, markup subclassing is bad.
That said, you can subclass in code, for example to add specific
functionality. About this, see my (I hope) classic post:
http://blog.galasoft.ch/archive/2007/03/02/107747.aspx
And yes, like Mike says, most of the time you don't need to because you
can modify the L&F of the element using templates. And also, you can add
your own DependencyProperties to implement new functionality.
Le plus grand challenge avec WPF, c'est de "désapprendre" ce qu'on sait
des technologies "classiques" :)
Bien du plaisir,
Laurent
Aline Paponaud wrote:
> Hello everyone,
> I am new in this list and am following your interesting conversations.
> I didn't take the time to send a "hello world" message. Then, it's done.
>
> Well i am really a noob at WPF and, more generally, development.
> Actually i just finished my studies and started working on a project
> that uses WPF in my new company. I have a quite good theoretical
> background (about oo design, and abt the structure and the theory of a
> IT development project in general). Then, developing with WPF is very
> complicated for me.
> I know Windows forms and have already fulfilled little projects using
> this technology. Now i feel lost...
>
> So my existential question is:
> - Why is there no inheritance possible in /graphical/ terms; i mean if
--
Laurent Bugnion [Microsoft MVP, MCP]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
While it's true that WPF is very new in many ways, DependencyProperties
(DPs) are actually a "has" relationship between objects, but with
something more. The WPF property system adds much functionality (such as
a built-in controller to help you realize a MVC pattern), but you can
actually inherit DependencyObjects to represent your datas in an UML
way. Note that there was a long discussion in this group about using DOs
and DPs versus using "normal" CLR objects and something called
INotifyPropertyChanged. Check the group's archive and you'll find it.
Where do you live? I am in Zurich, though I was born in Lausanne.
Friendly,
Laurent
--
Date: Mon, 16 Jun 2008 22:44:28 +0200
From: boo...@gmail.com
To: wpf-di...@googlegroups.com
Subject: My existential question about WPF