As of 2024 Q4 (November), we will deprecate the .NET 7 distribution. This decision is rooted in our dedication to align with Microsoft’s recommended framework versions so that our products leverage the latest advancements in technology, security, and performance.
We are aligning our product with Microsoft’s lowest-supported framework versions for .NET Framework and .NET, respectively. Please refer to the following blog post: Product Update for Enhanced Performance and Security
For more information about how to upgrade your project when a new version of the Telerik UI for WPF suite is released, you can check here: Project Migration to .NET 4.6.2 and .NET 6
As of 2024 Q2, we will deprecate .NET Framework 4.0, .NET Framework 4.5, and .NET Core 3.1 distributions. This decision is rooted in our dedication to align with Microsoft’s recommended framework versions so that our products leverage the latest advancements in technology, security, and performance.
We are aligning our product with Microsoft’s lowest-supported framework versions for .NET Framework and .NET, respectively. Please refer to the following blog post:
Product Update for Enhanced Performance and Security (telerik.com)
For more information about how to upgrade your project's .NET Framework version, you can check the following MSDN article:
Migration Guide to .NET Framework 4.8, 4.7, and 4.6.2 - .NET Framework | Microsoft Learn
Hello
Question about ===> public ControlTemplate SeparatorTemplateKey {get;set}
I don't know how to use (public ControlTemplate SeparatorTemplateKey {get;set}
<
Window.Resources
>
<
ControlTemplate
x:Key
=
"SeparatorTemplate"
TargetType
=
"telerik:RadMenuItem"
>
<
Grid
HorizontalAlignment
=
"Stretch"
>
<
Rectangle
Fill
=
"Red"
Height
=
"20"
Width
=
"1"
VerticalAlignment
=
"Stretch"
/>
<
Rectangle
Fill
=
"Blue"
Height
=
"20"
Width
=
"1"
VerticalAlignment
=
"Stretch"
/>
</
Grid
>
</
ControlTemplate
>
</
Window.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
telerik:RadMenu
x:Name
=
"radMenu"
ClickToOpen
=
"False"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Margin
=
"8,8,0,0"
>
<
telerik:RadMenuItem
Header
=
"File"
/>
<
telerik:RadMenuItem
Header
=
"Edit"
IsSeparator
=
"True"
Template
=
"{StaticResource SeparatorTemplate}"
/>
<
telerik:RadMenuItem
Header
=
"View"
/>
</
telerik:RadMenu
>
</
Grid
>
--------
using System.Windows.Controls;
public override ObservableCollection<MenuItem> GetMenu()
{
var contextmenuitem = new ObservableCollection<MenuItem>();
var eRNode = crateMenuItem("Report");
eRNode.Items.Add(createMenuItem("Sub"));
contextmenuitem.Add(Separate); <===
ControlTemplate template = new ControlTemplate();
template.key = "Tamplate";
contextmenuitem.Add(SeparatorTemplateKey(template)); <===ControlTemplate x:Key="Template" OF XAML.xaml File .... <==I don't know grammar. How do I write code?
contextmenuitem.Add(eRNode);
}
17>[Telerik and Kendo UI Licensing]
17> Telerik and Kendo UI License Key found at: C:\Users\joe\AppData\Roaming\Telerik\telerik-license.txt (UserDirectory)
17> License issued at 2025-02-25 to j*******@g*******.com.
17>[Telerik and Kendo UI Licensing]
I'm looking for a generic solution for handling a common issue with RadNumericUpDown. When binding the Value property to a double (non-nullable) and the user clears the input (e.g., with Backspace), the control throws a "value cannot be converted" error.
I'm aware that changing the bound property to a double? would resolve this, but in my case, this is not feasible across the entire application due to the extensive refactoring it would require in legacy code.
As a senior WPF developer, I prefer generic solutions that can be applied globally—such as using an attached property via styles—so the fix can be inherited by all RadNumericUpDown instances.
I've considered using FallbackValue or TargetNullValue, but these aren't suitable as they require changes to each individual binding and would assign a default value, which is not ideal.
Since the value in the ViewModel doesn't actually change when the conversion fails, it seems reasonable to simply suppress the error and let the control revert to the source value.
Is there a way to implement an attached property that can detect this conversion failure and handle it gracefully—possibly by resetting the control’s value to the bound property from the DataContext?
Any suggestions or sample code would be greatly appreciated.
Thanks!
WPF, RadContextMenu
Is there a way to display different colors in the RadContextMenu ?
Display RadContextMenu various colors based on the Separator of RadContextMenu.
In RadContextMenu,
Also, can you set the image margin(or icon margin) to 0?
Please check the attached file : RadContextMenu2WPF.png, RadContextMenu1WPF.png
Hi Team,
We have developer license for the Telerik UI for WPF product, however we are unable to get the developer MSI for the Telerik UI for WPF 2024.1.130.45. Only the trial version is visible now.
Could you please guide us to get the dev version of 2024.1.130.45?
Hello Telerik Team,
I'm working with the RadDiagram control and have a scenario where I need certain RadDiagramShapes to display their AdditionalContent persistently – meaning the content should remain visible even when the shape is not selected. Additionally, I want to achieve this behavior and customize the AdditionalContent's styling purely through MVVM binding approaches.
Could you please provide guidance or code examples demonstrating:
Any suggestions for binding strategies or relevant Shape/Style properties would be greatly appreciated. Thank you!
Hi,
I tried to combine the 2 telerik examples related to RadTreeviews - the RadTreeView as File Explorer and that from SDK repo related to drag and drop between 2 Radtreeview.
I finally succeeded to make an working short program, but I don't know why by dragging a file from one tree to another, the UI of the second tree shows the dropped file twice - even the Tree ItemsSource is correct (only one file dragged and dropped)
after Puplating the trees,I used DragDropMAnager and the following classes (as they are defined in telerik example, adapted to files/folder structure)
DragDropManager.AddDragOverHandler(this.tree1, OnTree1DragOver, true);
DragDropManager.AddDragOverHandler(this.tree2, OnTree2DragOver, true);
DragDropManager.AddDropHandler(this.tree2, OnTree2Drop, true);
My OnTree2DragOver function:
var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
if (options == null)
return;
// The condition after the first OR operator is needed to deny the drop of items in Application File. (sub-items)
RadTreeViewItem dropTargetItem = options.DropTargetItem;
var draggedItem = options.DraggedItems.First();
if (dropTargetItem == null ||
(dropTargetItem != null &&
options.DropTargetItem.DataContext is File &&
options.DropPosition == DropPosition.Inside) ||
draggedItem is Folder)
{
options.DropAction = DropAction.None;
}
options.UpdateDragVisual();
my OnTree2Drop function is:
var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
if (options == null)
return;
File draggedItem = options.DraggedItems.FirstOrDefault() as File;
if (draggedItem == null)
return;
RadTreeViewItem dropTargetItem = options.DropTargetItem;
if (dropTargetItem == null)
return;
var dropItemModel = dropTargetItem.DataContext;
if (dropItemModel == null)
return;
var dropTree = sender as RadTreeView;
if (dropTree != null)
{
// Disable drop in tree2 File.
if (dropItemModel is File && options.DropAction == DropAction.None)
{
e.Handled = true;
return;
}
//Drop in tree2
if (dropItemModel is Folder || dropItemModel is File)
{
options.DropAction = DropAction.Copy;
//options.UpdateDragVisual();
Folder destinationFolder = null;
if (dropItemModel is Folder)
{
// Dropping inside Application.
destinationFolder = dropItemModel as Folder;
}
else
{
// Dropping Before or After an Application Resource.
destinationFolder = options.DropTargetItem.ParentItem.DataContext as Folder;
}
if (destinationFolder == null)
{
return;
}
File file = new File()
{
Name = draggedItem.Name
};
destinationFolder.Items.Add(file);
//options.UpdateDragVisual();
System.IO.File.Copy(@draggedItem.FullPath, System.IO.Path.Combine(@destinationFolder.FullPath, System.IO.Path.GetFileName(@draggedItem.FullPath)));
options.UpdateDragVisual();
My OnTree1DragOver:
var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
if (options != null)
{
options.DropAction = DropAction.None;
options.UpdateDragVisual();
var draggedFile = options.DraggedItems.First() as File;
e.Handled = true;
}
In the attached picture you'll see Adeliatte Italic.ttf twice, even I dragged and drpped it only once.
Could you please take a short look and tell me what I'm doing wrong?
Or, if it is not too much time consuming for you to come back with an example of 2 treeviews acting as explorer and with d&d functionality?
Thank you in advance for your support.
Danny