Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Data Binding between non FrameworkElements - canit be done in XAML?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dr. WPF  
View profile  
 More options Oct 9 2008, 2:26 am
From: "Dr. WPF" <a...@drwpf.com>
Date: Thu, 09 Oct 2008 01:26:00 -0500
Subject: Re: [WPF Disciples] Re: Data Binding between non FrameworkElements - canit be done in XAML?

   FrameworkElement (FE) derives from UIElement.   
FrameworkContentElement (FCE) derives from ContentElement.  Since the  
framework is not built on a language that supports multiple  
inheritance (and thank god for that!), the divergence was necessary.   
There are parts of ContentElement that you wouldn't want in every FE  
and there are parts of UIElement that you wouldn't want in every FCE. 

   FCE basically exists to support the text formatting engine (which  
can be found in the MS.Internal.Text namespace).  There are a few  
non-text classes that derive from FCE, but they do this just to be  
lightweight. 

   The goal was to make the programming experience for dealing with an  
FE and FCE as similar as possible.  If anything, I think this makes  
the framework *more* elegant. 

   You can think of an FCE as having everything an FE has except  
support for layout/rendering.  Of course, this is no small feature and  
you certainly would not want that kind of overhead in every text  
element.  Imagine the perf if you tried to render every textual stroke  
using WPF’s layout engine... text is far too complex.

   True, it’s weird to see the exact same properties, methods,  
interfaces, events, etc, defined on two completely different base  
classes.  But I guess my general response is a big shrug.  As long as  
Microsoft is willing to maintain the code, I don’t have a problem with  
it.  (And in truth, much of the code shared between the classes is  
codegen’d anyway during the build process, so its really not that hard  
for them to maintain... clever chaps!)

   Sidenote:  IFE vs. LIFE:  A mnemonic we used to use is “LIFE begins  
at UIElement”.  That is to say, every UIElement supports Layout,  
Input, Focus, and Events.  ContentElement gives you everything but the  
‘L’.  As such, the intersection of functionality between an FE and FCE  
is the IFE portion.

   I recommend creating a helper class if you want to treat the IFE  
portion of framework objects in a polymorphic manner.  It’s easy  
enough to implement...  in fact, you can steal most of the  
implementation from the internal FrameworkObject class.  :-)

   Dr. WPF - Online Office at http://www.drwpf.com/blog/[1]

Links:
------
[1] http://www.drwpf.com/blog/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.