Telerik Forums
UI for WPF Forum
2 answers
112 views
How can I filter with accent insensitive?
Alain
Top achievements
Rank 1
 answered on 22 Jan 2016
1 answer
689 views

I can't get rid of a XAML designer error.

<UserControl x:Class="MenuItemBinding.SomeUserControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
   <Grid>
      <telerik:RadMenu>
         <telerik:RadMenuItem Header="Hello World" Command="{Binding HelloWorld}" />
      </telerik:RadMenu>
   </Grid>
</UserControl>
 

 The 'Command="{Binding' part has a green underline with the tooltip "The property "Command" does not have an accessible setter".

Observations:

  • Only happens in x64 (x86 doesn't show this error).
  • Seems to only happen with RadMenuItem although I have not check all cases.
  • It happens regardless where I place the RadMenuItem in the XAML.
  • The application still works fine even though the XAML designer is stuck to "Invalid Markup"

How do I get rid of this error?

Nasko
Telerik team
 answered on 22 Jan 2016
5 answers
204 views

Hello,

it seems there is a problem with the localization manager for DateTimePicker, in case of a wrong date:

When the control is loaded, it asks for the text to display with the "Error" name.
When the error occurs, it is asking again for the same text, but the key now is the value returned from the first call!

Example:
1. the control asks for the text to display "Error", the application returns "Erreur" (in French).
2. in case of error, the control asks for the text to display "Erreur".

Kalin
Telerik team
 answered on 22 Jan 2016
3 answers
134 views

I am using the method of the Interface

System.Threading.Tasks.Task<object> UploadFileAsync(string fileName, Stream fileStream, CloudUploadFileProgressChanged uploadProgressChanged, CancellationToken cancellationToken)

 

Task<object> which is the reurn type contains each file uploaded but how do I get this as a list which I can then use. This file list is different from what is uploaded bcos the uploaded files have the server side url link where as client files have c:\url

 My code is as below

 

        public Task<object> UploadFileAsync(string fileName, System.IO.Stream fileStream, CloudUploadFileProgressChanged uploadProgressChanged, CancellationToken cancellationToken)
        {
            Func<object> f = () =>
            {
                lock (_object)
                {
                    FileSize = fileStream.Length;
                    
                    if (uploadProgressChanged != null)
                    {
                        UploadProgressChanged = uploadProgressChanged;

                        UploadProgressChanged(FileSize / 10);
                    }
                    if (cancellationToken != CancellationToken.None && cancellationToken.IsCancellationRequested)
                    {
                        return null;
                    }
                    HttpResponseMessage fileResult;
                    CustomFileResult customFileResult;
                    try
                    {
                        fileResult = UploadFile(fileName, fileStream, cancellationToken).Result;
                        if (fileResult.IsSuccessStatusCode)
                        {
                            var response = fileResult.Content.ReadAsStringAsync();
                            customFileResult = JsonConvert.DeserializeObject<CustomFileResult>(response.Result);

                        }
                        else
                        {
                            var message = string.Format("Status code {0}, Reason {1}", fileResult.StatusCode,
                                fileResult.ReasonPhrase);
                            throw new ApplicationException(message);
                        }
                    }
                    catch (System.Exception)
                    {
                        throw;
                    }

                    if (UploadProgressChanged != null)
                    {
                        UploadProgressChanged(FileSize);
                    }

                    return customFileResult;
                }
            };

            fileStream.Position = 0;
            return Task.Factory.StartNew(f, cancellationToken);
        }

 

    public class CustomFileResult
    {
        public IEnumerable<string> FileNames { get; set; }
        public string Description { get; set; }
        public DateTime CreatedTimestamp { get; set; }
        public DateTime UpdatedTimestamp { get; set; }
        public string DownloadLink { get; set; }
        public IEnumerable<string> ContentTypes { get; set; }
        public IEnumerable<string> Names { get; set; }
        public IEnumerable<string> Sizes { get; set; }
    }

 

Can you provide an example where I can get hold of the result of the upload and populate the client side with the server images which are uploaded which in my case is the CustomFileResult and the property is DownloadLink.

Petar Marchev
Telerik team
 answered on 22 Jan 2016
3 answers
252 views

Hi,

We're using Visual Studio 2012 Update 5 and Telerik UI for WPF 2015.3.1104.45 version.

We have develop a custom gridview with the functionality of two wpf examples from your WPF controls examples. (GridView Control Panel and PersistenceFramework GridView Serialization) and somtimes we're getting this exception when we drag and drop a column to group field area.

Error: Object reference not set to an instance of an object.
Stacktrace:
   bei Telerik.Windows.Data.QueryableCollectionView.InternalIndexOf(Object item)
   bei Telerik.Windows.Data.QueryableCollectionView.TryRestorePreviousCurrency()
   bei Telerik.Windows.Data.QueryableCollectionView.InitializeCurrencyOnRefresh(CurrencyRefreshInfo currencyRefreshInfo)
   bei Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   bei Telerik.Windows.Data.QueryableCollectionView.RefreshInternal()
   bei Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   bei Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
   bei Telerik.Windows.Data.QueryableCollectionView.OnGroupDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   bei System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   bei System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   bei Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   bei Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   bei System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   bei Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   bei System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)
   bei System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)
   bei Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer)
   bei Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   bei Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
   bei Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   bei System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   bei System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   bei Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   bei Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   bei System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   bei Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   bei System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.PerformGrouping(IGroupDescriptor descriptor, Nullable`1 insertionIndex, GroupingEventAction action)
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass6c.<RequestGrouping>b__6b()
   bei Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action)
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.RequestGrouping(IGroupDescriptor descriptor, Nullable`1 insertionIndex, GroupingEventAction action)
   bei Telerik.Windows.Controls.GridView.DragDropController.OnGroupPanelDrop(Object sender, DragEventArgs e)
   bei Telerik.Windows.DragDrop.DragEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   bei Telerik.Windows.DragDrop.IInputElementExtensions.RaiseEvent(DependencyObject d, RoutedEventArgs routedEventArgs)
   bei Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnDragEventHandler(Object sender, DragEventArgs e)
   bei Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnDrop(Object sender, DragEventArgs e)
   bei System.Windows.DragEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   bei System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
   bei System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDrop(Object data, Int32 dragDropKeyStates, Int64 point, Int32& effects)
   bei MS.Win32.UnsafeNativeMethods.DoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   bei System.Windows.OleServicesContext.OleDoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   bei System.Windows.DragDrop.OleDoDragDrop(DependencyObject dragSource, DataObject dataObject, DragDropEffects allowedEffects)
   bei System.Windows.DragDrop.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects)
   bei Telerik.Windows.DragDrop.DragDropManager.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects, DragDropKeyStates initialKeyState, Object dragVisual, Point relativeStartPoint, Point dragVisualOffset)
   bei Telerik.Windows.DragDrop.DragInitializer.StartDrag()
   bei Telerik.Windows.DragDrop.DragInitializer.StartDragPrivate(UIElement sender)
   bei Telerik.Windows.DragDrop.DragInitializer.DragSourceOnMouseMove(Object sender, MouseEventArgs e)
   bei System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   bei System.Windows.Input.InputManager.ProcessStagingArea()
   bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   bei System.Windows.Application.RunDispatcher(Object ignore)
   bei System.Windows.Application.RunInternal(Window window)
   bei System.Windows.Application.Run(Window window)
   bei System.Windows.Application.Run()
   bei MetaxLvs.App.Main() in c:\Users\M5300\Documents\Visual Studio 2012\Projects\Metax\Metax-ERP\Metax-LVS\obj\x86\Debug\App.g.cs:Zeile 0.

Stefan
Telerik team
 answered on 21 Jan 2016
2 answers
111 views
Is there a way to make the KeyTipService work for the items in a listbox on a RadRibbonDropDownButton?
Martin Ivanov
Telerik team
 answered on 21 Jan 2016
5 answers
1.0K+ views
Hi,

I am using telerik control version 2014.1.331.40.
I got error Object reference not set to an instance of an object.

as per,

I have a window and RadGridView in this window. I am opening another window on double click on gridview row and in the opened window I have
RadTabControl and I took four RadTabItem, I show RadGridView and RadPDFViewer (RadPDFViewer is in small size) in the last 4th tab. when any row
is selected in the gridview, I fill RadPDFViewer DocumentSource based on selected row dynamicaaly. I also open another new window when double click
on RadPDFViewer and new opened window just display RadPDFViewer with full window size to view pdf file. After closing new opened window and I click
on the first RadTabItem of the window and close the window. exactly at this time, I got the error.

I also attached image of exception throw.

Detail of the exception :-

{System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.Input.FocusScope.FocusInternal()
   at Telerik.Windows.Controls.Input.FocusScope.FocusNextElement()
   at Telerik.Windows.Controls.Input.FocusScope.RemoveFocusableElement(Control element)
   at Telerik.Windows.Controls.Input.FocusScope.FocusableElement_Unloaded(Object sender, RoutedEventArgs e)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastUnloadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   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)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()   

Regards,
Nisarg
Adam
Top achievements
Rank 1
 answered on 21 Jan 2016
3 answers
101 views

Hi -

I have been following the documentation on Calculated Fields (http://docs.telerik.com/devtools/wpf/controls/radpivotgrid/features/localdatasourceprovider/local-calc-fields) to configure some custom calculated fields that are sums of a set of other fields. For example, I have Fields A, B, and C in my data provider, and I created a calculated field to sum the totals of each of them into one field that they can include in the PivotGrid if they want.

However, I would really like to give my users the ability to setup sums of any number of fields of their choosing. For example, they may want to see a field represented by a sum of Fields A and B, but not C.

Is there a way to offer them the ability to create their own calculated fields? If not, do you any recommendation for how I might achieve something like this?

Thanks,
Brett

Nasko
Telerik team
 answered on 21 Jan 2016
2 answers
94 views

I get the following error...

Error22[A]Telerik.Windows.Controls.RadColorPicker cannot be cast to [B]Telerik.Windows.Controls.RadColorPicker. Type A originates from 'Telerik.Windows.Controls.Input, Version=2015.3.1104.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadFrom' at location 'C:\Program Files (x86)\Telerik\UI for WPF Q3 2015\Binaries\WPF45\Telerik.Windows.Controls.Input.dll'. Type B originates from 'Telerik.Windows.Controls.Input, Version=2015.3.1104.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadNeither' at location 'C:\Users\jeramy.soucy.ARCSERV\AppData\Local\Microsoft\VisualStudio\12.0\Designer\ShadowCache\hssazwpx.uhz\1chhzlsj.3vq\Telerik.Windows.Controls.Input.dll'.

Not sure how to resolve this.
Jeramy
Top achievements
Rank 1
 answered on 20 Jan 2016
4 answers
391 views

Hi there, 

I have found that it is possible to export multiple GridViews into single Excel file via GridViewSpreadExport  in Winform forum. 

I wonder if this can be achieved in the UI for WPF libraries.

My objects is to export multiple grids into a single file, preferable both in PDF and XLSX. 

Many thanks, 

 

 

Petya
Telerik team
 answered on 20 Jan 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?