xamlparserexception was thrown on shinyredTheme silverlight-4 (vs2010)

Last Reply on May 22, 2012 11:47 PM By Mudassar

Posted on May 21, 2012 04:52 AM

Hi,

 I am new to silverlight( working in silverlight 4.0) and getting Xaml exception  .

   xamlparserexception was thrown on shinyredTheme: cannot create an instance of "ShinyRedTheme" . (Error Details are as :)

  Invalid attribute value SearchMode for property Property. [Line: 3291 Position: 26]
   at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse)
   at System.Windows.Controls.Theming.ResourceParser.Parse(Stream stream, Boolean checkTypes)
   at System.Windows.Controls.Theming.Theme.LoadTheme(Stream themeResourceStream)
   at System.Windows.Controls.Theming.Theme..ctor(Assembly themeAssembly, String themeResourceName)
   at System.Windows.Controls.Theming.ShinyRedTheme..ctor()

 

  

  My Xaml is:-

              <controls:ChildWindow x:Class="BulkEmail.Bulk_Email.NewUserWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:shinyRed="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ShinyRed"                     
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="400" Height="300"
           Title="New User">
    <Grid x:Name="LayoutRoot" ShowGridLines="True">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Border Grid.Column="0" Grid.Row="0" x:Name="bdrNewUser">
            <shinyRed:ShinyRedTheme>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="3.5*"/>
                        <ColumnDefinition Width="6.5*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="2.5*"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="10"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="3*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="30"/>
                    </Grid.RowDefinitions>
                    <StackPanel x:Name="HeaderStackPanel" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <TextBlock x:Name="HeaderText" Text="Please Enter Details" FontSize="15" Margin="2,2,2,2"/>
                    </StackPanel>
                    <TextBlock x:Name="tbEmailID" Text="Email ID :" Grid.Row="1" Grid.Column="0" Margin="30,6,2,2"></TextBlock>
                    <TextBlock x:Name="tbMobileNumber" Text="Mobile Number :" Grid.Row="3" Grid.Column="0" Margin="30,6,2,2"></TextBlock>
                    <TextBox x:Name="txtEmailID" Grid.Row="1" MaxLength="30" Grid.Column="1" Width="200" HorizontalAlignment="Left" Height="25" Margin="2,2,2,2"></TextBox>
                    <TextBox x:Name="txtMobileNumber" Grid.Row="3" MaxLength="10" Grid.Column="1" Width="200" HorizontalAlignment="Left" Height="25" Margin="2,2,2,2"></TextBox>
                    <StackPanel Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Orientation="Horizontal">
                        <Button x:Name="btnSubmit" Cursor="Hand" Content="Submit" Height="25" Margin="2,2,2,2" Width="80" Click="btnSubmit_Click"/>
                        <Button x:Name="btnCancel" Cursor="Hand" Content="Cancel" Height="25" Margin="2,2,2,2" Width="80" Click="btnCancel_Click"/>
                    </StackPanel>
                    <HyperlinkButton Content="Enter Verification Code." Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Height="23" FontSize="12"  Margin="2,2,2,2" Name="hprlnkVerification" HorizontalAlignment="Center" Click="hprlnkVerification_Click"/>
                    <TextBlock x:Name="tbWait" Text="Please Wait..." Grid.Row="6" FontSize="14" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Visibility="Collapsed"/>
                </Grid>
            </shinyRed:ShinyRedTheme>
        </Border>

        <Border Grid.Column="0" Grid.Row="0" x:Name="bdrVerification" Visibility="Collapsed">
            <shinyRed:ShinyRedTheme>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="3.5*"/>
                        <ColumnDefinition Width="6.5*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1.5*"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="10"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="10"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1.5*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <StackPanel x:Name="HeaderStackPanelV" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <TextBlock x:Name="HeaderTextV" Text="Please Enter Verification Details" FontSize="15" Margin="2,2,2,2"/>
                    </StackPanel>
                    <TextBlock x:Name="tbEmailIDV" Text="EmailID :" Grid.Row="1" Grid.Column="0" Margin="30,6,2,2"></TextBlock>
                    <TextBlock x:Name="tbMobileNumberV" Text="Mobile Number :" Grid.Row="3" Grid.Column="0" Margin="30,6,2,2"></TextBlock>
                    <TextBlock x:Name="tbVeriCode" Text="Verification Code :" Grid.Row="5" Grid.Column="0" Margin="30,6,2,2"></TextBlock>
                    <TextBox x:Name="txtEmailIDV" Grid.Row="1" MaxLength="30" Grid.Column="1" Width="200" HorizontalAlignment="Left" Height="25" Margin="2,2,2,2"></TextBox>
                    <TextBox x:Name="txtMobileNumberV" Grid.Row="3" MaxLength="10" Grid.Column="1" Width="200" HorizontalAlignment="Left" Height="25" Margin="2,2,2,2"></TextBox>
                    <TextBox x:Name="txtVeriCode" Grid.Row="5" MaxLength="10" Grid.Column="1" Width="200" HorizontalAlignment="Left" Height="25" Margin="2,2,2,2"></TextBox>
                    <StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Orientation="Horizontal">
                        <Button x:Name="btnSubmitV" Cursor="Hand" Content="Submit" Height="25" Margin="2,2,2,2" Width="80" Click="btnSubmitV_Click"/>
                        <Button x:Name="btnCancelV" Cursor="Hand" Content="Cancel" Height="25" Margin="2,2,2,2" Width="80" Click="btnCancelV_Click"/>
                    </StackPanel>
                    <HyperlinkButton Content="New User" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2" Height="23" FontSize="12"  Margin="2,2,2,2" Name="hprlnkNewUser" HorizontalAlignment="Center" Click="hprlnkNewUser_Click"/>
                </Grid>
            </shinyRed:ShinyRedTheme>
        </Border>
    </Grid>
   
   
</controls:ChildWindow>

 

Thanks.

Posted on May 21, 2012 11:25 PM

Check here on installing themes

http://www.byteblocks.com/category/Silverlight.aspx


Posted on May 22, 2012 11:18 PM

Hi,

   Added the toolkit but the issue remains the same.

  Thanks.

 


Posted on May 22, 2012 11:47 PM

Check

http://geekswithblogs.net/lbugnion/archive/2007/03/14/108728.aspx

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html