This question is locked. New answers and comments are not allowed.
Hi Everyone,
I need to be able to add a RadPane control to a RadPaneGroup Programatically. I am using the following code to add the new RadPane to a RadPaneGroup that is declared in XAML.
This code ends with an null reference exception being called on the additem call.
Any help in figuring out why I am getting a null reference exception would be appreciated.
Thank you in advance.
I need to be able to add a RadPane control to a RadPaneGroup Programatically. I am using the following code to add the new RadPane to a RadPaneGroup that is declared in XAML.
PnlVehicleStatus = new RadPane |
{ |
CanFloat = true, |
CanDockInDocumentHost = false, |
CanUserPin = true, |
Title = "Vehicle Status", |
Header = "Vehicle Status", |
CanUserClose = true, |
IsPinned = true, |
Name = "PnlVehicleStatus", |
Tag = "Test" |
}; |
PnlVehicleStatus.SetValue(RadDocking.SerializationTagProperty,"PnlVehicleStatus"); |
PnlVehicleStatus.Content = new GeoHostVehicleStatus(); |
AddWindowToToggle(PnlVehicleStatus, (string)PnlVehicleStatus.Header); |
RSCDockRight.AddItem(PnlVehicleStatus, DockPosition.Right); |
<RadDock:RadDocking x:Name="Docking" Grid.Row="2" LayoutUpdated="RadDocking_LayoutUpdated"> |
<RadDock:RadSplitContainer> |
<RadDock:RadPaneGroup x:Name="RSCDockLeft"> |
</RadDock:RadPaneGroup> |
</RadDock:RadSplitContainer> |
<RadDock:RadSplitContainer InitialPosition="DockedRight"> |
<RadDock:RadPaneGroup x:Name="RSCDockRight"> |
</RadDock:RadPaneGroup> |
</RadDock:RadSplitContainer> |
<RadDock:RadDocking.DocumentHost> |
<RadDock:RadPaneGroup> |
<RadDock:RadPane x:Name="PnlMain" RadDock:RadDocking.SerializationTag="PnlMain"> |
</RadDock:RadPane> |
</RadDock:RadPaneGroup> |
</RadDock:RadDocking.DocumentHost> |
</RadDock:RadDocking> |
This code ends with an null reference exception being called on the additem call.
Any help in figuring out why I am getting a null reference exception would be appreciated.
Thank you in advance.