Initialized event never raised on TChart
Posted: Thu Oct 09, 2008 9:17 am
I've tried to attach to the initialized event in XAML. The event never got fired. I've also tried to attach to the mouse double click event and that also never got fired, but that isn't illustrated in this example.
The XAML:
The code behind:
The XAML:
Code: Select all
<Window x:Class="WPFDemo.Window3"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Chart="clr-namespace:Steema.TeeChart.WPF;assembly=TeeChart.WPF"
Title="Window3" Height="300" Width="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="My Chart" Initialized="Label_Initialized"/>
<Chart:TChart Grid.Row="1" Margin="0,0,0,0" Name="Chart" Initialized="Chart_Initialized"/>
</Grid>
</Window>
Code: Select all
using System;
using System.Windows;
namespace WPFDemo
{
/// <summary>
/// Interaction logic for Window3.xaml
/// </summary>
public partial class Window3 : Window
{
public Window3()
{
InitializeComponent();
}
private void Label_Initialized(object sender, EventArgs e)
{
MessageBox.Show("Label Initialized.");
}
private void Chart_Initialized(object sender, EventArgs e)
{
MessageBox.Show("Chart Initialized.");
}
}
}