or
BarSeries series = new BarSeries();
series.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "Name" };
series.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Value" };
series.ShowLabels = true;
series.ItemsSource = points;
My ItemsSource is just a list of my datapoint class.
How do I set the label for each point?
I can do it via xaml easy enough. How about code?
<telerik:CategoricalDataPoint Category="1" Value="0.05" Label="Some Point Specific Text">
I tried and failed with
<telerik:BarSeries.LabelDefinitions >
<telerik:ChartSeriesLabelDefinition >
<telerik:ChartSeriesLabelDefinition.Template>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding}"></TextBlock>
<TextBlock>
<TextBlock.Text>
<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type telerik:BarSeries}}"
Path="DataPoints[0].DataItem.MyLabelProp"/>
</TextBlock.Text>
</TextBlock>
</StackPanel>
</DataTemplate>
</telerik:ChartSeriesLabelDefinition.Template>
</telerik:ChartSeriesLabelDefinition>
</telerik:BarSeries.LabelDefinitions>
Hi,
I’m using RadRichText and I’m trying to move the caret to specific offset from the start of the document (or specific row and column).
I saw on the forum that in order to move the caret I need to use
richTextBox.Document.CaretPosition.MoveToPosition
That gets DocumentPosition as parameter. But I can’t create documentPosition from desired text position.
How can I set the caret position from the beginning of the document?
By the way,
The Document position API help page doesn’t work.
Thanks,
Rotem.
<telerik:RadTimeBar Grid.Row="2" x:Name="radTimeBar"> <telerik:RadTimeBar.Intervals> <telerik:HourInterval /> <telerik:MinuteInterval/> <telerik:SecondInterval/> <telerik:MillisecondInterval/> </telerik:RadTimeBar.Intervals></telerik:RadTimeBar>class ResourceItem{ public Dictionary<int, double> NumericalResourceValues { get { return numericalResourceValues ?? (numericalResourceValues = new Dictionary<int, double>()); } } public Dictionary<int, double> numericalResourceValues;}class Resource{
public ObservableCollection<ResourceItem> ResourceItems { get; set; }}void populateTimeBar()
{
int startTimeColumnIndex = 1;int dataColumnIndex = 1; var resourceParser = new ResourceParser();Resource resource = resourceParser.PaserResourceFile(Constants.LogFilePath);var rasl = new RadAreaSparkline { ItemsSource = resource.ResourceItems, XValuePath = "NumericalResourceValues[" + startTimeColumnIndex + "]", YValuePath = "NumericalResourceValues[" + dataColumnIndex + "]" };this.radTimeBar.Content = rasl;this.radTimeBar.DataContext = resource.ResourceItems;
}<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="WpfApplication2.MainWindow" x:Name="Window" Title="MainWindow" Width="640" Height="480" > <telerik:RadContextMenu.ContextMenu> <telerik:RadContextMenu ClickToOpen="True" InheritDataContext="False"> <telerik:RadContextMenu.Effect> <DropShadowEffect ShadowDepth="3" Opacity="0.445" RenderingBias="Quality"/> </telerik:RadContextMenu.Effect> <telerik:RadMenuItem Header="Copy" /> <telerik:RadMenuItem Header="Paste" /> <telerik:RadMenuItem Header="Cut" /> <telerik:RadMenuItem IsSeparator="True" /> <telerik:RadMenuItem Header="Select All" /> </telerik:RadContextMenu> </telerik:RadContextMenu.ContextMenu> <Grid x:Name="LayoutRoot"> <telerik:RadContextMenu Margin="105,53,247,147" ClickToOpen="True" InheritDataContext="False"> <telerik:RadContextMenu.Effect> <DropShadowEffect ShadowDepth="3" Opacity="0.445" RenderingBias="Quality"/> </telerik:RadContextMenu.Effect> <telerik:RadMenuItem Header="Item 1"> <telerik:RadMenuItem Header="Sub Item 1"/> <telerik:RadMenuItem Header="Sub Item 2"/> </telerik:RadMenuItem> <telerik:RadMenuItem Header="Item 2"> <telerik:RadMenuItem Header="Sub Item 3"/> <telerik:RadMenuItem Header="Sub Item 4"/> <telerik:RadMenuItem Header="Sub Item 5"/> </telerik:RadMenuItem> </telerik:RadContextMenu> </Grid></Window>