Telerik Forums
UI for WPF Forum
1 answer
125 views

Hi,

I'm trying to use your RichTextBoxEditor and I observe that when I'm inserting an image and I save my document as xaml, my image is save as rawdata and not as an UriSource...

Do you have a solution ?

Should I create a custom SaveAs Xaml ? Can I have the source code of this command (SaveCommand) ?

Tanya
Telerik team
 answered on 02 Dec 2022
1 answer
138 views

Hi, 

I'm currently trying to use RadSyntaxEditor in my solution but I cannot use my mouse to select a position in it.

I've got a TabControlItem containing some DockPanel. Most of them are TextBlock (Label) + TextBox (Value) or TextBlock (Label) + ComboBox (value) and the last is composed of a TextBlock (Still Label) and a RadSyntaxEditor.

It contains a TextDocument and use xmlTaggers.

Everything works except that I cannot click inside to select a position. I only can double-click to select a block of text and move it.

If I use mouse click inside or outside, the only way to go back inside is to use Tab to switch accross all other control...

When I'm inside, I can write, add tabulation, click enter, everything ! but only with keyboard. One click with the mouse and I have to use Tab to get back in.

Can you help me to resolve this ?

Florian
Top achievements
Rank 1
Iron
Iron
 answered on 02 Dec 2022
1 answer
120 views

This was reported by a user, so it could be a Windows issue.

The user says it was not doing this a month ago. We generate a template file for the user to fill. After saving they upload/import and it used to work OK.  Sometime over the last few weeks, users started to get the "File in use" error.

Google is of no use as it only brings back "file in use when trying to delete it" results.

Any ideas?

Is there an option that can be set in code to avoid this?

Nikolay Demirev
Telerik team
 answered on 02 Dec 2022
1 answer
185 views

I have a grid where some rows have a sub grid.  If the user clicks the row's toggle button, it shows the grid.

The problem happens if the user does anything on the page to show a modal. We do this by adding our dialog view to the outer region, then blocking. As soon as the block is called you can see it drops all columns of the grid but the first. The grid remains that way after you close the dialog. This is not limited to this view, I have found other places where we have a GridView in a row and it behaves the same when a modal is shown.

You can see this in the attachments.

Any help would be appreciated.

EDIT: added snippet showing dialog open

Ken
Top achievements
Rank 1
Iron
 answered on 01 Dec 2022
1 answer
333 views

Hi,

I tried to use RadSyntaxEditor with MVVM approach but I did not succeed.

I followed all tips you gave on the forum but it still doesn't respond to all my needs.

I try to create a custom dependency property and bound my textdocument (located in my view model) in it but the dependency property got the radsyntaxeditor object and not TextDocument or content in TextDocument.

With this solution I was able to initialize the value of the document in RadSyntaxEditor but the callback method was not able to capture modification in the content of the document. So when I do modificaton, I wasn't able to applied them in my TextDocument in VM.

Finally I use events DataContextChange to init and DocumentChangeContent to update mine but it's not MVVM approach...

Do you have some advice for me to succeed in the MVVM approach ?

Stenly
Telerik team
 answered on 01 Dec 2022
1 answer
249 views

Hi Telerik support team,

I’m strugling with filtering a special case in the wpf gridview. Let me explain..

 I’ve a mainViewModel with an ObservebleCollection of type SubViewModel. Each subViewModel is a row in the grid. In the subViewModel I’ve a float property which is bound to a column through a valueConverter. The float (a representation of millimeters in the metric system) gets converted to inches in the imperial system. Inches can contain characters which are not supported by float (like /, - etc.) That’s why I use a converter to change it into a string. The converter works correct, also the convert back. I get a correct float value setted in my subViewModel.

The issue I walk into is when I filter the column. The filter mechanism seems to set a value in a fieldFilterControlViewModel and I get an error when I filter.

Can I change this behaviour? I would be nice that the filtervalue gets through the convertBack first and then apply the filter. So a converter on the filter inputvalue. Or, filtering directly on the showed values in the grid would also be ok.

Please help me out of this.

Regards,

Daniel

Error:

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Value; DataItem='FieldFilterControlViewModel' (HashCode=31636323); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String') FormatException:'System.FormatException: Input value was not in a correct format.

   at Telerik.Windows.Controls.GridView.FieldFilterControlViewModel.set_Value(Object value)'
Martin Ivanov
Telerik team
 answered on 01 Dec 2022
1 answer
153 views

Hello Telerik team,

I`ve faced an issue with GridView. Once when I resize the column it throws NullReferenceException with the following stack trace

   at Telerik.Windows.Controls.GridView.GridViewHeaderCell.HeaderToResize(Object gripper)
   at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnColumnHeaderResize(Object sender, DragDeltaEventArgs e)
   at System.Windows.Controls.Primitives.DragDeltaEventArgs.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.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.Thumb.OnMouseMove(MouseEventArgs e)
   at System.Windows.UIElement.OnMouseMoveThunk(Object sender, MouseEventArgs e)
   at System.Windows.Input.MouseEventArgs.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.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.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at WpfApp1.App.Main()

Here is an example project to help you to reproduce this issue.

Steps to reproduce:

  1. Resize the "Phone" column to increase its size, do it far outside of the application window
  2. Resize the "Comments" column to increase its size, do it far outside of the application window
  3. Resize the "Description" column to increase its size, do it far outside of the application window
  4. Resize the "Name" column to increase its size, do it far outside of the application window

And at some moment the application should throw NullReferenceException.

Please look at this one or let me know if I did something wrong.

Martin Ivanov
Telerik team
 answered on 29 Nov 2022
1 answer
431 views

Hello,

I created the ColumnsVisibility attached property to the RadGridView.

When the user clicks the columns' header, I open a context menu that shows all the columns.

Then the user can show/hide the columns by updating the IsVisible property. I am interested to add a button to the left of the first columns header.

The new button will open the Context Menu instead of clicking the Column Header.

I need this functionality because if the users hides all the colums, then there is no header and he will not able to open the menu at all, which means the columns visibilty can't be restored.

I can't attach the property to the RadGridView itself because I have another menu there.

A better solution may be to add this attached property to another style of a control part in the RadGridView template.

I am wondering if there is another control in your template (under the GridViewColumnHeader).

 

At the end I need to open a context menu in the top of the RadGridView but in parallel to open a different ContextMenu when the user clicks and empty space in the rest of the RadGridView (middle/bottom).

Martin Ivanov
Telerik team
 answered on 25 Nov 2022
1 answer
184 views

We are looking to migrate to latest telerik ui for wpf. Could you please suggest on compatibility of framework with .net version.

currently we use .Net framework 4.6.2.

Stenly
Telerik team
 answered on 25 Nov 2022
1 answer
186 views

I would like to create a custom "control" that is a subclass of "RadTabItem" and use it as the default tab class.

I know I can tie into the AddingNewTab event and effect the Item property of the event args, but that would be a UI Element in the ViewModel (VM) of a MVVM and I would like to keep the UI element strictly in the UI code (not in the VM).

Is there some way to specify (perhaps via .Resources) the class for a new tab created by clicking the "+" in the RadTabbedWindow.

e.g.  something like the a "DefaultTab" element.

          <DefaultTab Type="{x:Type MyTabClass}"/>

of the below


<telerik:RadTabbedWindow x:Class="PickCart.Client.Zza.Desktop.Tabs.TabbedView" 
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                         xmlns:client="clr-namespace:PickCart.Client"
                         xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
                         Width="1024"
                         Height="800">
    <b:Interaction.Triggers>
        <b:EventTrigger EventName="AddingNewTab">
            <b:CallMethodAction TargetObject="{Binding}" MethodName="OnAddingNewTab"/>
        </b:EventTrigger>
    </b:Interaction.Triggers>
    <telerik:RadTabbedWindow.DataContext>
        <client:TabbedViewModel/>
    </telerik:RadTabbedWindow.DataContext>
    <telerik:RadTabbedWindow.Resources>
          <DefaultTab Type="{x:Type MyTabClass}"/>
    </telerik:RadTabbedWindow.Resources>
    <telerik:RadTabItem Header="Main" CloseButtonVisibility="Hidden">
        <TextBlock Text="This is the main tab" />
    </telerik:RadTabItem>
</telerik:RadTabbedWindow>

Dilyan Traykov
Telerik team
 answered on 24 Nov 2022
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?