Telerik Forums
UI for WPF Forum
2 answers
371 views

Hello.

I am now customizing the demo source for "DiagramDesignToolBox", a diagram program for WPF.
Here I am trying to customize the shape controls in the ToolBox to suit my needs and drag and drop them to display on the interface.
In my ToolBox of the program, I want to display only the shape controls as shown in the picture.
So, I added custom shape controls to the toolbox by referring to https://docs.telerik.com/devtools/wpf/controls/raddiagram/features/raddiagrams-drag-drop.
But here, all others can perform draw drop, but only one shape control (end shape) cannot accurately perform draw drop.
This is my code follow as:

- XAML:

<ListBox x:Name="xListBox" Grid.RowSpan="2" Grid.Column="2">
                    <ListBox.Resources>
                        <Style x:Key="DraggableContainerShape" TargetType="telerik:RadDiagramContainerShape">
                            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
                        </Style>
                        <Style x:Key="DraggableShapeStyle" TargetType="telerik:RadDiagramShape">
                            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
                        </Style>
                    </ListBox.Resources>
                    <telerik:RadDiagramShape Width="100"
                         Height="100"
                         Content="Start"
                         Geometry="{telerik:FlowChartShape ShapeType=StartShape}"
                         Style="{StaticResource DraggableShapeStyle}" />
                    <telerik:RadDiagramShape Width="100"
                         Height="100"
                         Content="Task"
                         Style="{StaticResource DraggableShapeStyle}" />
                    <telerik:RadDiagramShape Width="100"
                         Height="100"
                         Content="Gateway"
                         Geometry="{telerik:FlowChartShape ShapeType=DecisionShape}"
                         Style="{StaticResource DraggableShapeStyle}" />
                    <telerik:RadDiagramShape
                                Width="100" 
                                Height="100" 
                                Geometry="{telerik:CommonShape ShapeType=EllipseShape}" 
                                Style="{StaticResource DraggableShapeStyle}">
                        <telerik:RadDiagramShape.ContentTemplate>
                            <DataTemplate>
                                <Ellipse Width="50" 
                                        Height="50" 
                                        Fill="#FF333333"
                                        />
                            </DataTemplate>
                        </telerik:RadDiagramShape.ContentTemplate>
                    </telerik:RadDiagramShape>
                </ListBox>

- C#:

public Example()
{
            InitializeComponent();

            DragDropManager.AddDragInitializeHandler(xListBox, OnDragInitialize);
            service = diagram.ServiceLocator.GetService<ISerializationService>();
}

        private void OnDragInitialize(object sender, DragInitializeEventArgs args)
        {
            args.AllowedEffects = DragDropEffects.All;
            SerializationInfo serializaedInfo;
            if (args.OriginalSource is RadDiagramShape)
            {
                RadDiagramShape draggedShape = args.OriginalSource as RadDiagramShape;
                List<RadDiagramShape> shapes = new List<RadDiagramShape>();
                shapes.Add(draggedShape);
                serializaedInfo = SerializationService.Default.SerializeItems(shapes);

            }
            else
            {
                RadDiagramContainerShape draggedShape = args.OriginalSource as RadDiagramContainerShape;
                List<RadDiagramContainerShape> shapes = new List<RadDiagramContainerShape>();
                shapes.Add(draggedShape);
                serializaedInfo = SerializationService.Default.SerializeItems(shapes);

            }
            args.Data = serializaedInfo;
        }

Please help me.

mickey0109
Top achievements
Rank 1
Veteran
 answered on 13 Aug 2020
4 answers
333 views

Hallo,

I found only RadMap control for WinForms in NuGet? 

Where can I get the assembly/DLL of Telerik.Windows.Controls.Map for WPF?

 

Regards

T

 

Peter
Top achievements
Rank 1
Veteran
 answered on 13 Aug 2020
3 answers
395 views

How does one hide the back-button in Backstage ?

we have our own custom menu in there and have no need for the round "<" go-back button in the left side panel.

Thanks,

Barry

Dilyan Traykov
Telerik team
 answered on 13 Aug 2020
10 answers
1.9K+ views
I have done quite a bit of searching and I can't seem to find a solution for this. We have a GridView that is associated with a map. The application is an asset tracking application where users can see different assets in the grid (with some associated data). Here is what is required:

- Click once on a row and the map is zoomed to that single point (i have this working, using the SelectionChanged event)
- Click on the same row again and reset back to the full map.

The second bullet is what I am having a hard time with. I can't seem to just capture single clicks. Any ideas?
christer
Top achievements
Rank 1
 answered on 13 Aug 2020
1 answer
142 views

I have some controls structured like this:

 

<telerik:RadSplitContainer

     <telerik:RadSplitContainer

         <telerik:RadPane

               <CONTROL

 

When the RadPane is not active, two clicks are required to fire mousedown events in the control.

Is it possible to do this with just one Click?

 

For example the Control van be a RadExpander... two seperate clicks are required to expand it

 

I noticed the RadGridView activates and handles mousedown, with just one click for example when it is placed inside a RadPane

 

 

Martin Ivanov
Telerik team
 answered on 13 Aug 2020
3 answers
124 views
Hi, i create some Grid and I create more than 100 items and only 100 are shown, if i click on Install button once more (it just recreates the same items) all items are shown... where it is a problem? How can i attach the solution?
Dinko | Tech Support Engineer
Telerik team
 answered on 12 Aug 2020
3 answers
291 views

how do we set RadObservableCollection<T>.ShouldResetOnResumeNotifications to false?

there is no public constructor that allows for this and the property is readonly ...

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Aug 2020
1 answer
143 views

Hello.

I want to implement module that add "EndShape" on toolbox and dragdrop to diagram.

Help me.

Petar Mladenov
Telerik team
 answered on 12 Aug 2020
4 answers
303 views

Hi in our application we can enter on three different positions the same value via an autocomplete box. Unfortunately the Text is not align with all the other positions. I prepared a small example where you can test it. 

You can enter the value for Search Text in the Grid (via cell edit template) the First Tab and the Second tab at the bottom.You can see that if you enter similar text examples like Test, Test1, TestT and switch between them the value gets overwritten by the old value (First Tab: Test, Second Tab: Test1, Switch back to first tab => Test overwrites Test1) 

I hope you can reproduce this issue. We found a workaround at handling the binding at the lost focus event, but in my opinion this is a bug in the control. 

Thanks and Br,

Stefan

 

https://drive.google.com/file/d/1MEYAVatohcLog67PukJc2LHzXh_yvq4_/view?usp=sharing

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Aug 2020
3 answers
561 views

Hello,

I am facing some issues with the FileDialogs Controls in WPF:

When using the controls, none of their fields are recognized (for example, ExplorerControl has no Filter neither Multiselect member)

I created a simple WPF project with only the two following files, and added Assembly references to:

  • Telerik.Windows.Controls
  • Telerik.Windows.Controls.FileDialogs
  • Telerik.Windows.Controls.GridView
  • Telerik.Windows.Controls.Input
  • Telerik:Windows.Controls.Navigation
  • Telerik.Windows.Data

MainWindow.xaml:

<Window x:Class="TelerikTest.MainWindow"
        xmlns:fileDialogs="clr-namespace:Telerik.Windows.Controls.FileDialogs;assembly=Telerik.Windows.Controls.FileDialogs"
        mc:Ignorable="d"
        d:DesignHeight="300"
        d:DesignWidth="300">
    <Grid>
        <fileDialogs:ExplorerControl    x:Name="explorer"/>
    </Grid>
</Window>

 

MainWindow.xaml.cs:

using System.Windows;
using System.Windows.Controls;
 
namespace TelerikTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}

 

And when trying to run it, I get this exception:

System.ArgumentNullException: 'Value cannot be null. Parameter name: source'

This exception was originally thrown at this call stack:
    System.Linq.Enumerable.OfType<TResult>(System.Collections.IEnumerable)
    Telerik.Windows.Controls.FileDialogs.ExplorerControl.MainNavigationPaneLoaded(object, System.Windows.RoutedEventArgs)
    System.Windows.RoutedEventHandlerInfo.InvokeHandler(object, System.Windows.RoutedEventArgs)
    System.Windows.EventRoute.InvokeHandlersImpl(object, System.Windows.RoutedEventArgs, bool)
    System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
    System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)
    System.Windows.BroadcastEventHelper.BroadcastEvent(System.Windows.DependencyObject, System.Windows.RoutedEvent)
    System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(object)
    MS.Internal.LoadedOrUnloadedOperation.DoWork()
    System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
    ...
    [Call Stack Truncated]

Thanks in advance for your reply

Note: I have no issue with direct call to FileDialog dialogs, the following code works:

new RadOpenFileDialog().ShowDialog();
Dilyan Traykov
Telerik team
 answered on 11 Aug 2020
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?