Telerik Forums
UI for WPF Forum
3 answers
278 views
Dear All
    Does the WPF control can be used in a open source project? In telerik website, i see WPF have more components than winform, is it more powerful?
thanks
from Peter (cmk128@hotmail.com)
Dinko | Tech Support Engineer
Telerik team
 answered on 07 Aug 2018
7 answers
649 views

Dear experts,

I am having this Exception randomly in my WPF application, any idea how to fix it? I occurs randomly when I try to add a source data file on my application:

12/06/2017 02:37:28 PM Fatal: App :: Unhandled Exception!
Machine Name : .....User Name :.......  
Exception : System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.RealizeRows(Int32 startIndex, Int32 endIndex, Double& verticalOffset, HashSet`1& realizedRows) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.MeasureOverride(Size availableSize) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size availableSize) 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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

12/06/2017 02:57:02 PM Fatal: App :: Unhandled Exception!
Machine Name : ......User Name : ......
Exception : System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.RealizeRows(Int32 startIndex, Int32 endIndex, Double& verticalOffset, HashSet`1& realizedRows) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.MeasureOverride(Size availableSize) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.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, Boolean& hasDesiredSizeUChanged) 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 Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride(Size availableSize) 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.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.DockPanel.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.Grid.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 System.Windows.Controls.Control.MeasureOverride(Size constraint) at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size availableSize) 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.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.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.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.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.Grid.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 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.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.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.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 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.Documents.AdornerDecorator.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 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.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Documents.AdornerDecorator.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 System.Windows.Window.MeasureOverrideHelper(Size constraint) at System.Windows.Window.MeasureOverride(Size availableSize) 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.AnimatedRenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Vladimir Stoyanov
Telerik team
 answered on 07 Aug 2018
1 answer
129 views

I have read through the samples and the docs trying to get the flat self-referencing data binding to work with the tree view, but I am not making good progress.

My application is using the MVVM design pattern. When I run my application, I do not get any data in the tree view, but my view model has fetched the data that I expect to see in the tree view. 

When I debug the application, the  class is called before the Loaded event handler has fired, passing it my uninitialized view model, which it can do nothing with. When that call completes, the Loaded event handler is called and the view model is initialized with the data for the tree view, but the converter is not called again.

 

I need some help trying to understand how I should be using this control, I am not getting it despite having read through your SDK docs and samples.

 

Thanks

-Sean

 

 

Martin Ivanov
Telerik team
 answered on 06 Aug 2018
9 answers
285 views

Hi Telerik,

 

I'm export my RadDiagram to Image with the appropriate functionnality, but I have an error (not systematically).

My code :

Private Function CreateStreamFromDiagram(diag As RadDiagram, rect As Windows.Rect) As MemoryStream
    If diag Is Nothing Then Return New MemoryStream({})
 
    Dim mem_stream As New MemoryStream()
 
    diag.ExportToImage(
        stream:=mem_stream,
        encoder:=New System.Windows.Media.Imaging.JpegBitmapEncoder(),
        enclosingBounds:=rect,
        returnImageSize:=rect.Size,
        backgroundBrush:=Windows.Media.Brushes.White,
        margin:=New Windows.Thickness(1),
        dpi:=DIAGRAM_IMG_DPI
    )
 
    Return mem_stream
End Function

 

When the method is called, sometimes, I have this error :

à System.Windows.Media.Imaging.WriteableBitmap.InitFromBitmapSource(BitmapSource source)
   Ã  System.Windows.Media.Imaging.WriteableBitmap..ctor(BitmapSource source)
   Ã  Telerik.Windows.Controls.Diagrams.BitmapUtils.CreateWriteableBitmap(UIElement element, Rect enclosingBounds, Size returnImageSize, Brush backgroundBrush, Thickness margin, Double dpi)
   Ã  Telerik.Windows.Controls.RadDiagram.CreateDiagramImage(Rect enclosingBounds, Size returnImageSize, Brush backgroundBrush, Thickness margin, Double dpi)
   Ã  Telerik.Windows.Controls.RadDiagram.ExportToImage(Stream stream, BitmapEncoder encoder, Nullable`1 enclosingBounds, Size returnImageSize, Brush backgroundBrush, Thickness margin, Double dpi)
   Ã  Portal_ViewModel.MirBuilder.PdfAReportItext7.CreateStreamFromDiagram(RadDiagram diag, Rect rect) dans C:\Users\ng707d2\Desktop\DEV\MAA_MIR_Builder_v2\Sources\WPFPortal\Portal_ViewModel\Mir_Builder\PDFGeneration\PdfAReportItext7.vb:ligne 1292
   Ã  Portal_ViewModel.MirBuilder.PdfAReportItext7.ExportInspectionDiagToImage(Single p_widthRedRectangle) dans C:\Users\ng707d2\Desktop\DEV\MAA_MIR_Builder_v2\Sources\WPFPortal\Portal_ViewModel\Mir_Builder\PDFGeneration\PdfAReportItext7.vb:ligne 1397
   Ã  Portal_ViewModel.MirBuilder.PdfAReportItext7.ExportPage() dans C:\Users\ng707d2\Desktop\DEV\MAA_MIR_Builder_v2\Sources\WPFPortal\Portal_ViewModel\Mir_Builder\PDFGeneration\PdfAReportItext7.vb:ligne 1360
   Ã  Portal_ViewModel.MirBuilder.PdfAReportItext7.ExportCurrentOnglet() dans C:\Users\ng707d2\Desktop\DEV\MAA_MIR_Builder_v2\Sources\WPFPortal\Portal_ViewModel\Mir_Builder\PDFGeneration\PdfAReportItext7.vb:ligne 446

 

Sometimes, the error is an OutOfMemoryException type, but sometimes, the error is "Unable to evaluate expression".

And others times, the error is not occurred...

 

Do you have any idea about this problem ?

Thank you.

 

Valentin.

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Aug 2018
1 answer
255 views
We are currently evaluating Telerik UI for WPF control, in particular 3d Charts. We have a few requirements that we are currently unable to find a easy way to accomplish using RadCartesianChart3D. Please suggest how we can:

  1. Draw a grid line at (X Y) = (0, 0)  ( A grid line that indicates the Z axis)?
  2. Do a texture mapping on the 3D surfaces?
    One approach was to use a Image Brush instead of Solid Color brush for defining the Default Visual Material group in the example. But it does not seem to work. I can attach the sample code we tried if needed.
  3. Text annotation on RadCartesianChart3D ? Examples would be highly appreciate.

Thanks

 

Martin Ivanov
Telerik team
 answered on 06 Aug 2018
0 answers
149 views

I'm using RadTreeView's drag drop feature to reorder/nest items.

The control has many features that I (drop preview line, TreeViewDragVisual, and tooltip).

However, I need to execute some complex reorder/nest/unnest logic for the actual drag/drop operation (guards, pre and post).

So far, I was able to implement my guards by binding the RadTreeViewItem.IsDropAllowed.

But have no idea how to run some code before and after a drag/drop.

 

My questions:

1. Is it possible to invoke a command for a drag/drop operation, instead of automatically manipulating the bound collection?

2. Which events do I listen to before and after (collection is modified) a drag/drop operation? DragStarted and DragEnded events have been marked obsolete.

 

And if there is a workaround (custom implementation of drag/drop), can I continue using the other features of RadTreeView (drop preview line, TreeViewDragVisual, and tooltip)?

 

Thanks

minchew

MC
Top achievements
Rank 1
 asked on 06 Aug 2018
0 answers
125 views

I am creating a RadCartesianChart3D with multiple series of data. I was looking at the documentation for the control, and I didn't see a way to include a legend for the graph.

Is there a way to add a legend to the graph that just has the series name and corresponding color?

Additionally, I want to have a few graphs that use a "Heatmap" legend. I've attached a sample image of the way I want the legend to work, but it is essentially a liner gradient with labeled intervals on the gradient. 

If there is an inbuilt way to include a Heatmap as the legend, I would like to know. Otherwise if someone has implemented a similar type of legend, how did you accomplish it?

Matthew
Top achievements
Rank 1
 asked on 03 Aug 2018
1 answer
920 views

Hello Telerik,

I want Rad.ComboBox to be edited, i.e. I want to be able to search and select an item inside the combobox and also in case I don't have an item inside the combo, I would like to be able to type the new value and be able to bind the new item to save later.

What happens right now is that when the item I am looking for is not in combobox, as soon as I leave the combo the value inside the combobox is lost!

My question is how can I keep the search and auto-complete ability inside the combobox and also be able to keep the typed value?

Please answer asap.

Best Regards

Kourosh

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Aug 2018
1 answer
138 views
When I explore the examples for the RadRichTextBoxRibbonUI, all visible text is hardcoded in English. Is there a localized or translated (in Dutch) example available so I don't have to manually translate and assign approx. 150 text strings?
Tanya
Telerik team
 answered on 03 Aug 2018
4 answers
268 views

Hi,

When a RadDocument is exported to docx file, page numbering doesn't work correctly. The total count and current page number is 1 on every page. When the same document is exported in pdf the numbering is fine... I'm using the code from you sample projects - CustomField class from CustomField_WPF used in TelerikEditorDemo_WPF project.

Tanya
Telerik team
 answered on 03 Aug 2018
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?