Telerik Forums
UI for WPF Forum
4 answers
284 views
I have a line chart set to display datetime for X-Axis to display DefaultLabelFormat="#VAL{hh:mm:ss}" If the radchart is directly set in the xaml it works fine. However if it is in a datatemplate and rendered through a contentpresenter, it won;t work. even the title and legend won't show up neither. It always display the full date string which getting overlap. See the upper chart. ( In my case I have to put it into a template as that is part of the content in an itemscontrol, I had a hard time to find out that the template gets into the way.) Anybody run into similar issue? what is the solution?


Window x:Class="WpfApplication3.MainWindow"  

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 Title="MainWindow" Height="521" Width="525"

 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<Window.Resources >

     <DataTemplate x:Key="GraphTemplate" >   

<Grid >

   <telerik:RadChart Height="264" ItemsSource="{Binding DataList}" Margin="34,21,0,0" x:Name="radChart1" VerticalAlignment="Top" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">

     <telerik:RadChart.SeriesMappings >

         <telerik:SeriesMapping LegendLabel="T" >

             <telerik:SeriesMapping.SeriesDefinition >

                 <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" />

             </telerik:SeriesMapping.SeriesDefinition>

             <telerik:SeriesMapping.ItemMappings >

                 <telerik:ItemMapping DataPointMember="XValue" FieldName="Dt" />

                 <telerik:ItemMapping DataPointMember="YValue" FieldName="Data" />

             </telerik:SeriesMapping.ItemMappings>

         </telerik:SeriesMapping>

     </telerik:RadChart.SeriesMappings>

     
    <telerik:RadChart.DefaultView >

         <telerik:ChartDefaultView >

             <telerik:ChartDefaultView.ChartArea >

                 <telerik:ChartArea >

                     <telerik:ChartArea.AxisX >

                         <telerik:AxisX DefaultLabelFormat="#VAL{hh:mm:ss}" LabelRotationAngle="70" LabelStep="2" Title="Time1" />

                     </telerik:ChartArea.AxisX>

                 </telerik:ChartArea>

             </telerik:ChartDefaultView.ChartArea>

         </telerik:ChartDefaultView>

     </telerik:RadChart.DefaultView>

 </telerik:RadChart>

 </Grid>

 </DataTemplate>

</Window.Resources>

 
<Grid x:Name="maingrid" Loaded="Grid_Loaded">

    <Grid.RowDefinitions>

        <RowDefinition />

         <RowDefinition />

     </Grid.RowDefinitions>

 
<!--going through the template will not get x_axis in correct format-->

<ContentPresenter Grid.Row="0" ContentTemplate="{StaticResource GraphTemplate}" Content="{Binding }" />

 <!--this will get the x-axis correct. the code is the same as what in the template-->

 <telerik:RadChart Grid.Row="1" Height="264" ItemsSource="{Binding DataList}" Margin="34,21,0,0" x:Name="radChart1" VerticalAlignment="Top" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">

     <telerik:RadChart.SeriesMappings >

        <telerik:SeriesMapping LegendLabel="T" >

        <telerik:SeriesMapping.SeriesDefinition >

            <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" />

             </telerik:SeriesMapping.SeriesDefinition>

         <telerik:SeriesMapping.ItemMappings >

             <telerik:ItemMapping DataPointMember="XValue" FieldName="Dt" />

             <telerik:ItemMapping DataPointMember="YValue" FieldName="Data" />

         </telerik:SeriesMapping.ItemMappings>

     </telerik:SeriesMapping>

 </telerik:RadChart.SeriesMappings>

 

<telerik:RadChart.DefaultView >

     <telerik:ChartDefaultView >

         <telerik:ChartDefaultView.ChartArea >

                <telerik:ChartArea >

                     <telerik:ChartArea.AxisX >

                         <telerik:AxisX DefaultLabelFormat="#VAL{hh:mm:ss}" LabelRotationAngle="70" LabelStep="2" Title="Time1" />

                     </telerik:ChartArea.AxisX>

             </telerik:ChartArea>

         </telerik:ChartDefaultView.ChartArea>

 </telerik:ChartDefaultView>

 </telerik:RadChart.DefaultView>

 </telerik:RadChart>

 </Grid>

</

Window>

 

Sunny
Top achievements
Rank 1
 answered on 09 Nov 2011
3 answers
214 views
Telerik,

I want to replace the default maximize toggle button of radtileview item with the "more details" text  and minimize toggle button with the  "Back" text. Please provide the demo to implement this.

Regards,
Kanwal.
Zarko
Telerik team
 answered on 09 Nov 2011
15 answers
427 views
Hi,

I am currently evaluating the Q2 Release for WPF and Silverlight.

The Silverlight Version contains the "RadEditor" Controls. I like the use the RadEdit in a WPF Application.

I referenced the Telerik.Windows.Controls.Editor assembly and here the problems start, the assembly seem to be reference an old version of Telerik.Window.Controls (Version 2009.1.424.1020). The Current Version is 2009.2.701.35.

Is there a way of using the RadEditor within an WPF Application, or is this currently not supported?
Iva Toteva
Telerik team
 answered on 09 Nov 2011
2 answers
194 views
I want to assign a keyboard shortcut for direct and easy navigation to a specific tab item (just like in old days, MS provided a mechanism to Captionized the UI item with &) and I do know the WPF has an alternative to that (ampersand) form Windows Forms world.. but for some reason, renaming Header elements of my tabitem with _ (underscore) does not yield anything!

 

 

 

<telerik:RadTabItem Header="_Main" />

 

<telerik:RadTabItem Header="_Customer" />

 

<telerik:RadTabItem Header="_Employee" />

What's the secret behind this? :-) Please reply ASAP. We are looking into how flexible the tool is to support quick keyboard navigations..

Cheers

 

Kam
Top achievements
Rank 2
 answered on 09 Nov 2011
1 answer
69 views

Good day
im using Rad 2010 Q2

 

<telerik:RadTabItem.Header>
                                  <StackPanel FlowDirection="LeftToRight" Orientation="Horizontal">
                                      <Image Source="/Images/b-blue.png"
                           Height="16" Width="16" />
                                      <TextBlock Text="Case" Margin="5,0,0,0" />
                                  </StackPanel>
                              </telerik:RadTabItem.Header>

 

this code is working fine showing Icon + header
> But without save/loadlayout !
 first case :        when loading layout and it has been saved before code implemented it shows no Image
second case :   when save the new layout and trying to load it , it shows System.Windows....  instead of both (header name & image)
(raddocking flow direction is left to right and saving/loading layout is working fine before the use of header image)

help ! :) 

Thanks in advance ,sam

 

 

 

Boyan
Telerik team
 answered on 09 Nov 2011
12 answers
289 views
Probably a really simple one this, but I've changed the orientation of the day view to horizontal. I would now like to do the same with the resource (grouping) text. Each row is rather high, I'd like the text to read horizontally instead.

Thanks,

Dan
Daniel
Top achievements
Rank 1
 answered on 09 Nov 2011
2 answers
120 views
Hello,

I need to change the opacity of a single appointment control on the fly, but have no idea how to access the controls. I tried to get an IEnumataion by calling

MainScheduleView.ChildrenOfType<Telerik.Windows.Controls.AppointmentsControl>();


but there is no AppointmentsControl class in Telerik.Windows.Controls - only AppointmenItem but when I calling, the list is empty.
Any idea?
John
Top achievements
Rank 1
 answered on 09 Nov 2011
3 answers
186 views
there is any way to define different size for each item in the radTileView?
thanks
Zarko
Telerik team
 answered on 09 Nov 2011
2 answers
692 views
Hi,

In our project we are using the RadGridView to display the contents of a conceptual folder: the contents of a folder can be either other folders / and / or items.
The grid contains an ObservableCollection contains objects of two types: "Folder" and "Item", which have no common base type, but both have the property called "Name" returning a string.
When the grid shows listitems which are of the same type, eg. only folders, or only items, sorting by the "Name" column (bound to the name property), works just fine.

Our problem:
When the grid shows listitems which are of the mixed types, eg. folders and items, sorting by the "Name" column (bound to the name property), only sorts the first time, but from there on does nothing.

The mentioned column is defined within the RadGridView as follows:

<telGrid:GridViewDataColumn Width="300" Header="Name" DataMemberBinding="{Binding Name}" CellStyleSelector="{StaticResource ColumnNameCellStyleSelector}">

the collection holding both types of folder and items is defined on our model as follows:

ObservableCollection<object> _items = new ObservableCollection<object>();

We are leaning towards implementing custom sorting, but it feels like a workaround to do such, so our question is:
What would be your recommended approach to support sorting of mixed types in the Observable collection?

Further details:

WPF 4.5
Windows 7 64x
Telerik RadControls for WPF v2011.2.1004.40 / Runtime v4.0.30319
Language C#

Awaiting your response and kind regards.
Marc
Top achievements
Rank 1
 answered on 09 Nov 2011
1 answer
118 views
Is there anyway from which i can change the line style to dotted... i want to do this for particular line like 9 lines will be dotted and one will be normal... I've been go through the help but found no solution... although i read somewhere to change bar graph item style but its not working for line series....

PS i want to set individual itemstyle for each line
Sia
Telerik team
 answered on 09 Nov 2011
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?