Telerik Forums
UI for WPF Forum
5 answers
118 views

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

Martin Ivanov
Telerik team
 answered on 22 Jun 2018
1 answer
90 views

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.

Martin Ivanov
Telerik team
 answered on 22 Jun 2018
1 answer
109 views

SortDescriptor icon is not coming during the loading of the GridViewcolumn.

 

Martin
Telerik team
 answered on 22 Jun 2018
1 answer
857 views

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

Martin Ivanov
Telerik team
 answered on 22 Jun 2018
1 answer
42 views

AddLink works very slow. 

what to do to improve the performance?

Martin Ivanov
Telerik team
 answered on 22 Jun 2018
3 answers
148 views

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

Martin Ivanov
Telerik team
 answered on 22 Jun 2018
4 answers
130 views

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.

Petar Mladenov
Telerik team
 answered on 22 Jun 2018
11 answers
250 views

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

 

Paul
Top achievements
Rank 1
Iron
 answered on 22 Jun 2018
2 answers
223 views
Hello,

we're currently using VS2015 and the latest Telerik WPF controls (no XAML). Our project is made with MVVM in mind.
When creating a DataForm and adding some DataForm checkbox controls there seems to be a problem when changing the "checked" state.
After the DataForm is active and a checkbox control is checked the "ok" button of the DataForm doesn't get enabled. But when adding a textbox to the DataForm and the text got changed the "ok" button is getting enabled immediately.
Is there something that needs be set in the DataForm so that the checkboxes work correctly? It looks like the INotifyPropertyChanged doesn't get fired with checkboxes.

Thank you in advance for your help.

Best Regards,
Thomas
Thomas
Top achievements
Rank 1
Iron
 answered on 21 Jun 2018
2 answers
719 views
Hello,

we're currently using VS2015 and the latest Telerik WPF controls (no XAML). Our project is made with MVVM in mind.
What is the right way of changing the "Tab Item" style? We tried to change the style but this doesn't seem to work as the changes are not applied. Then we tried to create a new DataTemplate which also doesn't work the way we expected it.

Our RadTabControl is set to show the tabs on the left side and we're using the Office2016 template at the moment.

We just want to change three things:

1. Set the text align to left
2. Add more "inner space" (padding) around the text
3. Change the background color of the "Tab Item" (header) to a specific color and also change the hover and selected color of the tab.

How can we change that? Is it only possible to locate the information in the template XAML files an copy all the stuff over and change it or is there a simpler method for this?

Thank you in advance for your help.

Best Regards,
Thomas
Thomas
Top achievements
Rank 1
Iron
 answered on 21 Jun 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?