Telerik Forums
UI for WPF Forum
2 answers
182 views

I am using the following AnnotationsProvider to generate annotations using data bindings:

<code>
<telerik:RadCartesianChart.AnnotationsProvider>

                                            <telerik:ChartAnnotationsProvider Source="{Binding LocationHistory}">
                                                <telerik:ChartAnnotationDescriptor>
                                                    <telerik:ChartAnnotationDescriptor.Style>
                                                        <Style TargetType="telerik:CartesianPlotBandAnnotation">
                                                            <Setter Property="Axis" Value="{Binding HorizontalAxis, RelativeSource={RelativeSource AncestorType=telerik:RadCartesianChart}}" />
                                                            <Setter Property="From" Value="{Binding Item2}" />
                                                            <Setter Property="To" Value="{Binding Item3}" />
                                                            <Setter Property="Fill" Value="{Binding Item1, Converter={StaticResource LocationToBrushConverter}}" />
                                                        </Style>
                                                    </telerik:ChartAnnotationDescriptor.Style>
                                                </telerik:ChartAnnotationDescriptor>
                                            </telerik:ChartAnnotationsProvider>
                                        </telerik:RadCartesianChart.AnnotationsProvider>
</code>

I have a bunch of LineSeries elements as well inside the RadCartesianChart element which is the parent of this AnnotationsProvider.

I am trying to get these annotations to render below all the LineSeries elements. But I am unable to set the ZIndex propery through ChartAnnotationDescriptor.Style. Could you please let me know if there is a workaround for this issue?

yoochul
Top achievements
Rank 1
 answered on 24 Jun 2019
14 answers
256 views

Hi, 

I would like to be able to begin typing the moment the MultiColumnComboBox has focus, which is not possible at the moment.  I need to click in the control or tap Tab a second time before I can begin typing.

Best Regards,
Hans

Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 22 Jun 2019
5 answers
250 views

Hi Team,

We are facing the below exception when scheduling an appointment. we are using "2017.2.503.45" version of Telerik.Windows.Controls and VS 2017.

System.InvalidOperationException:

   at System.Windows.Data.CollectionView.DeferRefresh (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at Telerik.Windows.Controls.ScheduleView.ScheduleViewDataConnection.SetGroupingAndFiltering (Telerik.Windows.Controls.ScheduleView, Version=2017.2.503.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Controls.ScheduleViewBase.RegenerateGroupHeaders (Telerik.Windows.Controls.ScheduleView, Version=2017.2.503.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Controls.ScheduleViewBase.OnResourceTypesSourcePropertyChanged (Telerik.Windows.Controls.ScheduleView, Version=2017.2.503.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at System.Windows.DependencyObject.OnPropertyChanged (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.FrameworkElement.OnPropertyChanged (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.DependencyObject.NotifyPropertyChange (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.DependencyObject.UpdateEffectiveValue (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.DependencyObject.InvalidateProperty (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Data.BindingExpressionBase.Invalidate (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Data.BindingExpression.TransferValue (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.WeakEventManager+ListenerList`1.DeliverEvent (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.WeakEventManager.DeliverEventToList (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at ViewModel.WorkerCompleted (SampleModules.Test, Version=2.132.18145.3, Culture=neutral, PublicKeyToken=null)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)

Please suggest as to handle this issue.

 

Thanks,

Parameswari

Vladimir Stoyanov
Telerik team
 answered on 21 Jun 2019
2 answers
408 views

Hi,

I have just strated creating a Telerik WPF application, added a RadButton in a RadWindow and whenever I click on any of the buttons on the Window(minimze, maximize or RadButton) the application crashes. The debugg mode throws System.NullReferenceException: 'Object reference not set to an instance of an object.'

I have added references, of which are Telerik.Windows.Controls, Telerik.Windows.Controls.Data, Telerik.Windows.Controls.Input, Telerik.Windows.Controls.Navigation, Telerik.Windows.Data, for Telerik to the project, version: 2019.1.220.45 (of all references).

The call stack shows this output: 

>Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.WindowBase.OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)Unknown
 PresentationCore.dll!System.Windows.UIElement.OnGotKeyboardFocusThunk(object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e)Unknown
 PresentationCore.dll!System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget)Unknown
 PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)Unknown
 PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)Unknown
 PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)Unknown
 PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args)Unknown
 PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args)Unknown
 PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args, bool trusted)Unknown
 PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()Unknown
 PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input)Unknown
 PresentationCore.dll!System.Windows.Input.KeyboardDevice.ChangeFocus(System.Windows.DependencyObject focus, int timestamp)Unknown
 PresentationCore.dll!System.Windows.Input.KeyboardDevice.TryChangeFocus(System.Windows.DependencyObject newFocus, System.Windows.Input.IKeyboardInputProvider keyboardInputProvider, bool askOld, bool askNew, bool forceToNullIfFailed)Unknown
 PresentationCore.dll!System.Windows.Input.KeyboardDevice.Focus(System.Windows.DependencyObject focus, bool askOld, bool askNew, bool forceToNullIfFailed)Unknown
 PresentationCore.dll!System.Windows.Input.KeyboardDevice.Focus(System.Windows.IInputElement element)Unknown
 PresentationCore.dll!System.Windows.UIElement.Focus()Unknown
 PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs e)Unknown
 PresentationCore.dll!System.Windows.UIElement.OnMouseLeftButtonDownThunk(object sender, System.Windows.Input.MouseButtonEventArgs e)Unknown
 PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget)Unknown
 PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)Unknown
 PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)Unknown
 PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)Unknown
 PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args, System.Windows.RoutedEvent newEvent)Unknown
 PresentationCore.dll!System.Windows.UIElement.OnMouseDownThunk(object sender, System.Windows.Input.MouseButtonEventArgs e)Unknown
 PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget)Unknown
 PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)Unknown
 PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)Unknown
 PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)Unknown
 PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args)Unknown
 PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args)Unknown
 PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args, bool trusted)Unknown
 PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()Unknown
 PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input)Unknown
 PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport)Unknown
 PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel)Unknown
 PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)Unknown
 PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)Unknown
 WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)Unknown
 WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)Unknown
 WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)Unknown
 WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)Unknown
 WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)Unknown
 WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)Unknown
 [Native to Managed Transition]
 [Managed to Native Transition]
 WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)Unknown
 WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame)Unknown
 PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore)Unknown
 PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window)Unknown
 PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window)Unknown
 PresentationFramework.dll!System.Windows.Application.Run()Unknown
 Project3.exe!Project3.App.Main()Unknown

 

I cannot find the stack trace since I don't have .pdb files(can't find them(except reporting.wpf.pdb) in the installation folder).

I'm attaching the solution.

I'm using Visual Studio 2017 Community Edition.

 

Hope you can solve the issue.

 

Sincerely,

Josip

 


Dimitar Dinev
Telerik team
 answered on 20 Jun 2019
1 answer
410 views

Hi,

I am using telerik PDF viewer in my wpf application, i am following MVVM pattern to bind pdf to pdf viewer control. I have a PDF content as byte array which on load will be read into memory stream and then loaded to PDF document (code given below).

pdf is loading perfectly and i am able to get the selected page, selected content and  i am also able to save the start & end of the previous selection and apply the same back on the pdf.

currently i am trying to reload a new pdf content and apply the saved selection indexes (start and end) and extract the text between the indexes.

my application runs in background (no ui controls) and the pdf content (byte[]) is fetched from an API and this new content must be loaded to pdfdocument (Telerik.Windows.Documents.Fixed.PdfDocumentSource) and the saved indexes must be re applied and the content between the selected region must be extracted.

problem is when i load the byte[] then there is no error but the documentsource.Document is null . how do i get this working ? can i apply the selection indexes to Fixed.PdfDocumentSource and read selection content.

below is the code that i am using. 

Note: i am passing command descriptors to viewmodel constructor.

 <telerik:RadPdfViewer x:Name="pdfViewer" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" DocumentSource="{Binding PDFDocument,Mode=TwoWay}" Mode="TextSelection">
  </telerik:RadPdfViewer>

 

    private Telerik.Windows.Documents.Fixed.PdfDocumentSource _PDFDocument;
    /// <summary>
    /// Pdf Document Source
    /// </summary>
    public Telerik.Windows.Documents.Fixed.PdfDocumentSource PDFDocument {
      get {
        return _PDFDocument;
      }
      set {
        _PDFDocument = value;
        OnPropertyChanged("PDFDocument");
      }
    }
     /// <summary>
    /// 
    /// </summary>
    private void LoadPDFDocument(byte[] pdfdata) {
      if (pdfdata != null) {
        MemoryStream DocumentStream = new MemoryStream(pdfdata);
        Telerik.Windows.Documents.Fixed.FormatProviders.FormatProviderSettings settings = new Telerik.Windows.Documents.Fixed.FormatProviders.FormatProviderSettings(Telerik.Windows.Documents.Fixed.FormatProviders.ReadingMode.OnDemand);
        PDFDocument = new Telerik.Windows.Documents.Fixed.PdfDocumentSource(DocumentStream, settings);
      }
    }

Nikolay Demirev
Telerik team
 answered on 20 Jun 2019
0 answers
77 views

I have implemented load/save layout based on the examples on your Github page:

using (FileStream layoutFile = new FileStream(Path.Combine(DockingLayoutPath, DockingLayoutFileName), FileMode.Open))
{
  radDocking.LoadLayout(layoutFile);
}

 

using (FileStream layoutFile = new FileStream(Path.Combine(DockingLayoutPath, DockingLayoutFileName),FileMode.Create))
{
   radDocking.SaveLayout(layoutFile);
}

 

I have datagrids inside my radpanes. When I do not load the layout the datagrid width will track the width of the radpane when resized. However when I save/load layout the datagrid will no longer track the radpane width when resized. On LoadLayout when the radpane is made smaller a horizontal scrollbar will appear and when the radpane is made bigger there will be an empty gap between the radpane border and the side of the datagrid.

 

How do I get the radpane content sizing to work like it does before the layout has been loaded?

 

YBOT
Top achievements
Rank 1
Veteran
 asked on 20 Jun 2019
8 answers
115 views
Hi RadTeam,

I want to acess the selected category brsuh of a an appaointment from radscheduleview
sri
Top achievements
Rank 1
 answered on 20 Jun 2019
2 answers
1.2K+ views

Hi,

I create UI tests for our WPF Desktop App.
For this I use the WinAppDriver from Microsoft.
Everything works fine, excepting "SendKeys" to AutoCompleteBox.

 

m_session.FindElementByAccessibilityId("AutoComlpleteBoxID").Click();   // Works ... I see the input cursor inside the box

m_session.FindElementByAccessibilityId("AutoComlpleteBoxID").SendKeys("12345"); // Works not !

Exception:
An unknown error occurred in the remote end while processing the command.

Any Idea why it happens.
With a standard WPF textbox it works.

Regards
Stefan

Vladimir Stoyanov
Telerik team
 answered on 19 Jun 2019
0 answers
62 views

Hi,

 

The buttons that needs to be available in the quick access toolbar are those buttons which are available in the ribbon view. Is there a way to get this thing done by just creating a single list of buttons and then bind them to both of them(ribbonView and QuickAccessToolbar).

 

Because right now, i have to hard code each and every button separately in both of them, which doesnt seem a good practice or a good solution for this.

 

Kindly provide me with a sample project in which the same list  of button is being binded with both in a MVVM architecture.

 

Regards,

Tayyaba Naz

Tayyaba
Top achievements
Rank 1
 asked on 19 Jun 2019
12 answers
143 views

Hello, 

I'm having a problem with RadDesktopAlertManager.
Since its position can't be changed after initialization, I have to re-assign it in order to change the position. But after doing that, adding of a new RadDesktopAlert item to the manager causes a "Closed" event to be raised for the alert immediately after that (I can see in the Call Stack that the item's adding caused the event raising). Actually the item is not being closed (which is good), but the unnecessary event effects my business logic.

David
Top achievements
Rank 1
 answered on 18 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?