Telerik Forums
UI for WPF Forum
1 answer
138 views

I try to enable the SelectionMiniToolbar on the RichTextBox but it doesn't show up on selected text.

When it is turned on the external formatting buttons, like B/I/U with ToggleBold/Italic/Underlined() methods are freezing out with System.NullReferenceException.

When the toolbar is not enabled everything is working well.

I think I added every references, list is attached.

Looks like the toolbar didn't initialized properly, checking the richtextbox properties it is not null, just most of it's properties. (not sure it is the expected behaviour).

 

Message:

"Object reference not set to an instance of an object."

 

Stacktrace:

   at Telerik.Windows.Controls.RichTextBoxUI.SelectionMiniToolBar.ToggleBoldCommand_ToggleStateChanged(Object sender, StylePropertyChangedEventArgs`1 e)
   at Telerik.Windows.Documents.RichTextBoxCommands.ToggleCommandBase.OnToggleStateChanged(StylePropertyChangedEventArgs`1 e)
   at Telerik.Windows.Documents.RichTextBoxCommands.ToggleCommandBase.UpdateSpanStyle()
   at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.radRichTextBox_CurrentSpanStyleChanged(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Telerik.Windows.Controls.RadRichTextBox.OnCurrentSpanStyleChanged()
   at Telerik.Windows.Controls.RadRichTextBox.CurrentSpanStyle_PropertyValueChanged(Object sender, StylePropertyChangeEventArgs args)
   at Telerik.Windows.Documents.Model.DocumentElement.OnPropertyValueChanged(IStylePropertyDefinition propertyDefinition, Object oldValue, Object newValue)
   at Telerik.Windows.Documents.Model.Styles.StyleProperty`2.OnPropertyValueChanged(TValue oldValue, TValue newValue)
   at Telerik.Windows.Documents.Model.Styles.StyleProperty`2.CheckForValueChange(RadValueSource changedValueSource)
   at Telerik.Windows.Controls.RadRichTextBox.ToggleBold()
   at HeatGun.HeatGunMainWindow.RTB_Note_BoldButton_OnClick(Object sender, RoutedEventArgs e) in D:\Visual Studio Projects\Tegu Solutions\Heat Gun\WindowHeatGunMain\HeatGunMainWindow.xaml.cs:line 243
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at Telerik.Windows.Controls.RadToggleButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at Telerik.Windows.Controls.RadToggleButton.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   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.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   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.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, 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.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at HeatGun.App.Main()

Boby
Telerik team
 answered on 22 Dec 2017
1 answer
116 views

Hello,

 

My team is facing an issue related to the Property Grid component of the WPF, there is an object that has a property of type Point that is represeted as 123.34;1232.34 in the property grid, with a default point value it works however the set value event of the property is not fired when you try to change the value of the textbox, it seems that there is no 2 way binding.

This only happens to that property, so we are suspicious it is because of the type of the property.

 

Can you help us?

 

Thank you

Vladimir Stoyanov
Telerik team
 answered on 21 Dec 2017
2 answers
171 views

Hello,

I have a flexible sized GridView with a fixed bigger dataset (~50 columns * ~50 rows) and I am looking for any kind of more advanced scrolling behavior than the built in one (which is working well but not an option in my case).

So the layout size is bigger than the visible area and I would like to scroll (or pan-move?) easily inside the grid.

My ideas are 

1. Scrolling fluently both way by pressing the middle mouse button, like on a webpage for example.

2. The cells are in readonly mode, so clicking on a cell while moving the mouse maybe also can be a good option to substitute the scrollbar.

 

Do you have any easy solution for this question or maybe any other advice?

 

Tegu
Top achievements
Rank 1
 answered on 20 Dec 2017
2 answers
581 views

Hello,

My typical use case requires importing saved html into the editor. The problem I am having is that sometimes that HTML isn't always perfect and will not have a font family specified. This causes the editor to default to Verdana. For the life of me, I can't seem to figure out how to change that to be some other font. Can someone tell me where Verdana is set as the default font? I've tried setting pretty much every font property I can find, but it doesn't seem to matter when I do the html import.

Thanks!

-Tom

Tom
Top achievements
Rank 1
 answered on 20 Dec 2017
5 answers
181 views

Hi,

1) setting ExpressionEditor.Item = DataRow, the control show correct fields (Names and Types) but it is not working (the result preview is allway empty)

2) Is possible to force a result type? In example, I want a boolean expression.

3) String Functions appears in documentation images but not in real control, why?

Thanks,

marc.

Dilyan Traykov
Telerik team
 answered on 20 Dec 2017
9 answers
660 views

Hi,

How to get the cellborder focus rectangle (see attached) in the Telerik.Windows.Controls.RadSpreadsheet.ActiveWorksheet?

I tried this but this doesn't give the desired output:

View.sprSpecification.ActiveWorksheet
.Cells[rowIndex, colIndex]
.SetBorders(new CellBorders(new CellBorder(CellBorderStyle.Thin, ThemableColor.FromArgb(alfa: 255, red: 255, green: 0, blue: 0))));

 

I'm using Telerik 2017.2.614.45.NoXaml

 

Thanks,

Sri

Anna
Telerik team
 answered on 20 Dec 2017
1 answer
161 views

Dear Telerik Team,

I have problem how to change label and get list of legend in chart WPF. For detail Question please see the attached file.

 

Tq.

 

Dilyan Traykov
Telerik team
 answered on 19 Dec 2017
1 answer
143 views
Dear Sirs,

I work with RadVirtualGrid with DataProvider with which I would like to have a border on the entire row when it is selected, instead of having a border only on the cell.

Follows attached two files with images of what I would like to have and what I have now.
Dilyan Traykov
Telerik team
 answered on 19 Dec 2017
1 answer
212 views

Hello, I found a weird behavior with the trackball display when the chart is a bit large. Right now I'm displaying some statistics for a year worth of data, which demands a user scroll. I'm not using the Pan and Zoom as it adds complexity to the experience with the chart, so I'm just expanding the RadCartesianChart Width until it display all the data that I need to show, like this:

<ScrollViewer VerticalScrollBarVisibility="Disabled"
      HorizontalScrollBarVisibility="Auto"
      HorizontalAlignment="Stretch"
      VerticalAlignment="Stretch">
         <telerik:RadCartesianChart HorizontalAlignment="Left" Height="Auto"
                          Width="{Binding ItemsCount, Converter={StaticResource ChartBarSeriesCountToWidthConverter}}">
         </telerik:RadCartesianChart>
</ScrollViewer>

 

The problem is that, when I'm displaying the TrackBallInfoControl, and the Width of the Chart is higher than 15000 px, the Trackball control stops to move with the mouse and gets stuck at the 15000 px mark. The TrackBallLines are working fine, the problem only happens with the modal (tooltip) that is displayed.

The problem seems to be in the ChartTrackBallBehavior.

Why do you have such restriction, and how can I overcome it? Are there any workarounds for the RadCartesianChart and TrackBallInfoControl to make it work without facing this problem?

Thanks in advance

Martin Ivanov
Telerik team
 answered on 19 Dec 2017
3 answers
122 views
I am working on an application and using the Persistence Framework to save the settings of the Gridview I am using. I have the code from your demos in place and everything seems to work except I continue to get an InvalidCastException on the ColumnSortDescriptors when I save the seetings only in certain situations. If I group one column then save the settings the application will throw the exception, however, if I only change the sort of one column and save then everything saves perfectly and the exception is not thrown on the same line of code. Any help would be greatly appreciated. I will attach a picture of the exception to the post.
Vladimir Stoyanov
Telerik team
 answered on 19 Dec 2017
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?