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

RadTileview in Usercontrol designer exception

3 Answers 114 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Boots
Top achievements
Rank 1
Boots asked on 01 Oct 2009, 09:37 PM

Hello,

When I put the RadTileView in a wpf UserControl I'm getting the following error message in the designer.

Object reference not set to an instance of an object.

at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.FindRootVisual() at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.Initialize() at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnAllowDragChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.SetAllowDrag(DependencyObject obj, Boolean value) at Telerik.Windows.Controls.RadTileViewItem.OnApplyTemplate() at System.Windows.FrameworkElement.ApplyTemplate() at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Canvas.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Designer.SimpleViewManager.DesignerBackground.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Decorator.MeasureOverride(Size constraint) at Microsoft.Windows.Design.Interaction.DesignerView.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Designer.Viewport.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Interop.HwndSource.SetLayoutSize() at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value) at System.Windows.Interop.HwndSource.set_RootVisual(Visual value) at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder.Initialize() at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder..ctor(UIElement content) at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.get_ViewHandle() at MS.Internal.Host.Isolation.IsolatedView.get_ViewHandle() at MS.Internal.Designer.DesignerPane.LoadDesignerView()

Thanks much
Boots

3 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 06 Oct 2009, 04:11 PM
Hello Boots,

It seems from the stack trace that the WPF DragDrop tries to do something that is incompatible with the designer.

We will look into this based on the stack trace, but could you give us more details about reproducing this. I tried putting a tile view in a UserControl with the beta1 assemblies and the designer worked for me (I have attached a screenshot of this).

What version of Visual Studio are you using?
What is your OS?

Are there any other controls in the UserControl?

Is this UserControl placed anywhere or you see the error while you are editing the TileView?

Kind regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Boots
Top achievements
Rank 1
answered on 06 Oct 2009, 08:24 PM
Hello Miroslav,

Thanks for the quick reply. I'm running
- Visual Studio 2008
- Microsoft .Net Framework version 3.5 SP1
- Windows Vista Business Edition Service Pack 1, 64-bit

My xaml looks like:

<UserControl x:Class="WpfControlLibrary1.UserControl1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Height="300" Width="300" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">  
    <Grid> 
        <telerik:RadTileView> 
            <telerik:RadTileView> 
                  
            </telerik:RadTileView> 
        </telerik:RadTileView> 
    </Grid> 
</UserControl> 
 

only seems to happen occasionally in the designer. Had my coworker test on his machine and got the same result. Not a big deal since its just in the desiner, just thought I'd pass on the error.

Thanks again
~Boots
0
Miroslav
Telerik team
answered on 10 Oct 2009, 07:32 AM
Hello Boots,

Thank you for the details!

It is important for the controls to work in the designer as well, we will look into this.

Sincerely yours,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TileView
Asked by
Boots
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Boots
Top achievements
Rank 1
Share this question
or