1
我想在我的WPF項目中使用TeeChart(http://www.teechart.net/)ScrollPager工具,但它不起作用。 (TeeChart.WPF.dll版本4.1.2012.2287)
TeeChart ScrollPager工具在WPF項目中不起作用
http://img190.imageshack.us/img190/4900/scrwpf.png
namespace TeeChart
{
using Steema.TeeChart.WPF.Themes;
using Steema.TeeChart.WPF.Tools;
using Steema.TeeChart.WPF.Styles;
using Steema.TeeChart.WPF.Drawing;
public partial class MainWindow
{
private Line _series;
private ScrollPager _tool;
BlackIsBackTheme _black;
public MainWindow()
{
InitializeComponent();
_series = new Line();
tChart1.Series.Add(_series);
tChart1.Chart.Aspect.View3D = false;
tChart1.Header.Visible = false;
tChart1.Legend.Visible = false;
_series.FillSampleValues(500);
_black = new BlackIsBackTheme(tChart1.Chart);
_black.Apply();
_tool = new ScrollPager();
tChart1.Tools.Add(_tool);
_tool.Series = _series;
_black = new BlackIsBackTheme(_tool.SubChartTChart.Chart);
_black.Apply();
_tool.SubChartTChart.Panel.Pen.Visible = false;
_tool.SubChartTChart.Panel.Bevel.Inner = BevelStyles.None;
_tool.SubChartTChart.Panel.Bevel.Outer = BevelStyles.None;
}
}
}
在WinForms項目,它工作正常。
http://img692.imageshack.us/img692/4527/scrwinforms.png
namespace TeeChartWinForms
{
using System.Windows.Forms;
using Steema.TeeChart.Drawing;
using Steema.TeeChart.Styles;
using Steema.TeeChart.Themes;
using Steema.TeeChart.Tools;
public partial class Form1 : Form
{
private Line _series;
private ScrollPager _tool;
BlackIsBackTheme _black;
public Form1()
{
InitializeComponent();
_series = new Line();
tChart1.Series.Add(_series);
tChart1.Chart.Aspect.View3D = false;
tChart1.Header.Visible = false;
tChart1.Legend.Visible = false;
_series.FillSampleValues(500);
_black = new BlackIsBackTheme(tChart1.Chart);
_black.Apply();
_tool = new ScrollPager();
tChart1.Tools.Add(_tool);
_tool.Series = _series;
_black = new BlackIsBackTheme(_tool.SubChartTChart.Chart);
_black.Apply();
_tool.SubChartTChart.Panel.Pen.Visible = false;
_tool.SubChartTChart.Panel.Bevel.Inner = BevelStyles.None;
_tool.SubChartTChart.Panel.Bevel.Outer = BevelStyles.None;
}
}
}
謝謝,
亞歷
桑德拉,你的代碼工作就像一個魅力!你拯救了我的一天。 不幸的是,我們仍然無法使用它,因爲滾動超出範圍(應用程序掛起)時還有一個錯誤)) 一切順利, Alex – ingeniero 2012-04-18 14:58:32