Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Tue, 7 Jun 2005 15:00:12 +0200,    group: microsoft.public.windows.developer.winfx.avalon        back       


Custom transforms   
Hi,

Is the Transorm class intended to be inheritable? I.e. are developers 
allowed to write their own transform class?

I'm asking this because I just tried to create a class that inherits from 
Transform. In the Transform class there is a function 
AddRefOnChannelCore(ByVal channel As Channel) As ResourceHandle that is 
marked *MustOverride*. No, problem, except that the Channel class in 
System.Windows.Media.Composition seems not to be publicly accessible. In 
fact the whole namespace is hidden.

Can someone motivate why it's like this? Clearly I'm missing some knowledge 
about the internal workings of Avalon.
Thanks,
Vash
date: Tue, 7 Jun 2005 15:00:12 +0200   author:   Vash vashist.s [at] gmail.com

RE: Custom transforms   
MatrixTransform class should be derived from...

"Vash" wrote:

> Hi,
> 
> Is the Transorm class intended to be inheritable? I.e. are developers 
> allowed to write their own transform class?
> 
> I'm asking this because I just tried to create a class that inherits from 
> Transform. In the Transform class there is a function 
> AddRefOnChannelCore(ByVal channel As Channel) As ResourceHandle that is 
> marked *MustOverride*. No, problem, except that the Channel class in 
> System.Windows.Media.Composition seems not to be publicly accessible. In 
> fact the whole namespace is hidden.
> 
> Can someone motivate why it's like this? Clearly I'm missing some knowledge 
> about the internal workings of Avalon.
> Thanks,
> Vash 
> 
> 
>
date: Wed, 8 Jun 2005 09:59:07 -0700   author:   Ryan Dawson

Re: Custom transforms   
Our basic scene/graphics primitive types are not generally subclassable as 
this is not an intended point of extensibility in our system.  By ensuring 
that these types are sealed (or abstract with internal abstract methods, as 
in Transform, Brush, etc), we are able to Freeze/Clone these objects as well 
as "flatten" and re-instantiate as necessary for perf, and this would become 
much more cumbersome if the full type weren't "known" a priori.  Since these 
types are DependencyObjects, you're certainly welcome to attach and 
additional *data* which you may wish to attach, just not subclass and add 
code.  (Note that there are a few known issues with our current handling of 
attached properties (e.g. I believe they don't copy during a clone), but 
we're actively addressing them).

We'd be interested in knowing what problem you're trying to solve by 
subclassing.  Does using attached properties work?  If not, is it something 
you can implement as a databinding on the Matrix property of a 
MatrixTransform which refers to a business object you control?

The actual method you see below is somewhat misleading, as it just happens 
to be the first internal abstract method you encounter preventing a 
derivation - this is simply an implementation detail.

-Adam Smith [MS]

"Vash" <vashist.s [at] gmail.com> wrote in message 
news:ek0nYD2aFHA.1456@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> Is the Transorm class intended to be inheritable? I.e. are developers 
> allowed to write their own transform class?
>
> I'm asking this because I just tried to create a class that inherits from 
> Transform. In the Transform class there is a function 
> AddRefOnChannelCore(ByVal channel As Channel) As ResourceHandle that is 
> marked *MustOverride*. No, problem, except that the Channel class in 
> System.Windows.Media.Composition seems not to be publicly accessible. In 
> fact the whole namespace is hidden.
>
> Can someone motivate why it's like this? Clearly I'm missing some 
> knowledge about the internal workings of Avalon.
> Thanks,
> Vash
>
date: Sat, 18 Jun 2005 23:03:31 -0700   author:   Adam Smith [MS]

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us