Hey again,
So I know I saw something about this in the previous release, but it's rearing it's ugly head again. I'm trying to split up my current application into multiple usercontrols that will all load based on user selections from a master menu. Up to this point, MediaPlayer and Carousel are both working like a charm, but Grid... not so much.
I took an existing usercontrol (the original version of the app where everything was squeezed into a single usercontrol), copied the xaml down the the last bracket, and it works perfectly as far as displaying the RadGrid. If, however, I strip out everything but the grid to make it a usercontrol that I can load dynamically in my application:
So I am trying to figure out why it would work with all the other stuff around it but throw an error when I isolate the grid. The funny thing is, when you click to Reload the Designer, the grid displays for a split second before this error pops up.
Thanks folks!!
So I know I saw something about this in the previous release, but it's rearing it's ugly head again. I'm trying to split up my current application into multiple usercontrols that will all load based on user selections from a master menu. Up to this point, MediaPlayer and Carousel are both working like a charm, but Grid... not so much.
I took an existing usercontrol (the original version of the app where everything was squeezed into a single usercontrol), copied the xaml down the the last bracket, and it works perfectly as far as displaying the RadGrid. If, however, I strip out everything but the grid to make it a usercontrol that I can load dynamically in my application:
<UserControl |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" |
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" |
x:Class="SilverLight_Intranet_Mail.radInbox" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:Data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" |
Width="800" Height="350"> |
<StackPanel x:Name="LayoutRoot" Background="AliceBlue"> |
<telerikGridView:RadGridView x:Name="RGView1" |
AutoGenerateColumns="True" |
ShowGroupPanel="False" |
IsFilteringAllowed="False" |
ColumnBackground="WhiteSmoke" |
Margin="5,5,5,5"/> |
</StackPanel> |
</UserControl> |
I get the following error:
Object reference not set to an instance of an object. |
at MS.Internal.XcpImports.CheckHResult(UInt32 hr) |
at MS.Internal.XcpImports.RenderTargetBitmapRender(HostingRenderTargetBitmap bitmap, UIElement visual, Int32& dirtyX, Int32& dirtyY, Int32& dirtyWidth, Int32& dirtyHeight) |
at System.Windows.Interop.HostingRenderTargetBitmap.Render(UIElement visual) |
at MS.Internal.Silverlight.Host.RuntimeInterop.RenderElementToTargetBitmap(Int32 elementKey, Int32 targetBitmapIdentifier) |
at MS.Internal.Silverlight.Host.Interop.RenderElementToTargetBitmap(Int32 element, Int32 targetBitmapIdentifier, ISilverlightContentDownloadCallback urlcallback) |
at MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateBitmap() |
at MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateTree() |
at MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.MeasureOverride(Size constraint) |
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) |
at System.Windows.UIElement.Measure(Size availableSize) |
at System.Windows.ContextLayoutManager.UpdateLayout() |
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) |
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() |
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() |
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) |
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) |
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) |
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) |
So I am trying to figure out why it would work with all the other stuff around it but throw an error when I isolate the grid. The funny thing is, when you click to Reload the Designer, the grid displays for a split second before this error pops up.
Thanks folks!!