Telerik Forums
UI for WPF Forum
1 answer
616 views

I am seeing some significant performance problem when using implicit styles that are marked as resource (build action).

Opening a dialog takes 5 second when the xaml (fo ex: Telerik.Windows.Controls.Data.xaml) files are marked as resource for build action, if i mark them as page the dialog opens up in a second.

I am developing and add-in project, basically my project is being hosted inside another WPF application, because of that I do not have an App.xaml file. I am referencing to no xaml binaries and have added all the telerik xaml files to my project.

Because I do not have app.xaml I am merging the xaml files in my dialog window. Not sure if this will cause the performance issue.

<Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../../Themes/Custom/Common.xaml"/>
                <ResourceDictionary Source="../../Themes/Custom/RadTabControlStyle.xaml"/>
                <ResourceDictionary Source="../../Themes/Custom/RadButtonStyle.xaml"/>
                <ResourceDictionary Source="../../Themes/Custom/RadTimePickerStyle.xaml"/>
                <ResourceDictionary Source="../../Themes/Custom/RadMaskedNumericInputStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <conv:EnumDescriptionConverter x:Key="enumDescriptionConverter"/>
            <conv:EnumFilterConverter x:Key="enumFilterConverter"/>
            <conv:ReverseBooleanConverter x:Key="reverseBooleanConverter"/>
        </ResourceDictionary>
    </Window.Resources>

 


 

Masha
Telerik team
 answered on 30 Jun 2016
7 answers
195 views

Hi,

I'd like to know if it is possible to create a custom ScatterAreaSeries like the one shown in the attached image.

I'd like to indicate some point and only the area between the line and that point to be colored.

Thanks,

Alberto

Benny
Top achievements
Rank 1
 answered on 30 Jun 2016
1 answer
345 views
 For medium to larger size files (10k words to 100k words) I'm having trouble with performance. CPU usage is actually quite low, but the control is under performing the larger the files become.  For example:

 

I have a 10k word file. Search is lightning faster (fantastic), but replacing is horribly slow, ~10 inserts per second (this gets worse as the file grows). I've wrapped the replace process in a Begin and EndUndoGroup, but that seems a nominal improvement. (see pseudo-snippet below) 

I also have a 100k word file that is essentially unusable in the control. It is plain text, no images or extraneous formatting. It takes 1-5 seconds for keystrokes to register. I've throttled documentchanged event to 10 seconds. After importing the same document into the Telerik demo project (TelerikEditorDemo_WPF) I'm noticing the same performance issue. Again, cpu usage is quite low.

Is there any optimizations that can be done to help with these issues?

 

With UI virtualization is it normal to see 1G+ memory usage by opening up a ~100k word document (700KB file)?

My grid containing the control (row 1)...

<Grid.RowDefinitions>
            <RowDefinition
                Height="117" />
            <RowDefinition
                Height="*" />
            <RowDefinition               
                Height="20" />
        </Grid.RowDefinitions>

 

// Replace functionality below

Editor.BeginUndoGroup();

foreach (TextRange range in Results)

{

    RadDocument.Selection.Clear();                
    RadDocument.CaretPosition.MoveToPosition(range.StartPosition);
    RadDocument.Selection.AddSelectionStart(range.StartPosition);
    RadDocument.Selection.AddSelectionEnd(range.EndPosition);

    Editor.Insert(replaceText);

}

Editor.EndUndoGroup("Replace"); 

Petya
Telerik team
 answered on 29 Jun 2016
3 answers
446 views
Hi,

I want to use the VirtualizingWrapPanel for a thumbnail view (similar to the File explorer view) that I'm building. However the thumbnails that the panel holds will not all be of the same size. Now the problem I'm facing is that the VirtualizingWrapPanel requires me to specify the ItemWidth. I cannot provide the ItemWidth because the width of the thumbnails are not always the same.. Is there any way to provide something similar to "auto" for ItemWidth? Any suggestions?

Currently I'm using the WPF VirtualizingStackPanel and it seems to work great but I'm wasting a lot of UI space and therefore want to use VirtualizingWrapPanel instead.

Thank you,
Rajani.
Yoan
Telerik team
 answered on 29 Jun 2016
1 answer
172 views
Importing large-ish docx files that have been exported using the DocxFormatProvider hangs on provider.Import(stream);  The same document imported directly from word works fine. Exporting the document as html then importing works fine. Only when exporting as docx, then importing again does it hang.
 
Seems to either be an issue with a high number of spans or images as I can export and import documents of far greater size as long as it is plain text without a lot of embedded links.

 

Easy to replicate:

1) Create a new document, copy the contents of the wiki page https://en.wikipedia.org/wiki/Parthian_Empire (high number of formatting changes and images)

2) Paste into document and export to docx

3) Try to import

 

The exact same document created directly in word and imported to RadRTB imports fine (2-3 seconds)

Mihail
Telerik team
 answered on 29 Jun 2016
3 answers
126 views

It looks like the AutoBindBehavior doesn't handle the case where custom PropertyDefinitions are used, a PropertySetMode of Union or Intersection is used and an IEnumerable is assigned to the PropertyGrid.Item. This results in a Linq exception: Sequence contains no elements with the following callstack:

   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Telerik.Windows.Controls.Data.PropertyGrid.AutoBindBehavior.BindEditor(FrameworkElement editorElement, DependencyProperty property)
   at Telerik.Windows.Controls.Data.PropertyGrid.AutoBindBehavior.<>c__DisplayClass4.<OnUpdateBindingOnElementLoaded>b__0(Object s, RoutedEventArgs args)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()

Stefan
Telerik team
 answered on 29 Jun 2016
1 answer
370 views
Hello,

Due to project requirements for a big customer I need to bind entity framework 6 dbcontext directly to telerik controls, in this case to a radgridview control, so i need to use IQueryable instead of ObservableCollection also to perform filtering, sorting and so on.  

The point is that when I add, delete a customer from dbcontext, the radgridview don't refresh showing changes.  Also when I perform this operations directly in database, after refreshing dbcontext the radgridview not showing changes.

I tried to implement INotifyPropertyChanged and INotifyCollectionChanged in my view model but without success.  

Also I want to point out that due to mvvm pattern design I can't have code in mainwindow.xaml.cs.

Please, anyone can provide me a full example of how to achieve this? 

Thanks in advance.
Dilyan Traykov
Telerik team
 answered on 29 Jun 2016
10 answers
518 views
Hi, 
I have PDF files that contains of several pages but with only 2 MB more or less.
When the RadPdfViewer loads the document a OutOfMemoryException occured. 
CallStack: 

Insufficient memory to continue the execution of the program.

   at System.Windows.Media.Imaging.WriteableBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette)
   at Telerik.Windows.Media.Imaging.RadBitmap..ctor(Int32 width, Int32 height, Int32[] pixels)
   at Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.CreateImageSource(ResourceKey key, ImageSource source)
   at Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.ImageLoader_WorkCompleted(Object sender, WorkCompletedEventArgs e)
   at Telerik.Windows.Documents.Core.Utils.ResourceLoader.OnWorkCompleted(WorkCompletedEventArgs args)
   at Telerik.Windows.Documents.Core.Utils.ResourceLoader.Worker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
   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()
Tanya
Telerik team
 answered on 29 Jun 2016
3 answers
340 views

Hi everyone,

I want to make a control radDataGridView with toolbar not user control

In toolbar, buttons located like add/edit/delete/show group panel...etc.

how do i make it ?

thanks for your interest.

YoungKee
Top achievements
Rank 1
 answered on 29 Jun 2016
3 answers
131 views

hello,

I'm having a problem with my code

I wrote this code  in a userControl tag:

<UserControl

.

.

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

<Grid>

     <GridDefinitions>

         <RowDefinition Height="25" />

          <RowDefinition Height='*' />

       </GridDefinitions>

 

      <stackPannel Grid.Row="0">

         <lable/>

         <Button Content="Refresh" Command="{Binding RefreshCommand}"/>

       </StackPannel>

 

       <ScrollViewer Grid.Row="1">

          <StackPannel>

            <telerik:RadExpender IsExpender="True">

                  <telerik:RadGridView SelectionMode="Single" IsSyncrinizeWithCurrentItem="True" AutoGenerateColumns="True"  ItemsSource="{Binding SomeList1}"/>

            </telerik:RadExpender>

 

            <telerik:RadExpender IsExpender="True">
                  <telerik:RadGridView SelectionMode="Single" IsSyncrinizeWithCurrentItem="True" AutoGenerateColumns="True"  ItemsSource="{Binding SomeList2}"/>
            </telerik:RadExpender> 

 

            <telerik:RadExpender IsExpender="True">
                  <telerik:RadGridView SelectionMode="Single" IsSyncrinizeWithCurrentItem="True" AutoGenerateColumns="True"  ItemsSource="{Binding SomeList3}"/>
            </telerik:RadExpender> 

 

       </StackPannel>

      </ScrollViewer>

     </Grid>

  </UserControl>

 

the result is that my scroll view fill only about half of the screen instead of the whole screen, there is no problem with its width only its height is wrong.

funny thing that happen: at run time if I click on the first exdpender's button in order to set IsExpended to false

the scroll view suddenly get the right height and fill the whole area.

what is wrong with this code?

I tried change stackPannel to DouckPannel,Grid, set the height... 

how can I make the scrollview know it's height if I do not know the length of the ItemSource on each radexpender

thank you

 

Kiril Vandov
Telerik team
 answered on 29 Jun 2016
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
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?