Hi,
My application it's using the diagram and i needed to override the SelectAll() command since i have a special shape in the diagram i dont want to get deleted. This is the first shape added to the diagram. So diagram.Items[0].
I've created the newbinding as follows
var controlAllBinding = new CommandBinding(DiagramCommands.SelectAll, OnSelectAllExecute, OnCanSelect); CommandManager.RegisterClassCommandBinding(typeof(PatternDiagram), controlAllBinding);
And the implementation
private static void OnSelectAllExecute(object sender, ExecutedRoutedEventArgs e)
{
var diagram = (sender as PatternDiagram);
diagram.SelectAll();
(diagram.Items[0] as RadDiagramShape).IsSelected = false; //This works
(diagram.Items[1] as RadDiagramShape).IsSelected = false; //This works
}
private static void OnCanSelect(object sender, CanExecuteRoutedEventArgs e)
{
e.canExecute = true;
e.Handled = true;
}
However there are a few other items that are not RadDiagramShapes but they inherited from it (ProductShape : RadDiagramShape), there are 2 kinds of this products, the ones that are enabled and the ones that are disabled using the IsEnabled property.
So:
- 2 RadDiagramShapes (Rectangles) [CANNOT BE DELETED]
- 3 ProductShapes (IsEnabled = true) [SHOULD BE DELETED AND SELECTABLE]
- 3 ProductShapes (IsEnabled = false) [SHOULD NOT BE DELETED]
If i try to use a foreach inside the diagram.Items or diagram.SelectedItems and after that i try to check which ones are disabled and when i get them i try to use IsSelected = false (because i dont want them to be selected or deleted) it is not working.
I've tried to modify CanSelect, SelectAll, CanDelete, DeleteExecute, PreviewSelectionChange, SelectionChange with no luck.
Is there maybe about the ProductShape class that is not working? The class only has 2 properties and a predefined style.
Is there any way i can achieve this?
Thanks
Trying to migrate from RadDragAndDropManager to DragDropManager.
Below is my existing code :
RadDragAndDropManager.AddDragQueryHandler(this.gvDocumentToAttach, OnDragQuery);
RadDragAndDropManager.AddDragInfoHandler(this.gvDocumentToAttach, this.OnDragInfo);
private void OnDragQuery(object sender, DragDropQueryEventArgs e)
{ e.QueryResult = true; e.Handled = true; }
private void OnDragInfo(object sender, DragDropEventArgs e) {
IEnumerable draggedItems = e.Options.Payload as IEnumerable;
if (e.Options.Status == DragStatus.DragInProgress)
{ TreeListViewDragCue cue = new TreeListViewDragCue();
cue.ItemsSource = draggedItems;
e.Options.DragCue = cue; } }
Wanted to know the corresponding options available in DragDropManager.
SortDescriptor icon is not coming during the loading of the GridViewcolumn.
Hi,
I am able to create and run WPF applications using Telerik just fine, but when I run one through a 3rd party application launcher (Bloomberg) I am getting a XmlParseException saying "The invocation of the constructor on type 'Telerik.Windows.Controls.RadChart' that matches the specific.."
The inner exception is a SecurityException. I am guessing the 3rd party interferes but I am wondering if there's anything I can do to get around this with how I use or where I place the telerik .dlls?
Thanks,
Fredrik
AddLink works very slow.
what to do to improve the performance?
Good morning,
In an application we have multiple RadRibbonView, I want to know if it's possible to create the Backstage control as UserControl and attach it to any of our RadRibbonView.
Thanks
Hi,
The RadOpenFolderDialog looks like a nice replacement for the FolderBrowseDialog but you cant create folders? Is that something that is planned for the future?
cheers,
Simeon.
Hello,
how can I set the color variation of the new Office2016 theme to Colorful, Black or Light?
For other themes I can use something like:
VisualStudio2013Palette.LoadPreset(VisualStudio2013Palette.ColorVariation.Blue);
But the LoadPreset() is not available for Office2016.
Greetings
Raul