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

RadTabItem XamlParseException

5 Answers 96 Views
Docking
This is a migrated thread and some comments may be shown as answers.
pextiger Lim
Top achievements
Rank 1
pextiger Lim asked on 01 Aug 2011, 01:18 PM
I'm getting a XamlParseException error when trying to run my project. Actually, sometimes the project will run and other times it won't. When I get the error it stops at InititalizeComponent() in the main page with the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
 
   at Telerik.Windows.Controls.RadTabItem.OnLeftTemplateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 
   at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
 
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
 
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
 
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty property)
 
   at MS.Internal.FrameworkCallbacks.InvalidateProperty(IntPtr nativeTarget, UInt32 propertyId) [Line: 0 Position: 0]

Same problem was posted at Oct. 2010 and answered but answer thread link is not exist now. Your answer link is http://www.telerik.com/community/forums/silverlight/dockpanel/exception-on-loading-page-related-to-radpane.aspx#1446782. but is not accessible.

It's very serious problem for me. please help us.
Thanks.

5 Answers, 1 is accepted

Sort by
0
bg
Top achievements
Rank 1
answered on 01 Aug 2011, 09:12 PM
Same major issue here loading a RadPane control.
"Unable to cast object of type 'System.Windows.Controls.ContentControl' to type 'Telerik.Windows.Controls.RadPane'."
0
Miroslav Nedyalkov
Telerik team
answered on 04 Aug 2011, 11:17 AM
Hi Everybody,

 We are not aware of none of these issues and we will need some more details about the applications in which these errors happen. If you could open support tickets and share with us sample projects that reproduce the problem this would be of great help.

Some common mistakes that could cause such problems are if you are placing:
- a Pane directly into the Docking control, DocumentHost or into a SplitContainer
- a PaneGroup directly into the Docking control or into the DocumentHost
- something that is not a Pane into the PaneGroup
- something that is not a PaneGroup or a SplitContainer into a SplitContainer
- somthing that is not a SplitContainer into the DockingControl or into the DocuemntHost

The fix for all of these situations is to wrap the content which is not part of the Docking control into Panes, the Panes into PaneGroups and the PaneGroups into SplitContainers and to place only SplitContainers into the Docking control and to the DocumentHost.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
bg
Top achievements
Rank 1
answered on 04 Aug 2011, 02:36 PM

Our issue was a result of us trying to override the context menu for the Rad Pane.

<radDock:RadPane.ContextMenuTemplate>
   <DataTemplate>
      <telerikNavigation:RadContextMenu>
        <telerikNavigation:RadMenuItem Header="Dockable" Command="radDock:RadDockingCommands.Dockable" />
        <telerikNavigation:RadMenuItem Header="Tabbed Document" Command="radDock:RadDockingCommands.TabbedDocument" />
      </telerikNavigation:RadContextMenu>
    </DataTemplate>
</radDock:RadPane.ContextMenuTemplate>

We just nulled out the Context menu instead and that fixed our problem.

ContextMenuTemplate="{x:Null}"

 

0
Pana
Telerik team
answered on 05 Aug 2011, 12:00 PM
Hello,

I am glad you have figured out how to workaround the problem.

Regards,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Gaurang
Top achievements
Rank 1
answered on 16 Sep 2011, 01:43 PM
Hi All,

I have problem that when I bind menu into GridView it shows and work perfectly.
But my problem is when I load the layout It gives me error like Error HRESULT E_FAIL and my layout does not restore as user SaveLayout.
If try to bind menu after Layout Load then It does not seen any menu and all things work well.

I have post my problem on (Menu, Docking)
 http://www.telerik.com/community/forums/silverlight/menu/load-layout-catastophy-error-when-bind-menu-into-gridview.aspx

I try to set ContextMenuTemplate = "{x:Null}"

<RadDock:RadDocking x:Name="DockingDashBoard" HasDocumentHost="False" AllowUnsafeMode="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<RadDock:RadSplitContainer Name="schedulerspliter" InitialPosition="DockedLeft" Orientation="Vertical">
<RadDock:RadPaneGroup MinHeight="200">
<RadDock:RadPane x:Name="PaneToDoList" RadDock:RadDocking.SerializationTag="PaneToDoList" ContextMenuTemplate="{x:Null}" CanUserClose="False" CanDockInDocumentHost="False" CanFloat="True" Header="To-Do List">
<Controls:GridView x:Name="gvToDoList" AutoGenerateColumns="True" AutoGeneratingColumn="gvToDoList_AutoGeneratingColumn" IsReadOnly="True" EnableColumnVirtualization="False"
ScrollMode="RealTime" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsFilteringAllowed="False" ShowGroupPanel="False" Loaded="gvToDoList_Loaded" VerticalGridLinesBrush="Gray" RowLoaded="gvToDoList_RowLoaded" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> </Controls:GridView>
</RadDock:RadPane>
</RadDock:RadSplitContainer>
</RadDock:RadDocking>


But my docking is stop. If I try to dock my items it gives me Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) error.

Please reply me.

Thanks,
Gaurang
Tags
Docking
Asked by
pextiger Lim
Top achievements
Rank 1
Answers by
bg
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Pana
Telerik team
Gaurang
Top achievements
Rank 1
Share this question
or