Telerik Forums
UI for WPF Forum
4 answers
558 views

I followed this Binding the Color Series-Items

However I can't get the different colors for the bars by using telerik:RadCartesianChart. Please advise me.

<telerik:BarSeries CategoryBinding="Category" ValueBinding="Value" ItemsSource="{Binding}">
        <telerik:BarSeries.PointTemplate>
            <DataTemplate>
                <Rectangle Fill="{Binding DataItem.Color}"/>
            </DataTemplate>
        </telerik:BarSeries.PointTemplate>
    </telerik:BarSeries>
Martin Ivanov
Telerik team
 answered on 10 Nov 2017
2 answers
123 views

Hi!

I'm adding panes dynamically to a RadSplitPanel inside DocumentHost. I would like to layout them (after added) in dock like style (non tab) how can I achieve that in code or XAML ?

 

Thanks,

 

Vladimir

Stefan
Telerik team
 answered on 09 Nov 2017
2 answers
132 views

I am building an application that will have an unknown number of tabs. Inside each tab is a chart with two data sets. I can get the dynamically created tabs working. I can also get the chart working outside of the tab control, but when I combine them, the chart area just says No Data points. It should be noted that I am following the MVVM pattern, so there is no code behind for the view. Everything is done with databinding in the xaml. The data to which I am binding is an observable collection with an observable collection inside it. Here is the view xaml.

<Grid>
        <TabControl ItemsSource="{Binding TotalGradeProfile}">
            <TabControl.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}"/>
                </DataTemplate>
            </TabControl.ItemTemplate>
 
            <TabControl.ContentTemplate>
                <DataTemplate>
                    <telerik:RadCartesianChart x:Name="chart"
                                               Palette="Summer">
 
                        <telerik:RadCartesianChart.HorizontalAxis>
                            <telerik:LinearAxis/>
                        </telerik:RadCartesianChart.HorizontalAxis>
 
                        <telerik:RadCartesianChart.VerticalAxis>
                            <telerik:LinearAxis HorizontalAlignment="Right"></telerik:LinearAxis>
                        </telerik:RadCartesianChart.VerticalAxis>
 
                        <telerik:RadCartesianChart.SeriesProvider>
                            <telerik:ChartSeriesProvider Source="{Binding GradeProfiles}">
                                <telerik:ChartSeriesProvider.SeriesDescriptors>
                                    <telerik:ScatterSeriesDescriptor XValuePath="Mp"
                                                                     YValuePath="RegionGrade">
                                        <telerik:ScatterSeriesDescriptor.Style>
                                            <Style TargetType="telerik:ScatterLineSeries">
                                                <Setter Property="StrokeThickness" Value="2"/>
                                            </Style>
 
                                        </telerik:ScatterSeriesDescriptor.Style>
                                    </telerik:ScatterSeriesDescriptor>
                                </telerik:ChartSeriesProvider.SeriesDescriptors>
                            </telerik:ChartSeriesProvider>
                        </telerik:RadCartesianChart.SeriesProvider>
                    </telerik:RadCartesianChart>
                </DataTemplate>
            </TabControl.ContentTemplate>
        </TabControl>
    </Grid>

 

Rob
Top achievements
Rank 1
 answered on 09 Nov 2017
2 answers
413 views

Hello,
I am struggling with listboxes, with something looks quite simple :
<telerik:RadListBox  SelectionMode="Single" x:Name="radListBox" ItemsSource="{Binding Tasks}" SelectedItem="{Binding SelectedPlcTemplate.Task, Mode=TwoWay}" DisplayMemberPath="Name"  />

In my ViewModel:

 public ObservableCollection<PlcTask> Tasks
        {
            get { return PlcTask.GetAll(); }
        }

In my model:

 private PlcTask _task;
        public PlcTask Task
        {
            get
            {
                return _task;
            }
            set
            {
                _task = value;
                RaisePropertyChanged(() => Task);
            }
        }

 

The listbox never updates its value, even if the model is correctlyt updated

florian
Top achievements
Rank 1
 answered on 09 Nov 2017
1 answer
259 views
Hi -
I am trying to implement treeview that will have multiple expandable 1st level nodes. When one of the 1st level nodes is expanded, subitems of that node (they should not be expandable) should be displayed as a grid. I tried with setting Wrap panel for ItemsPanel, but in that case virtualization stops working.
<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
           <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
           <Setter Property="HorizontalContentAlignment" Value="Left"/>
           <Setter Property="VerticalContentAlignment" Value="Center"/>
           <Setter Property="BorderThickness" Value="1"/>
           <Setter Property="Padding" Value="1 4 5 4"/>
           <Setter Property="MinHeight" Value="24"/>
           <Setter Property="IsDropAllowed" Value="True"/>
           <Setter Property="IsEnabled" Value="True"/>
           <Setter Property="IsTabStop" Value="False"/>
           <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
           <Setter Property="Template" Value="{StaticResource TreeViewItemDefaultTemplate}"/>
           <Setter Property="ItemsPanel">
               <Setter.Value>
                   <ItemsPanelTemplate>
                           <WrapPanel Orientation="Horizontal" VerticalAlignment="Bottom"/>
                   </ItemsPanelTemplate>
               </Setter.Value>
           </Setter>
       </Style>
When I set telerik:TreeViewPanel for ItemPanel, virtualization is working, but subitems of nodes are shown in a vertical list?

Is there any way to achieve that behavior, so subitems are shown in wrap panel, but to keep virtualization working?

Thanks in advance! 
Dinko | Tech Support Engineer
Telerik team
 answered on 09 Nov 2017
4 answers
401 views
Hello,

I was looking for a way to disable the formula capabilities of the control is this possible?(e.g =SUM(A+B)).
This without the need to disable the cells.

Kind regards,

Thomas,
Marcus
Top achievements
Rank 1
 answered on 09 Nov 2017
1 answer
116 views
I see references to RadMap.LocationRect in past forum posts, but am unable to find the current lat/long bounds of the map view. I must be missing something easy.
Stefan
Telerik team
 answered on 08 Nov 2017
3 answers
519 views
Hi,

I am creating a RadCartesianChart and adding bar series this way:

chartSafety.VerticalAxis = new LinearAxis();
            chartSafety.HorizontalAxis = new CategoricalAxis();
 
            DataTable dtSafety = new DataTable("DATA");
 
            dtSafety.Columns.Add(new DataColumn("Name", typeof(string)));
            dtSafety.Columns.Add(new DataColumn("ValueBar", typeof(double)));
 
            dtSafety.Rows.Add(new object[] { "Value1", 70 });
            dtSafety.Rows.Add(new object[] { "Value2", 15 });
            dtSafety.Rows.Add(new object[] { "Value3", 34 });
            dtSafety.Rows.Add(new object[] { "Value4", 87 });
            dtSafety.Rows.Add(new object[] { "Value5", 45 });
            dtSafety.Rows.Add(new object[] { "Value6", 22 });
            dtSafety.Rows.Add(new object[] { "Value7", 33 });
            dtSafety.Rows.Add(new object[] { "Value8", 65 });
            dtSafety.Rows.Add(new object[] { "Value9", 19 });
            dtSafety.Rows.Add(new object[] { "Value10", 41 });
             
 
            BarSeries barSer = new BarSeries();
 
foreach (DataRow drSafety in dtSafety.Rows)
            {
                barSer.DataPoints.Add(new CategoricalDataPoint() { Category = drSafety["Name"], Label = string.Format("{0:N}", drSafety["ValueBar"]), Value = double.Parse(drSafety["ValueBar"].ToString()) });
              
                 
            }
             
            chartSafety.Series.Clear();
            chartSafety.Series.Add(barSer);

Is there a way to change the color for each bar in the series while I am creating each data point?

Regards,

Alberto
Martin Ivanov
Telerik team
 answered on 08 Nov 2017
3 answers
236 views

Hi. I was trying to run example code about 'AnnotationsProvider' feature from here:

https://github.com/telerik/xaml-sdk/tree/master/ChartView/WPF/AnnotationsProvider

However, it seems to me that it doesn't working as was supposed. Neither 'AnnotationDescriptor' or 'AnnotationDescriptorSelector' user control are not working properly (I had not seen any annotations at all). Only 'AnnotationCreated' user control drew the annotations by using code-behind event handler. What am i doing wrong?

My current Telerik libraries version is 2017.2.503.4

Dmitry
Top achievements
Rank 1
 answered on 08 Nov 2017
1 answer
260 views
<telerik:RadLegend Grid.Row="1" Margin="10,20" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                    <telerik:RadLegend.Items>
                        <telerik:LegendItemCollection>
                            <telerik:LegendItem MarkerFill="Red" Title="Legend item 1" />
                            <telerik:LegendItem MarkerFill="Green" Title="Legend item 2" />
                            <telerik:LegendItem MarkerFill="Blue" Title="Legend item 3" />
                            <telerik:LegendItem MarkerFill="Aqua" Title="Legend item 4" />
                        </telerik:LegendItemCollection>
                    </telerik:RadLegend.Items>
                </telerik:RadLegend>
I want to add legends to doughnut char. Now the colors are hard coded in xaml. But I want to use MVVM. Not sure how to bind it? 
Vladimir Stoyanov
Telerik team
 answered on 07 Nov 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
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?