Telerik Forums
UI for WPF Forum
5 answers
116 views

Hi,

I have an issue of when I click on a connector with text block content, the diagram control either selects the incorrect connector or does not select anything at all.  It appears a bit random but is quite repeatable.

I have attached a video of the first scenario: https://www.dropbox.com/s/i7wwxon7iqy6hr1/Telerik%20Diagram%20selection%20issue.mp4?dl=0

(Download video as the video may lose video quality)

In this video the middle connector is already selected.  I then click the connector on the far left and you will see the connector on the far right is selected instead.

Here is the sample code:

<Window x:Class="TelerikWpfApp1.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="800" Width="800">
    <Grid>
        <telerik:RadDiagram>
            <telerik:RadDiagramConnection
                StartPoint="100,100"
                EndPoint="100, 500"
                ConnectionType="Polyline"
                SourceConnectorPosition="Auto"
                StrokeThickness="2"  
                ToolTipService.IsEnabled="True"
                SourceCapType="Arrow1"
                TargetCapType="Arrow2"
                ZIndex="4">
                <telerik:RadDiagramConnection.Content>
                    <TextBlock Text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"     
                               Background="Yellow"
                           FontFamily="Arial"
                           FontSize="10"
                           Visibility="Visible"
                           FontWeight="Normal"                          
                           RenderTransformOrigin="0.5, 0.5"
                           Padding="0, 15, 0, 0">
                        <TextBlock.RenderTransform>
                            <RotateTransform Angle="90"/>
                        </TextBlock.RenderTransform>
                    </TextBlock>
                </telerik:RadDiagramConnection.Content>
            </telerik:RadDiagramConnection>
            <telerik:RadDiagramConnection
                StartPoint="140,100"
                EndPoint="140, 500"
                ConnectionType="Polyline"
                SourceConnectorPosition="Auto"
                StrokeThickness="2"  
                ToolTipService.IsEnabled="True"
                SourceCapType="Arrow1"
                TargetCapType="Arrow2"
                ZIndex="4">
                <telerik:RadDiagramConnection.Content>
                    <TextBlock Text="BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"                          
                           Background="Yellow"
                               FontFamily="Arial"
                           FontSize="10"
                           Visibility="Visible"
                           FontWeight="Normal"                          
                           RenderTransformOrigin="0.5, 0.5"
                           Padding="0, 15, 0, 0">
                        <TextBlock.RenderTransform>
                            <RotateTransform Angle="90"/>
                        </TextBlock.RenderTransform>
                    </TextBlock>
                </telerik:RadDiagramConnection.Content>
            </telerik:RadDiagramConnection>
            <telerik:RadDiagramConnection
                StartPoint="180,100"
                EndPoint="180, 500"
                ConnectionType="Polyline"
                SourceConnectorPosition="Auto"
                StrokeThickness="2"  
                ToolTipService.IsEnabled="True"
                SourceCapType="Arrow1"
                TargetCapType="Arrow2"
                ZIndex="4">
                <telerik:RadDiagramConnection.Content>
                    <TextBlock Text="CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"                          
                           Background="Yellow"
                               FontFamily="Arial"
                           FontSize="10"
                           Visibility="Visible"
                           FontWeight="Normal"                          
                           RenderTransformOrigin="0.5, 0.5"
                           Padding="0, 15, 0, 0">
                        <TextBlock.RenderTransform>
                            <RotateTransform Angle="90"/>
                        </TextBlock.RenderTransform>
                    </TextBlock>
                </telerik:RadDiagramConnection.Content>
            </telerik:RadDiagramConnection>
        </telerik:RadDiagram>
    </Grid>
</Window>

 

Is there a workaround for this?

 

 


Chris
Top achievements
Rank 1
 answered on 22 Aug 2016
2 answers
1.2K+ views

Hello, I am trying to restrict a floating window to be resized manually. In addition, I want a user control to fill out the space it needs and have the floating window adjust to its content. Is this possible?

My XAML:

   <telerik:RadDocking x:Name="radDocking" Height="1" Width="1">                 <telerik:RadSplitContainer InitialPosition="FloatingOnly" telerik:RadDocking.FloatingLocation="100,400"                                                                                telerik:RadDocking.FloatingSize="800,500">                     <telerik:RadPaneGroup>                         <telerik:RadPane x:Name="ScheduleControlPane" CanUserPin="False"  Header="Kontroll" Loaded="ScheduleControlPane_Loaded"                                                          IsHidden="{Binding Path=IsChecked, ElementName=ScheduleControlToggleButton, Converter={StaticResource invertedBooleanConverter}, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">                             <controlviews:ControlView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DataContext="{Binding ControlViewModel}"></controlviews:ControlView>                         </telerik:RadPane>                     </telerik:RadPaneGroup>                 </telerik:RadSplitContainer>             </telerik:RadDocking>

Tore
Top achievements
Rank 1
 answered on 22 Aug 2016
5 answers
566 views
Hi,

I am trying to create a hierarchical grid with both parent and child have the extra same number of columns. I would like to align the columns of the child grid with the parent grid when expanded. Is there a way to customize?

Thanks
Stefan
Telerik team
 answered on 22 Aug 2016
2 answers
172 views

Hello,

 

In my RadCartesianChart, i'm using the StepLineSeries class for my series.

In my software, I purpose to change the stroke type : Full Line, Dotted Line and Hyphen Line.

 

The serie style can be applicated in just one style :

I want to know if is it possible to have a serie (CustomStepLineSerie ??) with 2 or 3 style in an other same time ? I don't want to create other serie to fixe over it.

 

I attached differents files to illustrate my request.

 

Thank you !

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 22 Aug 2016
5 answers
356 views
Hi,
Can you provide example where it has multiple lineseries with maximum of two vertical axes, sharing X axis.
And having the ability to dynamically switch axes for line series. 
For example Three lineSeries A,B and C.
All A,B,C have veritcal axes default location set as Left.
I have button on my UI that lets user change axes location --from Left and Right. and Right to Left for each series.

Could not find any sample in Teleriks forum that does something similar. I tried to do this, but I seem to change the axes one time, second time it does not work. 
I created two axis one default 

<

 

 

telerik1:RadCartesianChart.VerticalAxis>

 

 

 

 

<telerik1:LinearAxis Name="LeftAxis" ElementBrush="DarkGreen"/>

 

 

 

 

</telerik1:RadCartesianChart.VerticalAxis>
and one additional axis as in sample

 

 

<

 

 

telerik1:RadCartesianChart.Resources>

 

 

 

 

<telerik1:LinearAxis HorizontalLocation="Right" Name="RightAxis" x:Key="additionalVerticalAxis" ElementBrush="Blue" FontWeight="Bold" />

 

 

 

 

</telerik1:RadCartesianChart.Resources>

 


In the code behind I try to switch a linerseries vertical axis back and forth using

 

 

if(yAxisType == YAxisType.Left){ //User picked left

 

lineSeries.VerticalAxis.Name =

 

string.Empty; //To pick the default one?

 

}

 

 

if(yAxisType == YAxisType.Right){//User picked right

 

lineSeries.VerticalAxis = View.TryFindResource("additionalVerticalAxis");

 

// _rightLinearAxis;

 

}


Problem seems to be that Line series A has range of 0-3, B has range of 90-100, if both are on vertical axis and Left Y Axis is ranging from 0-100. If I make B to right axis then Left axis is still from 0-100 instead of 0-3.
Same situation with Y axis also.

Any sample of dynamically swtiching Y axes would be perfect.

Thanks,
Martin Ivanov
Telerik team
 answered on 22 Aug 2016
2 answers
109 views

I was Wondering if there was a way to Activate rectangle selection on map without holding Shift key. like by pressing a toggle button and then click-moving the mouse on the map.

the actual scenario is using rectangle selection on a touch screen with no keyboard

Sayyed Hossein
Top achievements
Rank 1
 answered on 22 Aug 2016
1 answer
338 views

How can I make this work with the property grid?  I am using a property grid with automatically generated properties and on edit I want SelectedIndex1 and SelectedIndex2 to display a list of my available indexes for the user to choose from.

public class MyIndexSelector
{
    private readonly List<int> m_someList = new List<int> () {1, 2, 3};
    [Browsable (false)]
    public List<int> AvailableIndexes { get { return m_someList; } }
 
    //??[Telerik.Windows.Controls.Data.PropertyGrid.Editor (typeof (IndexEditorControl), Telerik.Windows.Controls.Data.PropertyGrid.EditorStyle.DropDown)]
    public int SelectedIndex1 { get; set; }
 
    //??[Telerik.Windows.Controls.Data.PropertyGrid.Editor (typeof (IndexEditorControl), Telerik.Windows.Controls.Data.PropertyGrid.EditorStyle.DropDown)]
    public int SelectedIndex2 { get; set; }
}

 

Dilyan Traykov
Telerik team
 answered on 19 Aug 2016
1 answer
112 views

first time set the ItemsSource then select one,the selecteditems's count is 1,

when reset the tilelist's ItemsSource,select one, the selecteditems count is 2,

        <telerik:RadTileList HorizontalAlignment="Left" ItemsSource="{Binding FpFieldDisplays,Mode=TwoWay}" SelectionMode="Multiple" VerticalAlignment="Top" SelectionChanged="RadTileList_SelectionChanged"/>
        <Button x:Name="button" Content="load" HorizontalAlignment="Left" Margin="385,271,0,0" VerticalAlignment="Top" Width="75" Click="button_Click"/>
        <Button x:Name="button_Copy" Content="count" HorizontalAlignment="Left" Margin="385,171,0,0" VerticalAlignment="Top" Width="75" Click="button1_Click"/>

 

backend

    /// </summary>
    public partial class MainWindow : Window
    {
        private vm vv = new vm();
        public MainWindow()
        {

            InitializeComponent();
            this.DataContext = vv;

        }


        private int cunt = 0;
        private void RadTileList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var tile = sender as Telerik.Windows.Controls.RadTileList;
            cunt = tile.SelectedItems.Count;
        }

        private void button_Click(object sender, RoutedEventArgs e)
        {
            vv.FpFieldDisplays = new ObservableCollection<itm>()
            {
                new itm() {Name ="21",value = "1" },
                new itm() {Name ="22",value = "2" },
                new itm() {Name ="21",value = "1" },
                new itm() {Name ="22",value = "2" },
                new itm() {Name ="21",value = "1" },
                new itm() {Name ="22",value = "2" },
                new itm() {Name ="21",value = "1" },
                new itm() {Name ="22",value = "2" },
                new itm() {Name ="23",value = "3" }
            };

        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show(cunt.ToString());
        }
    }
    public class vm : BindableBase
    {
        public vm()
        {
            FpFieldDisplays = new ObservableCollection<itm>()
            {
                new itm() {Name ="1",value = "1" },
                new itm() {Name ="2",value = "2" },
                new itm() {Name ="3",value = "3" }
            };

        }
        private ObservableCollection<itm> mFpFieldDisplays;
        public ObservableCollection<itm> FpFieldDisplays
        {
            get { return this.mFpFieldDisplays; }
            set { this.SetProperty(ref this.mFpFieldDisplays, value); }
        }

    }

    public class itm
    {
        public string Name { get; set; }
        public string value { get; set; }
    }

 

 

 

Dilyan Traykov
Telerik team
 answered on 19 Aug 2016
1 answer
130 views

Hello,

I am using RadTreeView and it's bind to an object (basically like in RadTreeView - Binding to object) with IsDragDropEnabled set to True. I use the following piece of code in XAML to define a structure

<Window.Resources>
    <sampleData:RadTreeViewSampleData x:Key="DataSource"/>
    <DataTemplate x:Key="Team">
        <TextBlock Text="{Binding Name}" />
    </DataTemplate>   
    <HierarchicalDataTemplate x:Key="Division" ItemTemplate="{StaticResource Team}"
           ItemsSource="{Binding Teams}">
        <TextBlock Text="{Binding Name}" />
    </HierarchicalDataTemplate>
    <HierarchicalDataTemplate x:Key="League" ItemTemplate="{StaticResource Division}"
           ItemsSource="{Binding Divisions}">
        <TextBlock Text="{Binding Name}" />
    </HierarchicalDataTemplate>
</Window.Resources>

 

I need to support

  1. reordering groups (reordering divisions),
  2. items in group (swapping Team I and Team II)  and
  3. moving the items from one group to another (moving Team II to Division B).

That is built-in and it works. I face other problems: 

  1. control allows nesting groups - if user drags Division B and puts it on Division A, Division B disappears. 
  2. the similar problem happens also with the lowest level (teams) 

 

Hopefully the description is clear enough. Thanks for your time and help.

 

Regards,

Tomas

Martin Ivanov
Telerik team
 answered on 19 Aug 2016
2 answers
265 views
Hi, 

I'm looking for a way to display week numbers in this field. Is it possible to do this in the current control version?

Thanks,
Sebastiano
Maxime
Top achievements
Rank 1
 answered on 19 Aug 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?