I am trying to set the EventTitleStyle of multiple datetime series that I am adding thru vb.net. I have the styles setup in the xaml but can't find a way to set the style in code. If I setup the series in the xaml it works fine, just need to find out how to set it from code.
Thanks
Rob
No problem, glad I could help. If you have any more questions feel free to post them!
-Graham
Thats what I was looking for. Already timeLine.Series[0].EventTitleStyle = but didn't know how to get access to the style resources. Sorry for the simple question, I'm still very new to silverlight and I am currently fighting my way thru the stylin xaml.
Thanks.
Rob,
Could you explain how you are trying to set the styles programmatically? Here's an example of one way to do it:
Xaml:
<UserControl x:Class="SilverlightApplication25.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
xmlns:igtl="clr-namespace:Infragistics.Silverlight.Timeline;assembly=Infragistics.Silverlight.DataVisualization.Timeline.v9.2">
<UserControl.Resources>
<Style x:Key="TitleStyle" TargetType="igtl:EventTitle">
<Style.Setters>
<Setter Property="Foreground" Value="Red" />
</Style.Setters>
</Style>
</UserControl.Resources>
<Grid x:Name="LayoutRoot">
<igtl:XamWebTimeline x:Name="timeLine">
<igtl:DateTimeSeries>
<igtl:DateTimeSeries.Entries>
<igtl:DateTimeEntry Time="01/01/1996" Title="Date Time Entry 1"
Details="Details Time Entry 1"/>
<igtl:DateTimeEntry Time="01/01/2000" Title="Date Time Entry 2"
Details="Details Time Entry 2"/>
<igtl:DateTimeEntry Time="01/01/2004" Title="Date Time Entry 3"
Details="Details Time Entry 3"/>
<igtl:DateTimeEntry Time="01/01/2008" Title="Date Time Entry 3"
Details="Details Time Entry 4"/>
<igtl:DateTimeEntry Time="01/01/2012" Title="Date Time Entry 3"
Details="Details Time Entry 5"/>
</igtl:DateTimeSeries.Entries>
</igtl:DateTimeSeries>
</igtl:XamWebTimeline>
</Grid>
</UserControl>
Code Behind:
public partial class MainPage : UserControl
{
public MainPage()
InitializeComponent();
timeLine.Series[0].EventTitleStyle = (Style)Resources["TitleStyle"];
}