If I designed with RadDiagramShape, I can Add/Remove RadDiagramShape in RadDiagram, though.
How can I Visible or Hidden Children nodes in RadDiagram when Node were clicked?
I made some source code for diagram like this:
public class NodeBase : HierarchicalNodeViewModel
{
private long id;
public long Id
{
get { return id; }
set
{
if (id != value)
{
id = value;
this.OnPropertyChanged("Id");
}
}
}
...(Omit)...
}
public class LinkBase : LinkViewModelBase<HierarchicalNodeViewModel>
{
private eLinkTypes linkType;
public eLinkTypes LinkType
{
get { return linkType; }
set
{
if (linkType != value)
{
linkType = value;
this.OnPropertyChanged("LinkType");
}
}
}
...(Omit)...
}
public class FlowChartManager : ObservableGraphSourceBase<NodeBase , LinkBase>
{
public FlowChartManager()
{
PopulateGraphSource();
}
public FlowChartManager PopulateGraphSource()
{
//Add Nodes
NodeBase processNode1 = new NodeBase ()
{
Position = new Point(10, 10),
Content = "Process 1",
}; base.InternalItems.Add(processNode1);
NodeBase processNode2_1 = new NodeBase ()
{
Position = new Point(100, 100),
Content = "Process 2-1",
};
NodeBase processNode2 = new NodeBase ()
{
Position = new Point(100, 100),
Content = "Process 2",
};processNode2 .Children.Add(processNode2_1);
base.InternalItems.Add(processNode2);
NodeBase processNode3 = new NodeBase ()
{
Position = new Point(200, 200),
Content = "Process 3",
}; base.InternalItems.Add(processNode3);
//Add Links
base.InternalLinks.Add(new LinkBase(processNode1, processNode2) { LinkType = eLinkTypes.None, TargetCapType = Telerik.Windows.Diagrams.Core.CapType.Arrow1Filled });
}

Hi,
I have code in this format:
LocalDataSourceProvider1.RowGroupDescriptions.Add(GetGroupDescription("ABC"));
LocalDataSourceProvider1.RowGroupDescriptions.Add(GetGroupDescription("DEF"));
LocalDataSourceProvider1.RowGroupDescriptions.Add(GetGroupDescription("XYZ"));
Now I have to add a Row, which is invisible to the user (I have to send that as an argument to a converter later).
Thanks in advance,
Srinivas M.
Good morning Telerik,
I am looking for advice on how to accomplish something.
I am working on an app that will allow separated parents to easily plot out who has their children and when. I am wanting to use Telerik's controls to visually display display something that looks like a combination between a Gannt view and a calendar. Do you have any suggestions on how I might go about that?
The Mockup shows something kind of like what I'd like to accomplish.
Hi,
I'm currently evaluating the RadFluidContentControl for our application, but have run into two issues. Basically, I just want to switch between the states as soon as the LargeContent is too large for the rendered area. The documentation says this is done automatically ("Alternatively, the control will hide the large content (and show the normal content) as soon as the available size is not enough to properly render the large content."). In my example, this doesn't really work. The normal content is only displayed if the large content is halfway clipped (via resizing the window with the mouse). The second issue is that the content is stretched to the full height of the window, although I would expect to just limit it to its minimum size if I set the Height to "Auto".
Here's my code:
<telerik:RadFluidContentControl Height="Auto"> <telerik:RadFluidContentControl.Content> <StackPanel Orientation="Vertical" Background="DeepSkyBlue"> <Grid Margin="0,0,0,5"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <DatePicker/> <TextBlock Grid.Column="1" Margin="9,0" VerticalAlignment="Center" Text="until" /> </Grid> <DatePicker /> </StackPanel> </telerik:RadFluidContentControl.Content> <telerik:RadFluidContentControl.LargeContent> <StackPanel Margin="0,0,0,2" Orientation="Horizontal" Background="GreenYellow"> <DatePicker Margin="3" /> <TextBlock Margin="3" VerticalAlignment="Center" Text="until" /> <DatePicker Margin="3" /> </StackPanel> </telerik:RadFluidContentControl.LargeContent> </telerik:RadFluidContentControl>
What am I doing wrong?
Hello,
I need to add connection points to a certain connection and i need to do it with a single click and without the 'ctrl' key pressed. I've tried the AddConnectionPoint method but is not giving us the expected behavior (apparently the points need to be added in some specific order). This is my code:
1.void Connection_MouseDown(object sender, MouseButtonEventArgs e)2.{3. RadDiagramConnection Connection = sender as RadDiagramConnection;4.5. var transformedPoint = this.diagram.GetTransformedPoint(Mouse.GetPosition(this.diagram));6.7. Connection.AddConnectionPoint(e.MouseDevice.GetPosition(this.diagram)); 8.}I've tried this aswell:
01.void Connection_MouseDown(object sender, MouseButtonEventArgs e)02.{03. RadDiagramConnection Connection = sender as RadDiagramConnection;04. 05. var transformedPoint = this.diagram.GetTransformedPoint(Mouse.GetPosition(this.diagram));06. Connection.AddConnectionPoint(e.MouseDevice.GetPosition(this.diagram));07. 08. IList<Point> connPoints = Connection.ConnectionPoints.OrderBy(c => c.X).OrderBy(c => c.Y).ToList();09. 10. Connection.ConnectionPoints.Clear();11. foreach (Point point in connPoints)12. {13. Connection.AddConnectionPoint(point);14. } 15.}When i start to make points with one single click, this happens (Attached image).
We need to add connection points the same way we do with they ctrl key pressed. But without the 'ctrl' key pressed.
Thank you
Hi,
I am trying to show a RadColumnSparkline within a TimeBar, but I haven't been able to achieve this.
I want to show some data per day like in the column visualization example, this is some sample code like the one that I am using:
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DateTime today = DateTime.Today; List<MyCost> data = new List<MyCost>() { new MyCost() { Cost = 1, MyDate=today }, new MyCost() { Cost = 2, MyDate= today.AddDays(1)}, new MyCost() { Cost = 3, MyDate=today.AddDays(2) }, new MyCost() { Cost = 4, MyDate=today.AddDays(3)}, new MyCost() { Cost = 5, MyDate=today.AddDays(4)}, }; this.DataContext = data; } } public class MyCost { public double Cost { get; set; } public DateTime MyDate { get; set; } }
<telerik:RadColumnSparkline x:Name="PART_SparkbarControl" HorizontalAlignment="Left" VerticalAlignment="Top" Height="48" Width="400" telerik:StyleManager.Theme="Office_Blue" ItemsSource="{Binding}" XValuePath="MyDate" YValuePath="Cost" />Lets say that the first date is 03/17/2016, so I want to show data from 03/17 to 03/21 with the values 1 to 5, I'd expect to see something like the first image but instead I get the bars like in the second image.
The data is not being shown in the desired date.
I am not sure if I am missing some configuration or what I am soing wrong.
We have a RadMap that uses the Bing provider. We want to allow our users to be able to toggle the map background on and off. How can we do this?
We have a toggle button for that, here is the (non-working) code:
private void ToggleMapBtn_Click(object sender, System.Windows.RoutedEventArgs e) { this.CustomerMap.Providers.Clear(); if (this.ToggleMapBtn.IsChecked == true) { this.CustomerMap.Provider = this.bingProvider; } else { this.CustomerMap.Provider = this.emptyProvider; } this.CustomerDataLayer.Refresh(); }