System is hanging - When I run the silverlight project created for control theming from quickstart
Last post 05-11-2008 2:19 AM by isnraju. 2 replies.
Sort Posts:
04-14-2008 7:14 AM
System is hanging - When I run the silverlight project created for control theming from quickstart

When I browse the application from IIS my system is getting hanged. Build is successful without any errors. I had to kill the IE session from task manager and even task manager came after 3 mins. following is the xaml code. Let me know if you want me to attach the project zip file.

 

<UserControl x:Class="SilverlightApplication3.Page"

xmlns="http://schemas.microsoft.com/client/2007"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

>

<StackPanel>

<StackPanel.Resources>

<Style TargetType="Button" x:Key="buttonStyle">

<Setter Property="Background" Value="Green"/>

<Setter Property="Foreground" Value="Navy"/>

<Setter Property="FontSize" Value="14"/>

<Setter Property="Width" Value="100"/>

<Setter Property="Height" Value="40"/>

<Setter Property="Margin" Value="10"/>

<Setter Property="Template">

<Setter.Value>

<ControlTemplate>

<!--Add the Grid ELEMENT_Root here in the next step.-->

<Grid x:Name="ELEMENT_Root">

<Grid.Resources>

<!--Add the constant resources here.-->

<LinearGradientBrush x:Key="ReflectionGradient" StartPoint="0,1" EndPoint="0,0">

<LinearGradientBrush.GradientStops>

<GradientStop Color="#80FFFFFF" Offset="0" />

<GradientStop Color="#50FFFFFF" Offset="0.5" />

<GradientStop Color="#80FFFFFF" Offset="0.5" />

<GradientStop Color="#C0FFFFFF" Offset="1" />

</LinearGradientBrush.GradientStops>

</LinearGradientBrush>

<ScaleTransform x:Key="scale_1_1-3" ScaleX="1" ScaleY="1.4" />

<RadialGradientBrush x:Key="HighlightGradient">

<RadialGradientBrush.GradientStops>

<GradientStop Color="#FFFFFF" Offset="0" />

<GradientStop Color="#AAFFFFFF" Offset="0.3" />

<GradientStop Color="#55FFFFFF" Offset="0.6" />

<GradientStop Color="Transparent" Offset="1" />

</RadialGradientBrush.GradientStops>

</RadialGradientBrush>

<LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1">

<GradientStop Color="#B2FFFFFF" Offset="0" />

<GradientStop Color="#51FFFFFF" Offset="1" />

<GradientStop Color="#66FFFFFF" Offset="0.325" />

<GradientStop Color="#1EFFFFFF" Offset="0.325" />

</LinearGradientBrush>

<SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />

<SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />

<!--Add the Storyboard objects that specify states here.-->

</Grid.Resources>

<!--Add the elements that specify appearance here.

Keep the elements in the order that is specified

in the QuickStart.-->

<!--Main color of the button-->

<Rectangle x:Name="Base" RadiusY="2" RadiusX="2" Fill="{TemplateBinding Background}" />

<!--Reflection effect-->

<Rectangle x:Name="Reflection" RadiusY="2" RadiusX="2" Fill="{StaticResource ReflectionGradient}" />

<!--3D Effect-->

<Rectangle x:Name="BlurBorder" RadiusY="2" RadiusX="2" Stroke="#60000000" StrokeThickness="1.5" />

<Rectangle x:Name="ThinBorder" RadiusY="2" RadiusX="2" Stroke="#90000000" StrokeThickness="0.5" />

<!--Rectangles used as the FocusVisual-->

<Grid x:Name="FocusVisualElement" Visibility="Collapsed">

<Rectangle RadiusX="3" RadiusY="3" Margin="2" Stroke="{StaticResource AccentBrush}" StrokeThickness="1" />

<Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="2" />

</Grid>

<ContentPresenter

Content="{TemplateBinding Content}"

ContentTemplate="{TemplateBinding ContentTemplate}"

FontFamily="{TemplateBinding FontFamily}"

FontSize="{TemplateBinding FontSize}"

FontStretch="{TemplateBinding FontStretch}"

FontStyle="{TemplateBinding FontStyle}"

FontWeight="{TemplateBinding FontWeight}"

Foreground="{TemplateBinding Foreground}"

HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"

Padding="{TemplateBinding Padding}"

TextAlignment="{TemplateBinding TextAlignment}"

TextDecorations="{TemplateBinding TextDecorations}"

TextWrapping="{TemplateBinding TextWrapping}"

VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"

Margin="4,5,4,4" />

 

 

</Grid>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

</StackPanel.Resources>

<Button Content="Button 1" Style="{StaticResource buttonStyle}" />

<Button Content="Button 2" Style="{StaticResource buttonStyle}" />

<Button Content="Button 3" Style="{StaticResource buttonStyle}" />

</StackPanel>

</UserControl>

 

 

 

isnraju

Joined on 01-28-2008
Posts 4
04-14-2008 3:59 PM
Re: System is hanging - When I run the silverlight project created for control theming from quickstart
Can you post the project somewhere and we'll take a look?

thanks!

- Tom
Tom Taylor
Microsoft Silverlight
tomtaylormsft

Joined on 05-01-2007
Posts 64
05-11-2008 2:19 AM
Re: System is hanging - When I run the silverlight project created for control theming from quickstart

The Project zip file is available in following URL.

http://www.cogentsw.com/SilverlightApplication3.zip

 Regards,

ISN Raju

isnraju

Joined on 01-28-2008
Posts 4