Telerik Forums
UI for WPF Forum
0 answers
102 views

Sometimes when I paste a test intro en empty RadMaskedTextInput, the application crushes and the following error occurs:

 

FATAL Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

                at System.Text.StringBuilder.Remove(Int32 startIndex, Int32 length)

   at Telerik.Windows.Controls.RadMaskedTextInput.HandlePasteNoMask(Object value, Object& returnString)

   at Telerik.Windows.Controls.RadMaskedTextInput.HandlePasteOverride(Object value, Object& returnString)

   at Telerik.Windows.Controls.RadMaskedInputBase.HandlePaste()

   at Telerik.Windows.Controls.RadMaskedInputBase.OnApplicationPaste(Object sender, ExecutedRoutedEventArgs e)

   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)

   at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)

   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)

   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)

   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)

   at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)

   at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)

   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.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)

   at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)

   at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)

   at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)

   at System.Windows.Input.KeyEventArgs.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.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)

   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)

   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)

   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)

   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)


1 answer
137 views

Hi, 

I am using the RadSpreadsheet user control in WPF.

I am using 2 instances of this control in 2 different windows, with the same underlying Workbook such that modifications to the workbook in one control should be propagated to the other one. The idea is that one control offers a small preview of the workbook, while the second one is used in a separate window with extra-ribbon, formula bar... for more confortable editing (i.e enlarged view).

The problem is that changes from one spreadsheet control are not automatically reflected in the other "untouched" spreadsheet control. Changes are only reflected once I play with the display of the "untouched" spreadsheet control, such as changing the zoom level (via the status bar control) or clicking to change the current active sheet back and forth.

I was wondering if there is a function to force refreshing the radspreadsheet control so the display matches the underlying workbook.

I dont need to have the changes being reflected in real time, it would be enough to use such function to refresh the control used for preview once the larger window with the second control is closing.

Thanks

Laurent
Top achievements
Rank 1
Iron
 answered on 07 Sep 2023
0 answers
174 views

I am trying to apply the same `Margin` style to a lot of `RadWatermarkTextBox` controls by defining the `Margin` as a Style resource:

<Window.Resources>
    <Style TargetType="{x:Type telerik:RadWatermarkTextBox}">
        <Setter Property="Margin">
            <Setter.Value>
                <Thickness Bottom="{x:Static controls:Measurements.UnrelatedDistance}" />
            </Setter.Value>
        </Setter>
    </Style>
</Window.Resources>

Using the Style above makes the control look different compared to explicitly setting the `Margin` property for each control like below:

<telerik:RadWatermarkTextBox Text="Hello world">
    <telerik:RadWatermarkTextBox.Margin>
        <Thickness Bottom="{x:Static controls:Measurements.UnrelatedDistance}" />
    </telerik:RadWatermarkTextBox.Margin>
</telerik:RadWatermarkTextBox>

I am wondering what's the reason for this difference and how to use a Style resource to the make the control look like the way it does when explicitly setting the `Margin` property within the control.

Thank you.

Wizard6650
Top achievements
Rank 1
Iron
Iron
 asked on 05 Sep 2023
1 answer
144 views

Hello, 

I'm searching how to prevent a RadTileViewItem to automatically resize when switching to a different RadTabItem.

In our WPF application, we use the RadTabControl. The RadTabItems are dinamically created from user input. In a particular RadTabItem, I've include a RadTileView that is populated dinamically from ItemsSource.

The ContentChangeMode is set to Manual and I have a method managing it. It works well.

My problem is that when I maximize one item, its content switch to an editable control. The RadTileView is in a TabItem, so the user could click on an other Tab. When this occurs, all RadTileViewItems are refresh and them states are set to Restored. The RadTileViewItem I previously set to maximized is now Restored but his content is always linke to the "editable control".

My wish is to prevent this. The first solution possible is to block the MaximizedItem to set Restore state. Or second, when switching to Restore, force to set his state to NormalContent. These 2 solutions are OK for me.

 

Could someone help me or has an example of this?

Sorry if the question had already been posted, I didn't found someting.

And sorry for my poor english ;-)

 

Best regards

Dinko
Telerik team
 answered on 31 Aug 2023
1 answer
244 views

Hello,

I am developing an app for a Windows 10 Tablet that requires a picture to be taken.

I have set up a RadWebCam control, but when I open the settings menu on the tablet it takes 2-3 minutes of "Not Responding" before it loads the settings menu. Additionally it is very slow when adjusting the settings. The only reason I need the settings is for the Zoom control. Is it possible for me to change the zoom programmatically? I would like to add a +/- zoom button, but I cannot find anything on how to do this.

My second issue is that the app needs to run in portrait mode, but the camera is in horizontal mode. Is there any way I can change the rotation of the web cam? If I rotate the control it will rotate the bottom panel as well.

 

Martin Ivanov
Telerik team
 answered on 25 Aug 2023
1 answer
173 views

Hi Support team,

even if animation is disabled, the expander is still showing some sort of animation when Windows 11 theme is applied.

This can be reproduced with Telerik samples.

Is there a way to remove that animation entirely so that the content gets displayed immidiateley ?

François

Dinko
Telerik team
 answered on 24 Aug 2023
0 answers
187 views

Hey,

I'm looking to have a RadSyntaxEditor's horizontal scroll bar react to a trackpad or mouse wheel input.

Vertical scrolling works just fine, so I can hide the verticalscrollbar but I need to select the horizontal one to move horizontally.

Is there a way to set it for horizontal as well? Did I miss a setting somewhere?

I tried this solution : Horizontal Scrolling w/ Mouse Wheel/Trackpad in UI for WPF | Telerik Forums but it didn't work for me.

I don't know if it's because this solution is in a window and I'm in an usercontrol.

Thanks in advance !

Florian
Top achievements
Rank 1
Iron
Iron
 asked on 24 Aug 2023
7 answers
615 views

Hi,

I wanted to use "search as you type" functionality (http://docs.telerik.com/devtools/wpf/controls/radgridview/features/search-as-you-type.html) in a TreeListView, but looks like it doesn't work for it even though it's inherited from GridView.

I tried it on a new blank project and confirmed my suspicion:

<telerik:RadTreeListView ShowSearchPanel="True"/>

doesn't show a search panel, but 

<telerik:RadGridView ShowSearchPanel="True"/>

works without any issues.

Is this intended behaviour, or can we hope for a fix?

Thank you.

Joel
Top achievements
Rank 1
Iron
 answered on 24 Aug 2023
2 answers
173 views

Hello, 

I would like to remove all messages of radchat after inactivity.

I don't find how to remove all messages. Could you help me ?

Thanks

Thomas

Thomas
Top achievements
Rank 1
Iron
 answered on 22 Aug 2023
1 answer
404 views

Hello,

I followed your solution on this link to apply a string format on the Header of the column in the RadGridView:

https://www.telerik.com/forums/stringformat-not-working-for-gridviewdatacolumn-header

With this solution, if the bound property has a value "test", in the TextBlock.Text inside the header I will show "test 123" ("123" came from the StringFormat).

This solution works but I face a bug when I use it with another functionality. I have implemented a button that on click opens a ListBox on a ContextMenu to show/hide the RadGridViewColumns). See the following link:

https://www.telerik.com/forums/add-button-to-radgridview-column-header

The RadGridView.Columns are bound to the ListBox.

The ListBoxItem.Template has a Checkbox where the IsChecked property is bound to the Column visibility state and the Content property is bound to the Column header. 

If the Listbox is shown (by click on a button, the ListBox is displayed on a ContextMenu), the Header template is dissapeared from the GridViewDataColumn.Header and it is shown on the ListBoxItem. It likes the template is "moved".

If I put the DataTemplate on a resource with x:Shared=False then it still dissapears from the header and it appears twice on the ListBoxItem.

Note:

1. I tried to use the Header without a DataTemplate but I can't use a converter to append the "123" because I already have one converter that can't have other functionality.

2. My current workaround is to do the converter code and the text append on the code behind of the xaml. Then I can bind the xaml.cs String property to the GridViewDataColumn.Header and remove the DataTemplate. The problem with this solution is that I need to do this on each xaml, and cannot be set on a style. In addition, I don't want to use code behind at all.

3. Any workaround without using the DataTemplate will work for me. I can "live" with that problem if you help me solving this specific case because I usually don't use DataTemplates on headers at all.

4. If you can look at your code, I would appreciate if you can think how the DataTemplate is dissapeared. I think that you have a bug somewhere because a Binding should not remove a Template from your control.

The bug is the same as described in this post (screenshot attached)

https://www.telerik.com/forums/gridview-columns-headers-disappearing-after-binding-to-controlpanel

I need a workaround to display the complete text without DataTemplate, because the solution here of adding DataTemplate for all columns of the application is not aceptable. Maybe there is a way to trigger the Context on the ListBoxItem and changed the binding according to the content type?

Thank you,

Alex.

Martin Ivanov
Telerik team
 answered on 21 Aug 2023
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?