Telerik Forums
UI for WPF Forum
4 answers
241 views

There is a comment in  Example.xaml file which clearly summarizes what I am trying to.

This file is included in the attach zip file.

Iam having trouble finding and easy way to plot multiple scatter spline lines in a scattor plot.

I am using version 4.5  telerick controls , and specifically the telerik:RadCartesianChart

I gutted out the galley scatter example code in the terlerik examples wpf source project into a simple WPF project.

The project in the example uses telerik:LinearAxis which requires a dependency objext and a half million other things that is needed in this project.

The WPF project just retrieves the data from the same csv file and stores the data in the two same list in the corresponding viewmodel.

public class ExampleViewModel : DataSourceViewModelBase

{

 private IEnumerable<HourlyEarnings> _privateData;
        private IEnumerable<HourlyEarnings> _publicData;

 

How can simply just databind these two lists in the view model to the chart in the xaml to produce to scatter spline lines in the chart.

I have a attached the project.

I spent days searching the web for a simple example and everything i found either requires some serviceprovider object that seem not to be for wpf apps, or just information that is worthless or code that does not compile or shown one line.

steven
Top achievements
Rank 1
 answered on 15 Mar 2017
6 answers
246 views
Hi,

Is there a way to move the arrow position on RadPanelBarItem to left (as shown in the attached image)?

I tried modifying the style using Microsoft Blend, the image moved but when I clicked to expand it didn't work.

Thanks

Extract of the style -

<Style.Triggers>
<Trigger Property="Level" Value="1">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
<Grid x:Name="RootElement" SnapsToDevicePixels="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Arrow"/>
<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Header"/>
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalVisual"/>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
</Storyboard>
</VisualState>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Stroke" Storyboard.TargetName="Arrow">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<SolidColorBrush Color="#FF262626"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Header">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<SolidColorBrush Color="#FF262626"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="MouseOut"/>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected"/>
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedVisual"/>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Stroke" Storyboard.TargetName="Arrow">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<SolidColorBrush Color="#FF262626"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Header">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<SolidColorBrush Color="#FF262626"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="ExpandStates">
<VisualState x:Name="Expanded">
<Storyboard>
<DoubleAnimation Duration="0" To="180" Storyboard.TargetProperty="Angle" Storyboard.TargetName="directionRotation"/>
<DoubleAnimation Duration="0:0:0.2" From="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsContainer"/>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsContainer">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Margin" Storyboard.TargetName="FocusVisual">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Thickness>0,1,0,-1</Thickness>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Collapsed"/>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Unfocused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="HeaderRow" UseLayoutRounding="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border x:Name="NormalVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="5" Margin="-1,0,-1,-1"/>
<Border x:Name="MouseOverVisual" BorderThickness="1" Background="#FF878787" Grid.ColumnSpan="5" Margin="-1,0,-1,-1" Opacity="0">
<Border.BorderBrush>
<LinearGradientBrush EndPoint="0.971000015735626,0.5" StartPoint="0.0399999991059303,0.5">
<GradientStop Color="#FFB0B0B0" Offset="0"/>
<GradientStop Color="#FFB0B0B0" Offset="1"/>
<GradientStop Color="#FFE0E1E2" Offset="0.5"/>
</LinearGradientBrush>
</Border.BorderBrush>
</Border>
<Border x:Name="SelectedVisual" BorderThickness="1" Grid.ColumnSpan="5" Margin="-1,0,-1,-1" Opacity="0">
<Border.BorderBrush>
<LinearGradientBrush EndPoint="0.972,0.5" StartPoint="0.042,0.5">
<GradientStop Color="#FF595959" Offset="0"/>
<GradientStop Color="#FF595959" Offset="1"/>
<GradientStop Color="#FFA3A3A3" Offset="0.5"/>
</LinearGradientBrush>
</Border.BorderBrush>
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF616060" Offset="0"/>
<GradientStop Color="#FFCDCDCD" Offset="1"/>
<GradientStop Color="#FFCDCDCD" Offset="0.14"/>
</LinearGradientBrush>
</Border.Background>
</Border>
<Border x:Name="DisabledVisual" BorderBrush="#FF5D5C5C" BorderThickness="1" Background="#FF666666" Grid.ColumnSpan="5" Opacity="0">
<Border BorderBrush="Transparent" BorderThickness="1" Background="{x:Null}"/>
</Border>
<Path x:Name="Arrow" Grid.Column="0" Data="M1,1.5L4.5,5 8,1.5" HorizontalAlignment="Right" Margin="7,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="None" Stroke="#FFC5C2C2" StrokeThickness="2" VerticalAlignment="Center">
<Path.RenderTransform>
<RotateTransform Angle="0"/>
</Path.RenderTransform>
</Path>
<ContentControl x:Name="Header" Grid.ColumnSpan="4" Grid.Column="1" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{Binding Foreground, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Rectangle x:Name="FocusVisual" Grid.ColumnSpan="5" Grid.Column="0" IsHitTestVisible="False" Stroke="#FF789FC3" StrokeThickness="1" Visibility="Collapsed"/>
</Grid>
<Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed">
<telerik:LayoutTransformControl x:Name="transformationRoot" IsTabStop="False">
<ItemsPresenter/>
</telerik:LayoutTransformControl>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
Martin Ivanov
Telerik team
 answered on 15 Mar 2017
1 answer
275 views

I have a potentially large database whom I'm trying to query for just the items I want displayed on the page I'm looking at. I understand how to use LINQ take and skip to grab the correct range for each page.

What I am struggling with is setting the RadDataPager.PageCount to a value which would reflect the database's collection size and not the size of the collection in memory. I've tried binding ItemCount to a property that tracks the database collection size similarly to this http://www.telerik.com/forums/itemcount-binding.To my understanding ItemCount in combination with a PageSize binding should create the correct number of pages. I.E. 1 of X.

The question then is; is it possible to set the PageCount to a value that is separate from the size of the collection that the RadDataPager is bound to? 

Yoan
Telerik team
 answered on 14 Mar 2017
6 answers
384 views

Hi,

I was asked to implement the Excel-like arrow key navigation behavior for RadGridView.

These days users use Microsoft products as a standard. In Excel:

1. After users double click on a cell, with or without making any changes, users cannot leave the cell using arrow keys.

    They can leave the cell by clicking on other cell or using Tab

2. When users enter a cell by Tab or one single mouse clicking, with or without making any changes, users can leave the cell using arrow keys.

I want to do the same in RadGridView.

Thanks in advance for help.

Gaoming
Top achievements
Rank 1
 answered on 14 Mar 2017
1 answer
184 views

I have attached a screenshot of my visual studio project where although I have basically copied your toolbar example the 2 buttons are showing vertically and not horizontally. Any ideas what's wrong?

Using 2017.1.222.45

 

Martin
Telerik team
 answered on 14 Mar 2017
1 answer
232 views
Hi,

i'm facing an issue with RadDiagram in WPF.
I'm using the diagram in MVVM by using the GraphSource in order to populate it. 
I'm using your OrgChart project as sample to develop my application.
The app works perfectly the first time i startup it and the RadDiagram is populated correctly.
But whenever i try to modify the GraphSource (via "PopulateGraphSource" method as you use in OrgChart project) and then i layout my diagram, i get not all shapes displayed correctly on screen. I mean: the diagram route is correct, but some shapes are wrong and some others are not displayed.
I do not understand the issue, because it happens even if i populate the GraphSource with the same data that i use at startup time (At startup it works, at a second time it doesn't work, with same data).
The issue happens only when i call the "PopulateGraphSource" a second time. If i just call the Layout method of the diagram without calling "PopulateGraphSource", everything works correctly. But i need to change my GraphSource during the execution of the application.

The question has already been asked by another user but i guess he has exactly my issue at this link: http://www.telerik.com/forums/dynamically-change-graphsource-through-populategraphsource-method
Thank you in advance for your help.
Martin Ivanov
Telerik team
 answered on 14 Mar 2017
2 answers
233 views

Currently a bookmark can be inserted by using the RadRichTextbox method InsertBookmark().

Is there a way to insert a bookmark by just using the methods on RadDocument?

 

Venkatesh
Top achievements
Rank 1
 answered on 14 Mar 2017
3 answers
88 views
Hi,

I'm binding RadGridView ItemsSource to ObservableCollection<ExpandoObject> because I need to display the data without knowledge of its type and schema. Values are presented correctly in grid, but when I'm typing anything in search - no results are presented. Here is sample solution illustrating this problem, so that you can help me solve this problem.
Stefan Nenchev
Telerik team
 answered on 14 Mar 2017
3 answers
150 views
Hello. Could you tell how to catch the coordinates of the connection Shape-Shape? For example, a Shape which has 3 inputs, the user connects the inputs and we need to know what exactly the entrance was summed up connection
Martin Ivanov
Telerik team
 answered on 14 Mar 2017
1 answer
183 views

Hi All

We are using WPF Telerik RadGrid to display real time data. 
We have pre-configured list of values which need to display on the filter of specific column.
We want to display the list of all such values in the filter column and if that values present in the RadGrid datasource or not still we want to display it with checkbox of filter on the column.
Currently, what happens, if we have pre-configured value in the RadGrid data-source then it is available in the filter column.
So the idea here is that, We want to show our own list of filterable values on the specific column.
For example, in the attached screen shot.
We are seeing Country column with Name. This grid is showing only countries what available in the Grid data source.
We want to show all countries in the "Select All" section of filter.
How can we achieve this?

Is is make sense?

Thank you

Dilyan Traykov
Telerik team
 answered on 14 Mar 2017
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?