Telerik Forums
UI for WPF Forum
7 answers
471 views

I am getting a pretty tough error that is coming from ItemsControlExtensions used by the TileList control. I get this error when I run the my application using Narrator.


I found an article about this on StackOverflow where somebody encountered this issue on some custom controls they had in their own solution that caused the error. But in my case, I am using Telerik. So I am kind of stuck unless Telerik fixes it.



Here is the link to the stack over flow find.



http://stackoverflow.com/questions/16245732/nullreferenceexception-from-presentationframework-dll



All I am trying to do is launch the app. The app uses a TileList control as well as a RadAutoCompleteBox, RadComboBox, and RadGridView.



When I run the app on Windows 8 I get two errors when the application starts:



First Error:

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.NullReferenceException

Stack:

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.DispatcherOperation.InvokeImpl()

   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   at System.Windows.Threading.DispatcherOperation.Invoke()

   at System.Windows.Threading.Dispatcher.ProcessQueue()

   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

   at System.Windows.Application.RunInternal(System.Windows.Window)

   at System.Windows.Application.Run()



Error 2:

Faulting application name: xxx.exe, version: 1.0.0.0, time stamp: 0x525495d8

Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000

Exception code: 0xc0000005

Fault offset: 0x000007fe546901ab

Faulting process id: 0x1e5c

Faulting application start time: 0x01cec47f37ad9317

Faulting application path: C:\Users\xxx\Desktop\xxx\Sprint1b\xxx.exe

Faulting module path: unknown

Report Id: 7f5853ab-3072-11e3-bef0-5c514f0c8fb3

Faulting package full name:

Faulting package-relative application ID:





I am able to run the app on Windows 7 and Windows 8.1 BUT when I run narrator on Windows 8.1 I get this error:



   at Telerik.Windows.Controls.ItemsControlExtensions.<GetContainers>d__0`1.MoveNext() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Common\ItemsControlExtensions.cs:line 45

   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()

   at Telerik.Windows.Automation.Peers.RadAutoCompleteBoxAutomationPeer.GetChildrenCore() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\AutoCompleteBox\AutomationPeers\RadAutoCompleteBoxAutomationPeer.cs:line 173

   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()

   at System.Windows.Automation.Peers.AutomationPeer.GetChildren()

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer)

   at MS.Internal.Automation.ElementProxy.StaticWrap(AutomationPeer peer, AutomationPeer referencePeer)

   at System.Windows.Automation.Peers.AutomationPeer.RaiseAutomationEvent(AutomationEvents eventId)

   at System.Windows.Automation.Peers.SelectorAutomationPeer.RaiseSelectionEvents(SelectionChangedEventArgs e)

   at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()

   at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection)

   at System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(DependencyObject d, 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, Boolean coerceWithCurrentValue, OperationType operationType)

   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)

   at System.Windows.DependencyObject.SetCurrentValueInternal(DependencyProperty dp, Object value)

   at System.Windows.Controls.TabControl.OnGeneratorStatusChanged(Object sender, EventArgs e)

   at System.EventHandler.Invoke(Object sender, EventArgs e)

   at System.Windows.Controls.ItemContainerGenerator.SetStatus(GeneratorStatus value)

   at System.Windows.Controls.ItemContainerGenerator.Generator.System.IDisposable.Dispose()

   at System.Windows.Controls.Panel.GenerateChildren()

   at System.Windows.Controls.Primitives.TabPanel.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, Boolean& hasDesiredSizeUChanged)

   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.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, Boolean& hasDesiredSizeUChanged)

   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.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)

   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.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)

   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.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.ContextLayoutManager.UpdateLayout()

   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

   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, Int32 numArgs)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Yana
Telerik team
 answered on 05 Feb 2014
0 answers
61 views
Hi,

i have a urgent problem. We have to bind a observalcollection to a RadGridView. The Problem ist that this collection must be dynamic. For Example:
We have a tabel "Customer" with 20 columns and a table "purchasing" with 40 columns and so on... We have to create on runtime all the properties
and the collection!

Is there any standalone wpf example somewhere? All i found are Silverlight-Examples and these will not work with wpf...

Thanks a lot
Best Regards
MJ
ITA
Top achievements
Rank 1
 asked on 05 Feb 2014
4 answers
238 views
Hello,

I upgraded from version 2012.3.1129.40 to 2013.3.1204.40.
In our application, we can drag a node from a treeview and drop it in a WinForms control.
With the old version of Telerik, we were able to change the TreeViewDragCue object from the WinForm control, like this:
RadDragAndDropManager.Options.Effects = ConvertToWpfEffects(effects);
var l_cue = RadDragAndDropManager.Options.DragCue as Telerik.Windows.Controls.TreeView.TreeViewDragCue;
if (l_cue != null)
{
    switch (effects)
    {
        case DragAndDropEffects.Copy:
            l_cue.DragActionContent = "Copy To";
            l_cue.IsDropPossible = true;
            break;
        case DragAndDropEffects.Move:
            l_cue.DragActionContent = "Link With";
            l_cue.IsDropPossible = true;
            break;
        default:
            l_cue.IsDropPossible = false;
            break;
    }
}

Now with the new version, I'm using the recommended DragDropManager and DragDropPayloadManager objects, I tried this:
private void OnDragOver(object sender, System.Windows.Forms.DragEventArgs e)
{
    var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
    if (options != null)
            {
                var l_dragVisual = options.DragVisual as TreeViewDragVisual;
                switch (effects)
                {
                    case DragAndDropEffects.None:
                        options.DropAction = DropAction.None;
                        if (l_dragVisual != null)
                        {
                            l_dragVisual.IsDropPossible = false;
                            options.UpdateDragVisual();
                        }
                        break;
                    case DragAndDropEffects.Copy:
                        options.DropAction = DropAction.Delete;
                        if (l_dragVisual != null)
                        {
                            l_dragVisual.IsDropPossible = true;
                            options.UpdateDragVisual();
                            l_dragVisual.DropActionText = "Copy To";
                        }
                        break;
                    case DragAndDropEffects.Move:
                        options.DropAction = DropAction.Delete;
                        if (l_dragVisual != null)
                        {
                            l_dragVisual.IsDropPossible = true;
                            options.UpdateDragVisual();
                            l_dragVisual.DropActionText = "Link With";
                        }
                        break;
                }
            }
}

Unfortunately, the options object is always null.
Is there a way to change the TreeViewDragVisual object to give a feedback ?

Best regards,
Stéphane
Top achievements
Rank 1
 answered on 05 Feb 2014
1 answer
243 views
I try created my first WPF Telerik WPF app.

I installed RAD Controls for Window.

In VS 2013 I chose File > New > Project >Telerik > Windows > C# RadControls WPF Application

In wizard I added ref to DLL Telerik.Windows.Controls, Telerik.Windows.Controls.Navigation and Telerik.Windows.Data.

VS creted WPF project but startup window is type of System.Windows.Window.

I hope that startup window will be type of RadWindow.

Ok, I deleted it and added Project > New Item > Telerik Scenarion > RadWindow.

VS added RadWindow. I changed startup URI in App.xaml.

Run WPF app and what happen :D

RadWindow is open in NavigationWindow :D 

I don’t understand why this magic happen. 

I know that in WPF in startup URI is on Page WPF automatically create NavigationWindow as host container for Page.

So where is problem?

Thanks for support
Vladi
Telerik team
 answered on 05 Feb 2014
3 answers
77 views
Hi, how can I set custom color for Doughnut3D slices ?

I've this code, and I want that "Slice 1" in Blue, "Slice 2" in Green, "Slice 3" in Red and "Slice 4" in Yellow. I need to use my personal colors.

// CODE
                    rcTimes.DefaultView.ChartArea.DataSeries.Clear();
                    rcTimes.DefaultView.ChartLegend.Header = string.Empty;
                    DataSeries serPT = new DataSeries();
                    Doughnut3DSeriesDefinition sdWorking = new Doughnut3DSeriesDefinition();
                    sdWorking.ShowItemLabels = false;
                    serPT.Definition = sdWorking;
                    DataPoint dp = new DataPoint(report.WorkingTime.TotalSeconds);
                    dp.LegendLabel = "Slice 1";
                    serPT.Add(dp);
                    dp = new DataPoint(report.WorkingExtraTime.TotalSeconds);
                    dp.LegendLabel = "Slice 2";
                    serPT.Add(dp);
                    dp = new DataPoint(report.PauseTime.TotalSeconds);
                    dp.LegendLabel = "Slice 3";
                    serPT.Add(dp);
                    dp = new DataPoint(report.AlarmTime.TotalSeconds);
                    dp.LegendLabel = "Slice 4";
                    serPT.Add(dp);
                    rcTimes.DefaultView.ChartArea.DataSeries.Add(serPT);
Tina Stancheva
Telerik team
 answered on 05 Feb 2014
7 answers
936 views
Hi,

I am using the DisplayIndex property on a RadGridView to set the column order in runtime (through databinding). The problem is that I receive an ArgumentOutOfRangeException when my window is opened.

The XAML looks like the following:

<code style="color: #000;"><</code><code style="color: #069;font-weight: bold;">Telerik:GridViewDataColumn<br></code><code style="color: #000;">TextAlignment="Left"<br></code><code style="color: #000;">TextTrimming="CharacterEllipsis"<br></code><code style="color: #000;">DisplayIndex="{Binding CreatedTimestampColumnIndex}"<br></code><code><font color="#000000">IsReadOnly="True"><br></font></code><code style="color: #008200;"><!-- And more code that sets the header and the CellTemplate with binding etc... --><br></code><code style="color: #000;"></</code><code style="color: #069;font-weight: bold;">Telerik:GridViewDataColumn</code><code style="color: #000;">></code>


        public int CreatedTimestampColumnIndex<br>        {<br>            get<br>            {<br>                return createdTimestampColumnIndex;<br>            }<br> <br>            set<br>            {<br>                createdTimestampColumnIndex = value;<br>                OnPropertyChanged("CreatedTimestampColumnIndex");<br>            }<br>        }
I've verified that I do get a callback to my property methods in the ViewModel. If I set the DisplayIndex to a static value in the XAML (i.e. DisplayIndex="3") works fine.

Why doesn't this work with data binding?

Details:
.NET version: 4.5
Telerik version. 2013.Q1

Would really appreciate a solution to this, thanks!
Dimitrina
Telerik team
 answered on 05 Feb 2014
1 answer
140 views
Hi!
The behaviour when the child dialog window blinks, when user clicks on currenlty inactive parent window is usual for regular non-telerik Window control.
Unfortunately, RadWindow doesn't blink, and our customers have noticed that. How do I achieve such behaviour?
Thank you!
Vladi
Telerik team
 answered on 05 Feb 2014
2 answers
178 views
I have the following XAML:

<t:RadNumericUpDown Value="{Binding Number, UpdateSourceTrigger=PropertyChanged}" IsEditable="True" />

when i focus the NumericUpDown field and press left or right arrow, the underlying Number property is being set.
Why?
The value did not change. And also in case of a RadWatermarkTextBox I do not observe such a behavior.
Paweł Polaczyk
Top achievements
Rank 1
 answered on 05 Feb 2014
1 answer
63 views
Hi,

is it possible to set a fix range where Appointments could be placed? Example:

Our working day is form 07:00 am to 06:00 pm. Now I have an Appointment from 4pm to 05:30pm and I want to Drag&Drop this Appointment one
our in the future. Normally it is 05:00pm to 06:30pm, but our working day ends on 06:00pm, now I want to switch to the next working day an start on
07:00am.

Is this possible?

Thanks
Best Regards
Rene
Yana
Telerik team
 answered on 05 Feb 2014
4 answers
112 views
 I am developing an application in which I require drag drop between two tree which a condition that
1. When child node is dragged , it needs to check if the Parent Node for that child is present in the Target Treeview,
    if (present)
     // add the child within that parent node
    else
     // Add the parent node and then the child node.
Gunasekaran
Top achievements
Rank 1
 answered on 05 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?