Telerik Forums
UI for WPF Forum
2 answers
252 views
I am trying to provide custom label definition for dynamic line series.I could not set access LabelDefinitions for line series type  inside CategoricalSeriesDescriptor.Style . Can you please suggest how to do it ? 
<telerik:RadCartesianChart.SeriesProvider>
    <telerik:ChartSeriesProvider Source="{Binding YourData}">
        <telerik:ChartSeriesProvider.SeriesDescriptors>
            <telerik:CategoricalSeriesDescriptor ItemsSourcePath="YourData" ValuePath="Value" CategoryPath="Category">
                <telerik:CategoricalSeriesDescriptor.Style>
                    <Style TargetType="telerik:LineSeries">
                        <Setter Property="LabelDefinitions">
                            <Setter.Value>
                                <telerik:ChartSeriesLabelDefinition HorizontalAlignment="Center" VerticalAlignment="Center" >
                                    <telerik:ChartSeriesLabelDefinition.Template>
                                        <DataTemplate>
                                            <TextBlock Foreground="DarkBlue" Text="{Binding DataItem.Value}" />
                                        </DataTemplate>
                                    </telerik:ChartSeriesLabelDefinition.Template>
                                </telerik:ChartSeriesLabelDefinition>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </telerik:CategoricalSeriesDescriptor.Style>
            </telerik:CategoricalSeriesDescriptor>
        </telerik:ChartSeriesProvider.SeriesDescriptors>
    </telerik:ChartSeriesProvider>
</telerik:RadCartesianChart.SeriesProvider>
Sivakumar
Top achievements
Rank 1
 answered on 17 Mar 2016
4 answers
135 views

Hello

UI for WPF 2015.2.623.45

I use RadMaskedTextInput in a xbap web application and have an issue with pasting text. Sporadically the application crashes with a

System.ArgumentOutOfRangeException
Message: Index was out of range. Must be non-negative and less than the size of the collection.

exception.

The pasted string does not contain any special charactes.

 

Regards

Thomas

Martin Ivanov
Telerik team
 answered on 16 Mar 2016
2 answers
223 views

Hello,

I need a working sample, or at least some help on filter + pagination.

The sample you provided in the SDK Samples Browser is glitched.

As you can see in the following images (and a gif) the filter behavior is completely messed up

 

It is essential for my grid to have filter + pagination, so if you can please assist me on this, I am be grateful.

 

Regards

Vitor
Top achievements
Rank 1
 answered on 16 Mar 2016
2 answers
111 views

Hi!

 

Is there any way to access the NavigationItemButton associated to a certain RadRadialMenuItem? I would like to show the submenus in case that the parent menuitem is clicked, therefore I need exactly the same behaviour for my menuitem as the NavigationItemButton offers.

It would be great if this would be possible in XAML only.

 

Thanks in advance.

Michael
Top achievements
Rank 1
 answered on 16 Mar 2016
1 answer
155 views

Hi,

I've followed the example here to colour each point of my BarSeries, but I can't make it work. Instead, all the points have turned invisible. The only difference I've noticied between my code and the example is that I use a ChartDataSource object as my points' source, instead of directly binding my collection to the property ItemsSource.

This is my relevant code:

<telerik:ChartDataSource Grid.Column="1" x:Name="VolumeChartDataSource" ItemsSource="{Binding VolumeSerie}" />

Then, on the series definition:

<telerik:RadCartesianChart.Series>
    <telerik:BarSeries x:Name="VolumeS" ItemsSource="{Binding ElementName=VolumeChartDataSource}" ValueBinding="Y" CategoryBinding="X">
        <telerik:BarSeries.RenderOptions>
            <telerik:Direct2DRenderOptions />
        </telerik:BarSeries.RenderOptions>
        <telerik:BarSeries.PointTemplate>
            <DataTemplate>
                <Rectangle Fill="{Binding Path=DataItem.Color}" />
            </DataTemplate>
        </telerik:BarSeries.PointTemplate>
    </telerik:BarSeries>
</telerik:RadCartesianChart.Series>

The datapoint class inside VolumeSerie has the properties X, Y and Color, all already set.

Am I missing something?

Thanks,

Jonathan.

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Mar 2016
2 answers
230 views

Hi,

when I override the TextBoxStyle of the RadAutoCompleteBox with my own styledTextBox (according to this suggestion), it results in wired behavior. When I enter the first character the SearchText binding fires twice with empty string. All following keyboard hits trigger the binding once but still with an empty string. The control however displays all entered characters except the first one.

Here's the custom style:

<Style x:Key="customStyle" TargetType="telerik:RadWatermarkTextBox">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:RadWatermarkTextBox">
                <TextBox Text="{Binding SearchText, RelativeSource={RelativeSource AncestorType=telerik:RadAutoCompleteBox}, Mode=TwoWay}" />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

and the control itself:

<telerik:RadAutoCompleteBox
    ItemsSource="{Binding CustomerSearchProvider}"
    SelectedItem="{Binding CustomerSearchProvider.Selected, Mode=TwoWay}"
    SearchText="{Binding CustomerSearchProvider.SearchTerm, Mode=TwoWay}"
    IsDropDownOpen="{Binding CustomerSearchProvider.IsCompleted}"
    DisplayMemberPath="DisplayName"
    TextSearchMode="Contains"
    SelectionMode="Single"
    TextBoxStyle="{StaticResource customStyle}">

When I remove the TextBoxStyle, everything works as expected.

Thanks

Matthias

Matthias
Top achievements
Rank 1
 answered on 16 Mar 2016
1 answer
202 views

Hello,

I'm trying to implement a set of ribbon tabs and contextual tab groups with a SOLID design. Using Caliburn.Micro, I'm hoping to later develop new RadRibbonGroup views and view models by defining them independently of each other and their parent tabs.

So far, things are going well. However, the way in which I have been able to achieve this means that the entire contents of my RadRibbonGroups are displayed in what looks to the the tray of a RadRibbonGroup object that the Telerik library seems to be wrapping around my DataTemplate.

Here's how I'm pulling the data from my ViewModels into my views.

<UserControl.Resources>
   <DataTemplate x:Key="RibbonGroupDataTemplate">
     <ContentControl cm:View.Model="{Binding}" />
   </DataTemplate>
   <Style TargetType="t:RadRibbonContextualGroup">
     <Setter Property="Header" Value="{Binding  Header, Mode=OneTime}" />
     <Setter Property="t:RadRibbonContextualGroup.GroupName" Value="{Binding GroupName, Mode=OneTime}" />
     <Setter Property="IsActive" Value="{Binding IsActive, Mode=OneWay}" />
     <Setter Property="Color" Value="{Binding Color, Mode=OneTime}" />
   </Style>
   <Style TargetType="t:RadRibbonTab">
     <Setter Property="Header" Value="{Binding Header}" />
     <Setter Property="ContextualGroupName" Value="{Binding ContextualGroupName}" />
     <Setter Property="ItemsSource" Value="{Binding Groups}" />
     <Setter Property="ItemTemplate" Value="{StaticResource RibbonGroupDataTemplate}" />
   </Style>
 </UserControl.Resources>
 
 <t:RadRibbonView
   ItemsSource="{Binding Tabs}"
   ContextualGroupsItemsSource="{Binding ContextualGroups}"
   ApplicationButtonVisibility="Visible"
   TitleBarVisibility="Collapsed"
   MinimizeButtonVisibility="Visible"
   IsMinimizable="True"
   IsMinimized="False">

 

Attached are a couple screenshots of what I mean. One of them is from viewing the resulting tree in snoop. The highlighted Tray can be seen to contain the RibbonRadGroup view that was located by Caliburn through the "RibbonGroupDataTemplate" data template.

 

Thank you in advance for your help.

Martin Ivanov
Telerik team
 answered on 15 Mar 2016
2 answers
64 views

Hello,

I am working on an simple email viewer using the Office 365 API.

I want to make the categories that are assigned to the different emails visible in the GridView in which I show my emails, using the same approach that is used in Outlook.

So a small rectangle with the color of the category followed by the name of the category, an email can have multiple categories in my case.

I want to use a single column to show all categories the email is assigned to.

 

I tryed finding any example but couldnt find it in the XDK samples or the Demo application of the Telerik WPF controls.

Looking for a code example or some guidance to accomplish this.

Thanks in advance,

 

Marcel

 

 

Marcel
Top achievements
Rank 1
 answered on 15 Mar 2016
1 answer
52 views

I would like to report a bug that I have found relating to adding comments to an RTF document.  This is reproducible using the latest Telerik UI for WPF demos (Q1 2016 SP1).

To reproduce:

  1. Open the latest Telerik UI for WPF demo application & switch to the "Telerik Editor" demo for RichTextBox.
  2. Delete all content from the document.
  3. Switch to the Web Layout view.
  4. Insert a single line of text into the document (ex. "test"), with no newlines.
  5.  Highlight the line, switch to the Review tab & select the "New Comment" menu option.  The comment box will show up as a smaller than expected box, and if you try to type text into it you will only see the top of the text (see comment_1.png)
  6. If you add a new line to the document, or switch the editor to print view the comment will display normally (see comment_2.png).
Svetoslav
Telerik team
 answered on 15 Mar 2016
4 answers
130 views
I have created a class for calculated fields and all works as expected. However where I am having a problem is where I am using something OTHER than a field that is 'summed'. For example I have a column called "Fill Price" which is the total of a x number of fill prices on stock trades. In the pivot grid I want to show the Average Fill Price so I select the option "Average" as the calculation option in the Field List. Again this gives me the desired answer in this column in the pivot grid, however when I go to use that field (Fill Price) in the calculated field it gives me the Total and NOT the Average. The following code is how I get the field in my concrete class for the calculated field however in this case the value in the field titled dbl is the Total fill Price and not the average as I was expecting. How do I get at the Average value?

Thank you
​
AggregateValue agg = aggregateValues.GetAggregateValue("fill Price");
double dbl = agg.ConvertOrDefault<double>();
Arnaud
Top achievements
Rank 1
 answered on 15 Mar 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?