Posted 17 years ago
by chris caldwell
I get the following exception when viewing the WPF sample windows in the VS2008 designer pane:
startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at MS.Internal.Host.PersistenceSubsystem.ExtractSourceFileInfo(Uri uri)
at MS.Internal.Host.PersistenceSubsystem.FormatInnerXamlParseException(Exception ex)
at MS.Internal.Host.PersistenceSubsystem.ReportException(Exception ex, TextModel model, Int64 sourceVersion)
at MS.Internal.Host.PersistenceSubsystem.Load()
at MS.Internal.Host.Designer.Load()
at MS.Internal.Designer.VSDesigner.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
Here's the XAML:Any help would be appreciated. Thanks.
startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at MS.Internal.Host.PersistenceSubsystem.ExtractSourceFileInfo(Uri uri)
at MS.Internal.Host.PersistenceSubsystem.FormatInnerXamlParseException(Exception ex)
at MS.Internal.Host.PersistenceSubsystem.ReportException(Exception ex, TextModel model, Int64 sourceVersion)
at MS.Internal.Host.PersistenceSubsystem.Load()
at MS.Internal.Host.Designer.Load()
at MS.Internal.Designer.VSDesigner.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
Here's the XAML:
<Window
x:Class="EOG.UI.NavigationBarWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
xmlns:navigation="http://schemas.actiprosoftware.com/winfx/xaml/navigation"
Title="NavigationBarWindow1"
MinWidth="400" MinHeight="300" Height="450" Width="800">
<Border Background="{DynamicResource {x:Static themes:NavigationBarCommonDictionary.WindowBackgroundBrushKey}}">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<navigation:NavigationBar x:Name="navBar" Grid.Column="0"></navigation:NavigationBar>
<GridSplitter Grid.Column="1" ResizeDirection="Columns" ResizeBehavior="PreviousAndCurrent" Background="Transparent" Width="5" />
<Border
Grid.Column="2"
BorderThickness="1"
BorderBrush="{DynamicResource {x:Static themes:NavigationBarCommonDictionary.BorderBrushKey}}"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Padding="7"
>
<!-- Other content here -->
</Border>
<GridSplitter Grid.Column="3" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext" Background="Transparent" Width="5" />
<navigation:ExplorerBar x:Name="expBar" Grid.Column="4"></navigation:ExplorerBar>
</Grid>
</Border>
</Window>