Telerik Forums
UI for WPF Forum
2 answers
399 views

RadMaskedTextInput fails on cut using shift-del.

Just tried your R3 2016 demo and it also throws what seems to be the same exception.

System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))

 

01.System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))
02.   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
03.   at System.Windows.Clipboard.Flush()
04.   at System.Windows.Clipboard.CriticalSetDataObject(Object data, Boolean copy)
05.   at System.Windows.Clipboard.SetDataInternal(String format, Object data)
06.   at System.Windows.Clipboard.SetText(String text, TextDataFormat format)
07.   at System.Windows.Clipboard.SetText(String text)
08.   at Telerik.Windows.Controls.RadMaskedInputBase.HandleCopySelected(TextMode mode)
09.   at Telerik.Windows.Controls.RadMaskedInputBase.HandleCutSelected()
10.   at Telerik.Windows.Controls.RadMaskedInputBase.HandleCut()
11.   at Telerik.Windows.Controls.RadMaskedInputBase.OnApplicationCut(Object sender, ExecutedRoutedEventArgs e)
12.   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
13.   at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
14.   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
15.   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
16.   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
17.   at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
18.   at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
19.   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
20.   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
21.   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
22.   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
23.   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
24.   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
25.   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
26.   at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
27.   at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
28.   at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
29.   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
30.   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
31.   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
32.   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
33.   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
34.   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
35.   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
36.   at System.Windows.Input.InputManager.ProcessStagingArea()
37.   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
38.   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
39.   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
40.   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
41.   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
42.   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
43.   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
44.   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
45.   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
46.   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
47.   at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
48.   at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)
49.   at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
50.   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
51.   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
52.   at System.Windows.Application.RunDispatcher(Object ignore)
53.   at System.Windows.Application.RunInternal(Window window)
54.   at System.Windows.Application.Run(Window window)
55.   at System.Windows.Application.Run()

 

 

Chad
Top achievements
Rank 1
 answered on 28 Sep 2016
3 answers
198 views

First of all sorry if this question is already answered or it is very dummy.

 

I was using several RadTabControls in my application, but I've reached a point that I need to use a view model istead of a RadTabItem and create them in codebehind on certain conditions for one of the RadTabCotrols.

There is other function that does run through every RadTabControl retrieving all the RadTabItems by looking at the Item property. But it happens that one of my RadTabControls has a custom viewModel, so the cast to RadTabItem fails.

I suppose that it is very logical to get the ViewModel from Items property when you have defined to have a viewmodel and want to run over all items, but I wonder if there is a generic way (accessor, list) of getting just the RadTabItem control that wraps the custom viewmodel and use the same method of running through all RadTabItems for all RadTabControls.

 

Thanks in advance.

 

David.

David
Top achievements
Rank 1
 answered on 28 Sep 2016
3 answers
120 views
Hello. In my application I need to do zooming in, zoming out and panning with mouse and without scrollbar. I've been trying to found about it in forums, but if I find something there then these are examples for Silverlight and use obsolete (old) versions of Telerik. Please give me an example for WPF of zooming in, zoming out and panning with mouse and without scrollbar for latest (newest) version of Telerik.
Dmitry
Top achievements
Rank 1
 answered on 28 Sep 2016
14 answers
483 views
Very annoying to have to manually remove all Telerik WPF references and add the newer version to every single project of mine everytime there is a new version of the WPF controls released. There should be an update utility like what Telerik WinForms is packaged with.
Ventsi
Telerik team
 answered on 28 Sep 2016
0 answers
95 views

Hello,

Is it possible to show just the recurrence dialog, without creating any scheduleview objects as well as bypassing the appointment dialog?

There is this: RadScheduleViewCommands.EditRecurrenceRule.Execute(null, scheduleview);

But i guess it requires the scheduleview object anyway?

I'd rather have something similar, but be able to pass an Appointment or RecurrenceRule objects directly.

M L
Top achievements
Rank 1
 asked on 28 Sep 2016
3 answers
135 views

Hi,  

  1.  I have Button in InlineUIContainer. After exporting with XamlFormatProvider I lose Button.Click. Can I have this to do something?
  2. Can I save CaretPosition after export? 
Vladimir
Top achievements
Rank 1
 answered on 28 Sep 2016
3 answers
413 views

Hello,

I am trying to implement a RadDataForm using a DatFormComboBoxField. Following this section of documentation: http://docs.telerik.com/devtools/wpf/controls/raddataform/how-to/raddatafor-edit-lookup-values-with-radcombobox

I have been unable to produce results. 

I stumbled across the ability to use an enum within a class to allow all of the enum's values to be combo box items. Sadly, as our combobox options will be changing based on our database, this won't be an effective solution. Are there any similar methods to add options to a combo box (dictionary, json object, etc)?

This has been a struggle for a few days now, any help is greatly appreciated...

Dilyan Traykov
Telerik team
 answered on 28 Sep 2016
6 answers
813 views
Hi, could you give me some assistance in how I can restyle the column header. I have the following code, however I am still getting a border around the columns and there is still a blank area to the left of the columns, basically I just want the columns to show with a header of #ffd4e4a5 with no borders;

<UserControl x:Class="GridUserControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             >
    <UserControl.Resources>
        <Style x:Key="GridViewHeaderRowStyle1" TargetType="{x:Type telerik:GridViewHeaderCell}">
            <Setter Property="Background"
                    Value="#FFD4E4A5" />
            <Setter Property="Foreground" Value="DarkGreen" />
            <Setter Property="BorderBrush"
                    Value="#FFD4E4A5" />
            <Setter Property="BorderThickness"
                    Value="0" />
        </Style>
        <Style x:Key="GridViewHeaderRowStyle2"
               TargetType="{x:Type telerik:GridViewHeaderRow}">
            <Setter Property="Background"
                    Value="#FFD4E4A5" />
            <Setter Property="Foreground"
                    Value="DarkGreen" />
            <Setter Property="BorderBrush"
                    Value="#FFD4E4A5" />
            <Setter Property="BorderThickness"
                    Value="0" />
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot"
          HorizontalAlignment="Stretch"
          VerticalAlignment="Stretch">
        <telerik:RadGridView HorizontalAlignment="Stretch"
                             VerticalAlignment="Stretch"
                             GroupPanelBackground="#FFD4E4A5"
                             ColumnBackground="#FFD4E4A5"
                             HeaderRowStyle="{DynamicResource GridViewHeaderRowStyle2}"
                              
                             >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Date sent"
                                            HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}"  />
                <telerik:GridViewDataColumn Header="Customer"
                                            HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}" />
                <telerik:GridViewDataColumn Header="Invoice Number"
                                            HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}" />
                <telerik:GridViewDataColumn Header="Description"
                                            HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}" />
                <telerik:GridViewDataColumn Header="Amount"
                                            HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}" />
                <telerik:GridViewDataColumn Header="Status"
                                            HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}" />
                <telerik:GridViewDataColumn Header="Action"
                                            HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>
Stefan
Telerik team
 answered on 28 Sep 2016
5 answers
105 views

I want to change the position  of two rows 

the itemsource is binding to Columns,   item is currentItem,

the code :

int index = Columns.IndexOf(item) - 1;

Columns.Remove(item);
Columns.Insert(index, item);

 

now  i must reset the source  and the UI refresh

Columns = Columns.ToList().OrderBy(t => t.column_order) as ObservableCollection<Column>

 

Is any way  tochange the position by not refresh ui?

Dilyan Traykov
Telerik team
 answered on 28 Sep 2016
1 answer
128 views

Is there a way to customize how selection works in the RadRichTextBox. We have an application where we would like to restrict certain AnnotationRanges from being selected. I am aware of the IsCopyable property on annotation ranges, but I am specifically looking for the ability to restrict selection as opposed to restricting copying. 

In addition to this, we make use of tables and when selecting the contents of a cell we would like to be able to restrict the selection to the cell contents and not allow the cell itself, the table row, or the table to be selected.

Is there any functionality that allows us to override this behaviour or see what selection is about to be made and change it before it is made?

Thanks.

Todor
Telerik team
 answered on 28 Sep 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?