|
|
|
date: Thu, 18 Oct 2007 04:55:04 -0700,
group: microsoft.public.windows.developer.winfx.avalon
back
Re: What items can I apply transitions to?
Hi Glenn,
Glenn wrote:
> Hello,
>
> I'm just starting to transition from WinForms to WPF and have a few
> questions. What items can I apply transitions to? The application I need to
> build requires many different media types transitioning in and out of the
> maid WPF screen - Video, Web Content, RSS Feed, static images, text, etc.
You can apply transitions (and generally any kind of transforms) to
DirectX content. Unfortunately, you cannot apply this to any content
drawn to GDI. And as you had to find out the hard way, the Frame element
is using Internet Explorer to display web pages, and guess what, IE
draws against GDI... so no luck applying the transition there.
Video, images, text and other content can be transformed, so transitions
will work.
Sorry :-(
Laurent
>
> I played with the basic fade transition demonstrated here:
> http://msdn2.microsoft.com/en-us/library/ms752312.aspx#otherWaysToAnimateSection
> which fades a rectangle object in and out, but I was unable to figure out how
> to apply it to web content shown in my grid. Here is what I converted the
> code to in my feeble attempt:
>
> <Grid Name="myGrid" Loaded="myLoaded">
> <Frame Source="http://www.google.com/" />
> <Grid.Triggers>
> <EventTrigger RoutedEvent="Grid.Loaded">
> <BeginStoryboard Name="myStoryBoard">
> <Storyboard>
> <DoubleAnimation
> Storyboard.TargetName="myGrid"
> Storyboard.TargetProperty="Opacity"
> From="1.0" To="0.0" Duration="0:0:5"
> AutoReverse="True" RepeatBehavior="Forever" />
> </Storyboard>
> </BeginStoryboard>
> </EventTrigger>
> </Grid.Triggers>
> </Grid>
>
> Could anyone help me get a better handle on what my limitations are here? Do
> I need to load video and web content in a different type of object?
>
> Thanks,
>
> Glenn
>
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
date: Thu, 18 Oct 2007 06:30:46 -0700
author: Laurent Bugnion, MVP
Re: What items can I apply transitions to?
Not that answer I was hoping for :(. But thanks so much for the response.
Glenn
"Laurent Bugnion, MVP" wrote:
> Hi Glenn,
>
> Glenn wrote:
> > Hello,
> >
> > I'm just starting to transition from WinForms to WPF and have a few
> > questions. What items can I apply transitions to? The application I need to
> > build requires many different media types transitioning in and out of the
> > maid WPF screen - Video, Web Content, RSS Feed, static images, text, etc.
>
> You can apply transitions (and generally any kind of transforms) to
> DirectX content. Unfortunately, you cannot apply this to any content
> drawn to GDI. And as you had to find out the hard way, the Frame element
> is using Internet Explorer to display web pages, and guess what, IE
> draws against GDI... so no luck applying the transition there.
>
> Video, images, text and other content can be transformed, so transitions
> will work.
>
> Sorry :-(
> Laurent
>
> >
> > I played with the basic fade transition demonstrated here:
> > http://msdn2.microsoft.com/en-us/library/ms752312.aspx#otherWaysToAnimateSection
> > which fades a rectangle object in and out, but I was unable to figure out how
> > to apply it to web content shown in my grid. Here is what I converted the
> > code to in my feeble attempt:
> >
> > <Grid Name="myGrid" Loaded="myLoaded">
> > <Frame Source="http://www.google.com/" />
> > <Grid.Triggers>
> > <EventTrigger RoutedEvent="Grid.Loaded">
> > <BeginStoryboard Name="myStoryBoard">
> > <Storyboard>
> > <DoubleAnimation
> > Storyboard.TargetName="myGrid"
> > Storyboard.TargetProperty="Opacity"
> > From="1.0" To="0.0" Duration="0:0:5"
> > AutoReverse="True" RepeatBehavior="Forever" />
> > </Storyboard>
> > </BeginStoryboard>
> > </EventTrigger>
> > </Grid.Triggers>
> > </Grid>
> >
> > Could anyone help me get a better handle on what my limitations are here? Do
> > I need to load video and web content in a different type of object?
> >
> > Thanks,
> >
> > Glenn
> >
>
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog: http://www.galasoft.ch
> PhotoAlbum: http://www.galasoft.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch
>
date: Thu, 18 Oct 2007 08:07:02 -0700
author: Glenn
|
|