Drag from External Listbox (Null Object Reference Exception) On ScheduleViewDragDropBehavior.Drop)

4 posts, 0 answers
  1. Dan
    Dan avatar
    5 posts
    Member since:
    Sep 2008

    Posted 27 Mar 2012 Link to this post

    I'm trying to drag from an external list box to the schedule view control, but i'm getting a "Object reference not set to an instance of an object." Exception in the DragDropBehavior.Drop.

     at Telerik.Windows.Controls.ScheduleViewBase.CreateNew(IAppointment appointment) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Editing.cs:line 96
       at Telerik.Windows.Controls.ScheduleViewDragDropBehavior.CopyAppointment(DragDropState state, Slot targetSlot, IAppointment appointment) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\DragDropBehavior\ScheduleViewDragDropBehavior.cs:line 447
       at Telerik.Windows.Controls.ScheduleViewDragDropBehavior.Drop(DragDropState state) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\DragDropBehavior\ScheduleViewDragDropBehavior.cs:line 110
       at MAXIS.Scheduling.ScheduleItem.ScheduleViewDragDropBehavior.Drop(DragDropState state) in C:\Projects\_AX\Production\Scheduling\MAXIS.Sch

    It's a custom Appointment. I've implemented the copy & the copyfrom methods like is shown in the examples. I can drag & drop from within the control just fine, but dragging a appointment from a listbox throws the exception.  the only difference i see in the state object is that the SourceAppointmentsSource is nothing.

    The control version is 2012.1.215.40
  2. Dan
    Dan avatar
    5 posts
    Member since:
    Sep 2008

    Posted 27 Mar 2012 Link to this post

    Apparently i cannot have a constructor other than the default for my custom appointment items.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 30 Mar 2012 Link to this post

    Hi Dan,

    Please find attached an example which demonstrates how the drag and drop between the ScheduleView and ListBox should be implemented.

    Hope this helps.

    Greetings,
    Yana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Siddartha
    Siddartha avatar
    1 posts
    Member since:
    Oct 2012

    Posted 17 Oct 2012 Link to this post

    System.NullReferenceException

    Object reference not set to an instance of an object.

    at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.<GetXmlNamespaceCompatibilityMappings>d__8.MoveNext() at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption() at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier) at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context) at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem() at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem() at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState() 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()



    is the exception i m facing
    and i cannot see the designer page in silverlight visual studio 2010
    i tried installing silverlight5 sdk and toolkit but still can't see the designer page
    please help me ..................
Back to Top