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");
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)
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()
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.
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