Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Hosting a XAML page within a Winform.

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 02-04-2006   #1 (permalink)
Jason
Guest


 

Hosting a XAML page within a Winform.

Afternoon,

I have just successfully coded a XAML page that is hosted within a winform.
This is a proof of concept program that i am working on. I'm forced, by the
archetecture of the main application, to have a piece of XAML hosted and
compiled within a UserControl (both of which are .NET Framework 2.0) and
that last user control is being placed on a WinForm run from the 1.1
Framework. It actually works well and responds to events. However, the
application 'chokes' when I try any kind of an animation.

Can anyone point me in the right direction to figure out why this is
happening? or anyone have any bright ideas?




My System SpecsSystem Spec
Old 02-04-2006   #2 (permalink)
Nick Kramer [MSFT]
Guest


 

Re: Hosting a XAML page within a Winform.

What does "chokes" mean? Choppy animation? That's a limitation of WinForms
(and anything else hwnd-based) -- WPF is good animating WPF, but WinForms
just isn't capable of drawing fast enough for good animation.

--
-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


"Jason" <Jason.Ipock@eclipsys.com> wrote in message
news:OR4lvQDKGHA.2088@TK2MSFTNGP11.phx.gbl...
> Afternoon,
>
> I have just successfully coded a XAML page that is hosted within a
> winform. This is a proof of concept program that i am working on. I'm
> forced, by the archetecture of the main application, to have a piece of
> XAML hosted and compiled within a UserControl (both of which are .NET
> Framework 2.0) and that last user control is being placed on a WinForm run
> from the 1.1 Framework. It actually works well and responds to events.
> However, the application 'chokes' when I try any kind of an animation.
>
> Can anyone point me in the right direction to figure out why this is
> happening? or anyone have any bright ideas?
>
>
>



My System SpecsSystem Spec
Old 02-04-2006   #3 (permalink)
Jason
Guest


 

Re: Hosting a XAML page within a Winform.

Don't you know what "choke" means?!

Seriously, sorry about that. I hate it when clients tell me stuff like that
and I need clarification too.

For proof-of-concept, I am using the "Animate an Element's Size" sample from
the SDK. It loads fine. but when I trigger the animation, the following
error appears>

System.InvalidOperationException: The name 'myWidthAnimatedButton' could not
be resolved in the name scope of 'System.Windows.Controls.Button'.

Similar errors (XYZ can not be resolved in scope of ...) occur. This XAML
works perfectly in XAMLPad. The XAML "builds" when compiling the DLL. It
initially shows correctly as well. It's only when the animation starts does
this stuff happen.

Any ideas?



"Nick Kramer [MSFT]" <nkramer@ms.spam> wrote in message
news:Om9K1XDKGHA.3728@tk2msftngp13.phx.gbl...
> What does "chokes" mean? Choppy animation? That's a limitation of
> WinForms (and anything else hwnd-based) -- WPF is good animating WPF, but
> WinForms just isn't capable of drawing fast enough for good animation.
>
> --
> -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
>
>
> "Jason" <Jason.Ipock@eclipsys.com> wrote in message
> news:OR4lvQDKGHA.2088@TK2MSFTNGP11.phx.gbl...
>> Afternoon,
>>
>> I have just successfully coded a XAML page that is hosted within a
>> winform. This is a proof of concept program that i am working on. I'm
>> forced, by the archetecture of the main application, to have a piece of
>> XAML hosted and compiled within a UserControl (both of which are .NET
>> Framework 2.0) and that last user control is being placed on a WinForm
>> run from the 1.1 Framework. It actually works well and responds to
>> events. However, the application 'chokes' when I try any kind of an
>> animation.
>>
>> Can anyone point me in the right direction to figure out why this is
>> happening? or anyone have any bright ideas?
>>
>>
>>

>
>



My System SpecsSystem Spec
Old 02-04-2006   #4 (permalink)
Nick Kramer [MSFT]
Guest


 

Re: Hosting a XAML page within a Winform.

The name lookup doesn't happen until the animation starts. Could you show
me the xaml you're using? Thanks.

-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


"Jason" <Jason.Ipock@eclipsys.com> wrote in message
news:OCqlgvDKGHA.1288@TK2MSFTNGP09.phx.gbl...
> Don't you know what "choke" means?!
>
> Seriously, sorry about that. I hate it when clients tell me stuff like
> that and I need clarification too.
>
> For proof-of-concept, I am using the "Animate an Element's Size" sample
> from the SDK. It loads fine. but when I trigger the animation, the
> following error appears>
>
> System.InvalidOperationException: The name 'myWidthAnimatedButton' could
> not be resolved in the name scope of 'System.Windows.Controls.Button'.
>
> Similar errors (XYZ can not be resolved in scope of ...) occur. This XAML
> works perfectly in XAMLPad. The XAML "builds" when compiling the DLL. It
> initially shows correctly as well. It's only when the animation starts
> does this stuff happen.
>
> Any ideas?
>
>
>
> "Nick Kramer [MSFT]" <nkramer@ms.spam> wrote in message
> news:Om9K1XDKGHA.3728@tk2msftngp13.phx.gbl...
>> What does "chokes" mean? Choppy animation? That's a limitation of
>> WinForms (and anything else hwnd-based) -- WPF is good animating WPF, but
>> WinForms just isn't capable of drawing fast enough for good animation.
>>
>> --
>> -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
>>
>>
>> "Jason" <Jason.Ipock@eclipsys.com> wrote in message
>> news:OR4lvQDKGHA.2088@TK2MSFTNGP11.phx.gbl...
>>> Afternoon,
>>>
>>> I have just successfully coded a XAML page that is hosted within a
>>> winform. This is a proof of concept program that i am working on. I'm
>>> forced, by the archetecture of the main application, to have a piece of
>>> XAML hosted and compiled within a UserControl (both of which are .NET
>>> Framework 2.0) and that last user control is being placed on a WinForm
>>> run from the 1.1 Framework. It actually works well and responds to
>>> events. However, the application 'chokes' when I try any kind of an
>>> animation.
>>>
>>> Can anyone point me in the right direction to figure out why this is
>>> happening? or anyone have any bright ideas?
>>>
>>>
>>>

>>
>>

>
>



My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
hosting WPF control like ActiveX at web page Avalon 6 12-03-2006 01:50 AM
How to pass object to XAML page Lorenzo Soncini Avalon 0 10-23-2006 12:05 PM
Run-time parsed xaml page and navigation Rhinpoche@star-sw.com Avalon 0 05-16-2006 02:00 AM
Re: Hosting a XAML page within a Winform. Jason Avalon 2 02-08-2006 11:32 AM
Hosting a XAML page within a Winform. Jason Avalon 0 02-08-2006 11:32 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51