Positioning and event handling inside Silverlight
Posted: Wed Aug 03, 2011 4:45 am
Hello! Earlier I used Teechart ActiveX version and now I have to use Silverlight, but I've got a problem with it. I create new SL application in VS 2010, add reference to Teechart.Silverlight.dll (demo version) and place TChart control on the form. So this is how my xaml looks like:
<UserControl x:Class="SilverlightApplication14.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006 ... esentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/marku ... ility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" xmlns:my="clr-namespace:Steema.TeeChart.Silverlight;assembly=TeeChart.Silverlight">
<Grid x:Name="LayoutRoot" Background="White">
<my:TChart Height="300" HorizontalAlignment="Left" Margin="0,0,0,0" Name="tChart1" VerticalAlignment="Top" Width="400" />
</Grid>
</UserControl>
Then in xaml.cs I add Clickseries event handler:
tChart1.ClickSeries += new Steema.TeeChart.Silverlight.TChart.SeriesEventHandler(SeriesClick);
But when I click on series, event doesn't occur, it occurs when I click slightly above series. It's like something wrong with positioning of mouse pointer or series itself. Help me please, what should I do?
<UserControl x:Class="SilverlightApplication14.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006 ... esentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/marku ... ility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" xmlns:my="clr-namespace:Steema.TeeChart.Silverlight;assembly=TeeChart.Silverlight">
<Grid x:Name="LayoutRoot" Background="White">
<my:TChart Height="300" HorizontalAlignment="Left" Margin="0,0,0,0" Name="tChart1" VerticalAlignment="Top" Width="400" />
</Grid>
</UserControl>
Then in xaml.cs I add Clickseries event handler:
tChart1.ClickSeries += new Steema.TeeChart.Silverlight.TChart.SeriesEventHandler(SeriesClick);
But when I click on series, event doesn't occur, it occurs when I click slightly above series. It's like something wrong with positioning of mouse pointer or series itself. Help me please, what should I do?