Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Hosting a XAML page within a Winform.

 
 
Old 02-04-2006   #1 (permalink)
Jason


 
 

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]


 
 

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


 
 

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]


 
 

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
 

Thread Tools



Vista Forums 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 Ltd

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