Hello! Team,
We have a WPF window in which we're using multiple RichTextBoxes (RTB). We encountered an object reference error while editing text in one of the rtb. Stack trace log attached.
Date Time : 2/27/2018 2:22:12 PM ,
User Name : XXXXXXXX,
NameSpace : Telerik.Windows.Documents.UI ,
Class Name : Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter ,
Method Name : UpdateCaretStyle ,
Exception Message : Object reference not set to an instance of an object. ,
Error Trace : at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretStyle()
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretSize()
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnCaretLocationChanged()
at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChangedActionInternal()
at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChanged()
at Telerik.Windows.Documents.DocumentPosition.OnLocationChanged(Boolean changesCursorInitialLocation)
at Telerik.Windows.Documents.DocumentPosition.CallOnPositionChanged(Boolean changesCursorInitialLocation)
at Telerik.Windows.Documents.Selection.MouseSelectionHandler.SetDocumentPosition(DocumentPosition documentPosition, Point position, Boolean moveToNextIfOutOfBox)
at Telerik.Windows.Documents.Selection.MouseSelectionHandler.RegisterDocumentMouseDown(Boolean ctrlPressed, Boolean shiftPressed, Point position, UIElement originalSource, SourceType source)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.HandleMouseLeftButtonDownOnPosition(Point position, UIElement originalSource, SourceType source)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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) Inner Exception:
SourceFilePath: c:\Builds\13\AppPath\App.xaml.cs
RTB configuration:
<
telerik:RadRichTextBox
x:Name
=
"txtContent"
IsFocusable
=
"True"
PreviewKeyDown
=
"txtContent_PreviewKeyDown"
AutomationProperties.AutomationId
=
"{Binding TagValue,StringFormat=Comment_{0},RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
BorderThickness
=
"0"
BorderBrush
=
"White"
IsSpellCheckingEnabled
=
"True"
DocumentInheritsDefaultStyleSettings
=
"True"
GotFocus
=
"txtContent_GotFocus"
LostFocus
=
"txtContent_LostFocus"
DocumentContentChanged
=
"txtContent_DocumentContentChanged"
HorizontalContentAlignment
=
"Left"
IsContextMenuEnabled
=
"True"
MouseLeave
=
"txtContent_MouseLeave"
PreviewMouseRightButtonDown
=
"txtContent_PreviewMouseRightButtonDown"
KeyDown
=
"txtContent_KeyDown"
Background
=
"Transparent"
FontFamily
=
"Georgia (Body)"
IsSelectionMiniToolBarEnabled
=
"False"
AcceptsReturn
=
"True"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
Tag
=
"{Binding TagValue}"
MouseMove
=
"txtContent_MouseMove"
>
</
telerik:RadRichTextBox
>
Another issue with this exception is that we're not able to isolate exact steps to reproduce the issue.
As is seen in the logs the exception is not coming from any of our custom methods, its coming from some inbuild dll method of telerik. So, please suggest what could be causing this issue.
Regards
Tushar
I have many merged cells (ex:B12:B17).
When I fill it a wrap text and it will resize the height to every rows in meged cell.
It will make many blank in cell.
May I ask how solve this problem?
thank you.
This can be seen in the examples, if you have a GridViewToggleRowDetailsColumn then you have a column with plus or minus in it for expanding/collapsing the row. The issue I'm having is that often the click is being missed as it seems you have to click exactly on the text, not just anywhere in the cell. I've seen you can make the details expand on selection, but I don't really want to do this, I'd rather the user clicks on the expansion cell.
Is there any way to make the whole of the cell clickable?
Interestingly enough I've noticed that the expansion for hierarchical grids is clickable anywhere, but because I've got multiple child details I wanted to have tabs.
(sender as RadNumericUpDown).MoveFocus(new TraversalRequest(System.Windows.Input.FocusNavigationDirection.Next));
e.Handled = true;
Any suggestions?
DateTimePicker ClockItemsSource doesn't show the time span 23:59:59 the Time popup shows upto 22:00:00
RadDateTimePickerObj.ClockItemsSource = new List<TimeSpan> {
new TimeSpan(0,0,0), new TimeSpan(1, 0, 0), new TimeSpan(2, 0, 0), new TimeSpan(3,0,0), new TimeSpan(4,0,0)
,new TimeSpan(5,0,0),new TimeSpan(6,0,0),new TimeSpan(7,0,0),new TimeSpan(8,0,0),new TimeSpan(9,0,0),new TimeSpan(10,0,0)
,new TimeSpan(11,0,0)
,new TimeSpan(12,0,0),new TimeSpan(13,0,0),new TimeSpan(14,0,0),new TimeSpan(15,0,0),new TimeSpan(16,0,0),new TimeSpan(17,0,0),new TimeSpan(18,0,0),new TimeSpan(19,0,0),
new TimeSpan(20,0,0),new TimeSpan(21,0,0),new TimeSpan(22,0,0),new TimeSpan(23,59,59)
};
Hi,
I am working on a large-scale WPF application using Telerik Controls and seeing a problem that my TextBox input is not being saved when I click my RadButton to save. The problem is tied to the fact that the TextBox never looses focus and I'm typing in an input and just clicking Save afterwards. Since the Textbox doesn't loose focus the property is never updated. I know that a possible fix is to add UpdateSourcetrigger=PropertyChanged to my TextBox's Binding but since I have this occurring all over the application, it would be hard to accomplish. I want a generic solution that allows me to save the content of my input even without having to tab out of the control.
Please advise possible solutions.
Thanks.
Here is wpf c# code on my MenuButton:
namespace Stream.WPF.Infrastructure.Controls
{
using System.Windows;
using System.Windows.Media;
using Telerik.Windows.Controls;
public class MenuButton : RadButton
{
public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
"ImageSource",
typeof(ImageSource),
typeof(MenuButton),
new UIPropertyMetadata(default(ImageSource)));
public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(
"Label",
typeof(string),
typeof(MenuButton));
public ImageSource ImageSource
{
get
{
return (ImageSource)this.GetValue(ImageSourceProperty);
}
set
{
this.SetValue(ImageSourceProperty, value);
}
}
public string Label
{
get
{
return (string)this.GetValue(LabelProperty);
}
set
{
this.SetValue(LabelProperty, value);
}
}
}
}
And in my XAML I am using it like this:
<customControls:MenuButton Grid.Column="1" Content="{x:Static resources:ProperNameResources.Overview}" Margin="30,2,30,2" Background="#005A8B"
Command="{Binding Owner.SelectedTourSheetViewModel.ShowOverviewCommand}"
Visibility="{Binding Owner.SelectedTourSheetViewModel.IsOverviewDisplayed, Converter={StaticResource InverseBoolToVisibilityConverter}}"/>
Hi all,
I've got a requirement to modify the styling of rich text that's pasted into my radrichtextbox. The following code works, but it hangs the UI when it's run on the main thread, and ClipboardEx.GetDocumentFromClipboard is unhappy when it's not run on the main thread ( something like this https://stackoverflow.com/questions/15913275/backgroundworker-and-clipboard )
Has anybody found a way around this?
private void EditorTextBoxCommandExecuting(object sender, CommandExecutingEventArgs e)
{
if (e.Command is PasteCommand)
{
DocumentFragment fragment = ClipboardEx
.GetDocumentFromClipboard(
"RadDocumentGUID"); //copy pasting from a RadRichTextBox, keep the paragraphs as they are
RemoveStylingFromFragment(fragment);
Editor.InsertFragment(fragment);
}
}
I am trying to show the calendar week of the selected week in the NavigationHeader. Until now i could not find any approach to do this.
Is there a possibility to show the calendar week in the NavigationHeader of a ScheduleView?
I'm trying to programatically remove a span element from a document like this:
span.Parent.Children.Remove(span);
This works, but it seems to mess with the formatting of the next span in the paragraph.
Has anybody come across this, or know of a workaround?