Telerik Forums
UI for WPF Forum
1 answer
262 views

Hello,

I am using Telerik UI for WPF 5.0 version 2021.3.1109 (NoXAML version) in Visual Studio 16.11.17.

My problem is that the WPF UI designer does not display the telerik RadWindows I design. The error message is:

XDG0062 The resource "RadWindowStyle" could not be resolved.

I already followed the instructions given in this KB article. This article especially mentions to include the following XAML in my RadWindows, but that did not solve my problem:

<telerik:RadWindow (namespaces omitted) ... Style="{StaticResource RadWindowStyle}"/> 

In my Application file, I have a Style declaration like this:

<ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/System.Windows.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Input.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.FileDialogs.xaml"/>
                <ResourceDictionary>
                    <Style TargetType="views:MainWindow" BasedOn="{StaticResource RadWindowStyle}" />
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

In the application file, I do not get the above error message (XDG0062).

So I concluded that somehow, my Window classes (e.g. MainWindow) don't receive the declared styles.

Important: I have setup my project as a Console Project (because I must implement a CLI and this was the easiest way). The UI is started with the following C# lines of code in Program.cs:

Application app = new Appl();
app.Run();
Type Appl is my WPF Application XAML.
The application runs fine when started but it would be great to use the XAML designer in VS as intended. Can you please provide some help?
Philipp
Top achievements
Rank 1
Iron
 answered on 05 Dec 2022
1 answer
137 views
How do you programmatically close a tab in TabbedWindow?
Stenly
Telerik team
 answered on 05 Dec 2022
1 answer
237 views

We have a RadListBox bound to a ObservableCollection of models.  We would like sort them based on a property.  The property value can also change.  Is there any way to sort them?

What we are trying to do is create a "mover" to rank items, is a RadListBox not the best choice?

Martin Ivanov
Telerik team
 answered on 02 Dec 2022
1 answer
115 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
129 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
110 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
176 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
321 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
238 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
143 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
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?