![]() |
|
|
#1 |
|
Guest
Posts: n/a
|
Project compiles but will not run
When I try to run a small test app in Blend 2 created by following the
directions in the User Guide titled "Try it: Playing with handoff and nonhandoff animations" I get an error saying "WpfBas.exe has encountered a problem and needs to close. We are sorry for the inconvenience." The error signature says "EventType : clr20r3 P1 : wpfbas.exe P2 : 0.0.0.0 P3 : 484595e1 P4 : presentationframework P5 : 3.0.0.0 P6 : 470bc696 P7 : 660b P8 : e1 P9 : system.windows.markup.xamlparse" Does this make any sense to anyone? This is my first attempt to use WPF and Blend, so my confidence isn't real high at this point. ![]() Thanks, Ian |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: Project compiles but will not run
Probably you have an error that shuts down the process, run the same project
using VS2008 to discover it. -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://blogs.ugidotnet.org/corrado/ |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: Project compiles but will not run
Good catch. Thanks for teaching me an important Blend debugging technique...
Now, I don't really know what to do with this new found knowledge. Apparently, the problem is in the fact that I put a gradient background on my form. Looks fine in the designer, but not at runtime. Error is... "'GradientStop' object cannot be added to 'LinearGradientBrush'. Handler has not been registered with this event. Parameter name: handler Error at object 'System.Windows.Media.GradientStop' in markup file 'WpfBas;component/window1.xaml' Line 35 Position 62." Here's the XAML... <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="WpfBas.Window1" x:Name="Window" Title="Window1" Width="640" Height="480" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Window.Resources> <Color x:Key="Spheris Light Blue">#FF4E78B4</Color> <Storyboard x:Key="Double"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransf orm).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" RepeatBehavior="Forever"> <SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.018"/> </DoubleAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="Quadruple"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransf orm).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" RepeatBehavior="Forever"> <SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.768"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> <Window.Triggers> <EventTrigger RoutedEvent="FrameworkElement.Loaded"> <BeginStoryboard Storyboard="{StaticResource Double}"/> </EventTrigger> <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="ellipse"> <BeginStoryboard Storyboard="{StaticResource Quadruple}" x:Name="Quadruple_BeginStoryboard"/> </EventTrigger> <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="ellipse"> <BeginStoryboard Storyboard="{StaticResource Double}"/> </EventTrigger> </Window.Triggers> <Window.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="{DynamicResource Spheris Dark Blue}" Offset="0.094"/> <GradientStop Color="{DynamicResource Spheris Light Blue}" Offset="1"/> </LinearGradientBrush> </Window.Background> <Grid x:Name="LayoutRoot"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Ellipse Margin="195,0,0,42" VerticalAlignment="Bottom" Height="108" Stroke="#FF000000" Width="112" HorizontalAlignment="Left" RenderTransformOrigin="0.5,0.5" x:Name="ellipse" Opacity="0.75"> <Ellipse.Fill> <SolidColorBrush Color="{DynamicResource Spheris Orange}"/> </Ellipse.Fill> <Ellipse.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="0"/> <TranslateTransform X="0" Y="0"/> </TransformGroup> </Ellipse.RenderTransform> </Ellipse> </Grid> </Window> Thanks! Ian "Corrado Cavalli [MVP]" wrote: > Probably you have an error that shuts down the process, run the same project > using VS2008 to discover it. > > -- > Corrado Cavalli [Microsoft .NET MVP-MCP] > UGIdotNET - http://www.ugidotnet.org > Weblog: http://blogs.ugidotnet.org/corrado/ > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Re: Project compiles but will not run
Its a bug
http://forums.msdn.microsoft.com/en-...a-56e9ad268f39 -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://blogs.ugidotnet.org/corrado/ |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|