This is a migrated thread and some comments may be shown as answers.

Getting Xaml parse exception (AG_E_UNKNOWN_ERROR [Line: 97 Position: 84]) after upgrading

3 Answers 156 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Hector
Top achievements
Rank 1
Hector asked on 20 Jan 2010, 10:09 PM
I upgraded to the latest release of Telerik Rad Controls for Silverlight and I am now getting this error.  Line 97 right in the middle of a MenuItem .  It seems that the Telerik.Windows.Controls.Navigation namespace is causing the error because I was getting a similiar error with the RadWindow and they both are in the same namespace.  Is there something wrong with my XML code?

<UserControl   
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"   
    xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"    
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"    
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"    
    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"    
    xmlns:telerikGV="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"   
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d"      
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"  x:Class="SmartWebReports.Page" 
    > 
 
    <Grid > 
 
        <!--<telerikNavigation:RadWindow Top="110" Left="230" Width="600" Height="480" x:Name="RadWindow1" Header="Report Viewer" > 
            <telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1" HorizontalAlignment="Left" /> 
        </telerikNavigation:RadWindow>--> 
        <Border x:Name="LayoutRoot" CornerRadius="5" BorderBrush="#FF14558C" BorderThickness="5"    
                HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
 
            <Border.Background> 
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                    <GradientStop Color="#FF7EADD6"/>  
                    <GradientStop Color="#FF153F5C" Offset="1"/>  
                </LinearGradientBrush> 
            </Border.Background> 
            <Grid x:Name="ContentDivider" Margin="10" HorizontalAlignment="Left" > 
                <Grid.ColumnDefinitions> 
                    <ColumnDefinition Width="Auto" MaxWidth="400" /> 
                    <ColumnDefinition Width="5" /> 
                    <ColumnDefinition Width="*" /> 
                </Grid.ColumnDefinitions> 
                <basics:GridSplitter x:Name="grsplSplitter" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Center" Background="#FFBFD6D6" Width="5"></basics:GridSplitter> 
                <Border Style="{StaticResource BorderStyle}" Grid.Column="0">  
                    <Grid x:Name="topStack"  Margin="5" HorizontalAlignment="Left" > 
                        <Grid.RowDefinitions > 
                            <RowDefinition Height="Auto" /> 
                            <RowDefinition Height="Auto" MaxHeight="240" MinHeight="20" /> 
                            <RowDefinition Height="2*" /> 
                        </Grid.RowDefinitions> 
                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="*" /> 
                        </Grid.ColumnDefinitions> 
                        <!-- Button bar --> 
                        <Grid Grid.Row="0" HorizontalAlignment="Left" > 
                            <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">  
                                <Button Visibility="Visible" Margin="1" ToolTipService.ToolTip="View Report" Click="btnRunReport_Click"  x:Name="ViewReport" d:LayoutOverrides="Width, HorizontalMargin" VerticalAlignment="Center" IsEnabled="False" HorizontalAlignment="Center" > 
                                    <Border BorderThickness="2" BorderBrush="White" Height="50" Width="40" HorizontalAlignment="Center" VerticalAlignment="Center" > 
                                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">  
                                            <Image Source="images/report_ico.png" Height="21" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
 
                                            <TextBlock Text="Run" FontWeight="Bold" FontSize="9" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" /> 
                                        </StackPanel> 
                                    </Border> 
                                </Button> 
 
                                <Button Visibility="Visible" Margin="2" ToolTipService.ToolTip="Print" Click="btnRunReport_Click"  x:Name="PrintExport" d:LayoutOverrides="Width, HorizontalMargin" VerticalAlignment="Center" IsEnabled="False" HorizontalAlignment="Center" > 
                                    <Border Width="40" BorderThickness="2" BorderBrush="White" Height="50" > 
                                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">  
                                            <Image Source="images/print_ico.png" Height="21"  /> 
                                            <TextBlock Text="Print" FontWeight="Bold" FontSize="9" /> 
                                        </StackPanel> 
                                    </Border> 
                                </Button> 
 
                                <Button Visibility="Visible" Margin="2" ToolTipService.ToolTip="Save report" Click="btnRunReport_Click"  x:Name="SaveReport" d:LayoutOverrides="Width, HorizontalMargin" VerticalAlignment="Center" IsEnabled="False" HorizontalAlignment="Center" > 
                                    <Border Width="40" BorderThickness="2" BorderBrush="White" Height="50" > 
                                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">  
                                            <Image Source="images/save_ico.png" Height="21"  /> 
                                            <TextBlock Text="Save" FontWeight="Bold" FontSize="9" TextAlignment="Center" TextWrapping="Wrap" /> 
                                        </StackPanel> 
                                    </Border> 
                                </Button> 
 
                                <Button Margin="2" d:LayoutOverrides="Width, HorizontalMargin" VerticalAlignment="Center" ToolTipService.ToolTip="Export reprot" HorizontalAlignment="Center">  
 
                                    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Height="Auto" > 
 
                                        <telerikNavigation:RadMenu VerticalAlignment="Center" HorizontalAlignment="Center"  ClickToOpen="False" 
                            ItemClick="OnRadMenuItemClick"  x:Name="ReportToolBar" IsEnabled="False" Width="40" BorderBrush="{x:Null}" Background="{x:Null}">  
                                            <telerikNavigation:RadMenuItem  FontWeight="Bold" FontSize="9" Height="50">  
                                                <telerikNavigation:RadMenuItem.Icon> 
                                                    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">  
                                                        <Image Source="images/export_ico.png" Height="21"  /> 
                                                        <TextBlock Text="Export" FontWeight="Bold" FontSize="9" /> 
                                                    </StackPanel> 
                                                </telerikNavigation:RadMenuItem.Icon> 
 
                                                <telerikNavigation:RadMenuItem Header="File">  
                                                    <telerikNavigation:RadMenuItem Header="New Tab">  
                                                        <telerikNavigation:RadMenuItem.Icon> 
                                                            <Image Source="/Menu/Common/Images/11new.png" /> 
                                                        </telerikNavigation:RadMenuItem.Icon> 
                                                    </telerikNavigation:RadMenuItem> 
                                                </telerikNavigation:RadMenuItem> 
                                                <telerikNavigation:RadMenuItem Header="Export as PDF" x:Name="ExportPDF">  
                                                    <telerikNavigation:RadMenuItem.Icon> 
                                                        <Image Source="../Images/pdf_ico.png" /> 
                                                    </telerikNavigation:RadMenuItem.Icon> 
                                                </telerikNavigation:RadMenuItem> 
 
                                                <telerikNavigation:RadMenuItem Header="Excel Formated" x:Name="ExportExcel">  
                                                    <telerikNavigation:RadMenuItem.Icon> 
                                                        <Image Source="../Images/excel_ico.png" /> 
                                                    </telerikNavigation:RadMenuItem.Icon> 
                                                </telerikNavigation:RadMenuItem> 
                                                <telerikNavigation:RadMenuItem Header="Excel Data Only" x:Name="ExportExcelData">  
                                                    <telerikNavigation:RadMenuItem.Icon> 
                                                        <Image Source="../Images/excel_ico.png" /> 
                                                    </telerikNavigation:RadMenuItem.Icon> 
                                                </telerikNavigation:RadMenuItem> 
                                                <telerikNavigation:RadMenuItem Header="MS Word" x:Name="ExportWord" > 
                                                    <telerikNavigation:RadMenuItem.Icon> 
                                                        <Image Source="../Images/word_ico.png" /> 
                                                    </telerikNavigation:RadMenuItem.Icon> 
                                                </telerikNavigation:RadMenuItem> 
                                                <telerikNavigation:RadMenuItem Header="RTF" x:Name="ExportRTF">  
                                                    <telerikNavigation:RadMenuItem.Icon> 
                                                        <Image Source="../Images/rtf_ico.png" /> 
                                                    </telerikNavigation:RadMenuItem.Icon> 
                                                </telerikNavigation:RadMenuItem> 
 
                                            </telerikNavigation:RadMenuItem> 
 
                                        </telerikNavigation:RadMenu> 
                                    </StackPanel> 
                                </Button> 
 
                            </StackPanel> 
                        </Grid> 
                        <!-- Saved reports list--> 
                        <telerik:RadExpander  Grid.Row="1" x:Name="SaveReportExpander"  MaxHeight="300" 
                                              IsExpanded="False"   
                                              Style="{StaticResource radExpanderStyle}"   
                                              Visibility="Collapsed" Margin="1" HorizontalAlignment="Left">  
                            <telerik:RadExpander.Header> 
                                <TextBlock Foreground="#FFF8F2F2" Text="Saved Reports" FontWeight="Bold"/>  
                            </telerik:RadExpander.Header> 
                            <Grid x:Name="SavedReportSelectStack"  Visibility="Visible" Margin="2" HorizontalAlignment="Left" > 
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="*" /> 
                                </Grid.ColumnDefinitions> 
                                <ListBox  x:Name="lstSelectSavedReport"   
                                    ItemContainerStyle="{StaticResource ListBoxItemStyle1}"   
                                          Background="{x:Null}">  
                                    <ListBox.ItemTemplate> 
                                        <DataTemplate> 
                                            <Grid Margin="0,2" > 
                                                <Grid.RowDefinitions> 
                                                    <RowDefinition /> 
                                                    <RowDefinition /> 
                                                </Grid.RowDefinitions> 
                                                <Grid.ColumnDefinitions> 
                                                    <ColumnDefinition Width="*" /> 
                                                    <ColumnDefinition /> 
                                                </Grid.ColumnDefinitions> 
                                                    <TextBlock Grid.Row="0" Grid.Column="0" FontWeight="Bold" Text="{Binding SavedReportName}" TextWrapping="Wrap" MaxWidth="300" 
                                                               FontFamily="Arial Rounded MT Bold" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="#FF1A1919" FontSize="12"/>  
                                                    <Image Grid.Row="0" Grid.Column="1" Margin="12,0,0,0" HorizontalAlignment="Center" Source="../images/delete_ico.png" MouseLeftButtonUp="Image_MouseLeftButtonUp" /> 
                                                <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2" MaxWidth="300" > 
                                                    <TextBlock  Text="Description:" HorizontalAlignment="Left" FontFamily="Fonts/Fonts.zip#Arial" Foreground="#FF5B554A" VerticalAlignment="Center" /> 
                                                    <TextBlock  Foreground="Blue" Margin="5,0,0,0" HorizontalAlignment="Left" 
                                                    Text="{Binding Description}" FontFamily="Fonts/Fonts.zip#Arial" VerticalAlignment="Center" LineHeight="8" FontStyle="Italic" /> 
                                                </StackPanel> 
 
                                            </Grid> 
                                        </DataTemplate> 
                                    </ListBox.ItemTemplate> 
                                </ListBox> 
                            </Grid> 
                        </telerik:RadExpander> 
                        <!-- Report List --> 
                        <Grid  Grid.Row="2" HorizontalAlignment="Left">  
                            <Grid.RowDefinitions> 
                                <RowDefinition Height="24"/>  
                                <RowDefinition Height="*"/>  
                            </Grid.RowDefinitions> 
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition Width="*" /> 
                            </Grid.ColumnDefinitions> 
                            <TextBlock x:Name="myFNtext" Text="Select Report from list" 
                            FontSize="11" FontWeight="Bold" Foreground="#FFFFFFFF" Margin="0,0,0,3" /> 
                            <ListBox Grid.Row="1" x:Name="lstSelectReport"   
                                 ItemTemplate="{StaticResource ListSelectReport}" 
                                 SelectionChanged="lstSelectReport_SelectionChanged"   
                                     ItemContainerStyle="{StaticResource ListBoxItemStyle1}"   
                                     Background="{x:Null}" /> 
                        </Grid> 
                        <!--<StackPanel x:Name="ReportSelectStack" Visibility="Visible" Margin="5,5,5,5" Height="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">  
                            <TextBlock x:Name="myFNtext" Text="Select Report from list" 
                            FontSize="11" FontWeight="Bold" Foreground="#FFFFFFFF" Margin="0,0,0,3" /> 
                            <ListBox x:Name="lstSelectReport" Height="Auto" 
                                 ItemTemplate="{StaticResource ListSelectReport}" 
                                 SelectionChanged="lstSelectReport_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" /> 
                        </StackPanel>--> 
 
                    </Grid> 
                </Border> 
                <!-- Right Side Items --> 
                <Grid Grid.Column="2" VerticalAlignment="Top" x:Name="RightPanelGrid" ShowGridLines="False">  
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="Auto" /> 
                        <RowDefinition Height="1*"   /> 
                    </Grid.RowDefinitions> 
                    <Grid.ColumnDefinitions > 
                        <ColumnDefinition/> 
                    </Grid.ColumnDefinitions> 
 
 
                    <ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"   
                          Foreground="{x:Null}" BorderBrush="{x:Null}"  BorderThickness="0">  
                        <Border x:Name="TopRightContent" Style="{StaticResource BorderStyle}" Visibility="Collapsed" HorizontalAlignment="Stretch">  
                            <StackPanel x:Name="TopContentStack" Orientation="Horizontal" HorizontalAlignment="Stretch" /> 
                        </Border> 
                    </ScrollViewer> 
                    <!-- MultiSelect Content Holder --> 
 
                    <ScrollViewer Grid.Row="1" Grid.Column="0" HorizontalScrollBarVisibility="Auto"  VerticalScrollBarVisibility="Auto" x:Name="BottomScroll" 
                          Foreground="{x:Null}" BorderBrush="{x:Null}" telerik:StyleManager.Theme="Office_Blue"  BorderThickness="0" > 
 
                        <StackPanel VerticalAlignment="Top" x:Name="BottomContentStack"   
                            Margin="5,5,5,5" Orientation="Horizontal" /> 
 
 
 
                    </ScrollViewer> 
 
                </Grid> 
                <!--</StackPanel>--> 
            </Grid> 
        </Border> 
    </Grid> 
</UserControl> 
 

3 Answers, 1 is accepted

Sort by
0
Hector
Top achievements
Rank 1
answered on 21 Jan 2010, 02:24 PM
I figured it out.  In an effort to thin out the XAP file because it was currently at 4.2MB, and it was taking a while to download whne initializing, I was removing unused references.  One of the dlls I removed was Telerik.Windows.Themes.Office_Silver.dll and this is what was causing the error.  As soon as I added it back on, it was working fine.

Are there other things I can do to make the XAP smaller?
0
Boyan
Telerik team
answered on 22 Jan 2010, 10:19 AM
Hello Hector,

There are several ways to reduce the XAP size. Here are some of them:
1. Don't include images in the XAP, download them at runtime
2. Don't reference any dlls that you don't specifically need
3. Use application library caching. More info you can find here:

Hope this is helpful. If you have more questions please let me know.

Regards,
Boyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Hector
Top achievements
Rank 1
answered on 22 Jan 2010, 02:23 PM
Thank you.  I dropped it down about 30%!
Tags
Calendar
Asked by
Hector
Top achievements
Rank 1
Answers by
Hector
Top achievements
Rank 1
Boyan
Telerik team
Share this question
or