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

NullReferenceException in designer

3 Answers 117 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dédé
Top achievements
Rank 1
Dédé asked on 08 Mar 2013, 08:18 AM
Hi,

I'm using VS2012sp1 and Telerik 2013.1.220.45 trial.

I am creating a RadWindow with this XAML code :

<telerik:RadWindow x:Class="WPF.TestForm1"
        Height="300" Width="300" Header="Hello">
    <Grid>
         
    </Grid>
</telerik:RadWindow>

I have changed the C# inherited class to RadWindow.

When I click on the designer Window, the designer shows a NullReferenceException with this stacktrace :
à MS.Internal.VSUtilities.GetBuildAction(IVsHierarchy hierarchy, UInt32 itemid)
  à Microsoft.VisualStudio.ExpressionHost.HostServices.HostSourceItem.<>c__DisplayClass9.<Microsoft.Expression.DesignHost.IHostSourceItem.get_BuildItemType>b__7()
  à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
  à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
  à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
  à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.DirectInvoke(Action action, Int32 sourceApartmentId, Int32 targetApartmentId, Int32 originId, WaitHandle aborted)
  à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.DirectInvokeInbound(Action action, Int32 targetApartmentId)
  à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
  à Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
  à Microsoft.VisualStudio.ExpressionHost.HostServices.HostSourceItem.Microsoft.Expression.DesignHost.IHostSourceItem.get_BuildItemType()
  à Microsoft.Expression.DesignHost.HostSourceItemData..ctor(IHostSourceItem item)
  à Microsoft.VisualStudio.ExpressionHost.HostServices.HostProject.<Microsoft.Expression.DesignHost.IHostProject.get_InitializationData>d__7e.MoveNext()
  à Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteEnumerable`2.RemoteEnumerationThunk.<>c__DisplayClass8.<NextChunk>b__7()
  à Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
  à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

I have no VS extensions (just those VS installs by itslef like nuget, and Telerik extensions).

Does someone have any idea ?

3 Answers, 1 is accepted

Sort by
0
Alek
Telerik team
answered on 12 Mar 2013, 02:19 PM
Hello Damien,

 Unfortunately we did not manage to reproduce the scenario. We tested it under the same conditions as you wrote in your post - using a RadWindow as a UserControl, VS2012, dll version 2013.1.220.45. 
Can you send us more details about your project which will help us reproduce the exception?

Regards,
Alek
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dédé
Top achievements
Rank 1
answered on 12 Mar 2013, 03:31 PM
Hi,

Do you think there can be a difference between trial and registered version of your lib ? Because I am using the trial.

The problem seams to occur when a telerik WPF control is selected in designer, by clicking on it in the designer view, or when clicking on it's xaml node in the xaml view.
If I choose another standard WPF control, I see the designer, even when the control is inside a telerik one.



Hum, I tried to create a sample snippet, but it seams that it is working now...

In the first case, a fresh windows/vs2012 installation, with all windows updates, I have downloaded the trial WPF, installed, created a new WPF application (not a telerik WPF), copied assemblies to a sub-folder of solution (all telerik assembly), added them as reference, changed xaml and cs code like I said in the previous post. And the designer show me exceptions when a Telerik control is focused.

In the second case, I created a new radcontrols wpf application, selected some options, and no errors at all. And when opening my previous solution, no errors too... I'm going to check with my collegue that has the first case behavior...
0
Alek
Telerik team
answered on 14 Mar 2013, 02:53 PM
Hi Damien,

We would like to assure you that the trial assemblies are fully functional, the only difference from the licensed assemblies is the trial message.

Regards,
Alek
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Window
Asked by
Dédé
Top achievements
Rank 1
Answers by
Alek
Telerik team
Dédé
Top achievements
Rank 1
Share this question
or