C# TeeChart滚动寻呼机工具不支持’;我不能在WPF项目中工作
我想用TeeChart(http://www.teechart.net/)在我的WPF项目中使用了ScrollPager工具,但它不起作用。(TeeChart.WPF.dll版本4.1.2012.2287)C# TeeChart滚动寻呼机工具不支持’;我不能在WPF项目中工作,c#,.net,charts,teechart,C#,.net,Charts,Teechart,我想用TeeChart(http://www.teechart.net/)在我的WPF项目中使用了ScrollPager工具,但它不起作用。(TeeChart.WPF.dll版本4.1.2012.2287) 名称空间图表 { 使用Steema.TeeChart.WPF.Themes; 使用Steema.TeeChart.WPF.Tools; 使用Steema.TeeChart.WPF.style; 使用Steema.TeeChart.WPF.Drawing; 公共部分类主窗口 { 专线(u
名称空间图表
{
使用Steema.TeeChart.WPF.Themes;
使用Steema.TeeChart.WPF.Tools;
使用Steema.TeeChart.WPF.style;
使用Steema.TeeChart.WPF.Drawing;
公共部分类主窗口
{
专线(u系列),;
专用滚动寻呼机工具;
黑色是背景主题(黑色),;
公共主窗口()
{
初始化组件();
_系列=新行();
tChart1.系列.添加(_系列);
tChart1.Chart.Aspect.View3D=false;
tChart1.Header.Visible=false;
tChart1.Legend.Visible=false;
_系列。填充样本值(500);
_黑色=新的黑色背景主题(tChart1.Chart);
_黑色。应用();
_工具=新的滚动寻呼机();
tChart1.Tools.Add(_-tool);
_工具系列=_系列;
_黑色=新的黑色背景(_tool.SubChartTChart.Chart);
_黑色。应用();
_tool.SubChartTChart.Panel.Pen.Visible=false;
_tool.SubChartTChart.Panel.斜面.internal=斜面样式。无;
_tool.SubChartTChart.Panel.斜面.Outer=斜面样式。无;
}
}
}
在WinForms项目中,它运行良好。
谢谢,
Alex使用下一个代码,您的问题似乎不会出现: 代码c:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Steema.TeeChart.WPF;
using Steema.TeeChart.WPF.Styles;
using System.IO;
using System.Windows.Markup;
using Steema.TeeChart.WPF.Tools;
using Steema.TeeChart.WPF.Drawing;
using Steema.TeeChart.WPF.Themes;
namespace WpfApplication1
{
public partial class MainWindow : Window
{
private Steema.TeeChart.WPF.Styles.Line series;
private ScrollPager tool;
BlackIsBackTheme black;
public MainWindow()
{
InitializeComponent();
series = new Steema.TeeChart.WPF.Styles.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.Chart);
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;
}
}
}
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tc="clr-namespace:Steema.TeeChart.WPF;assembly=TeeChart.WPF"
Title="MainWindow" SizeToContent="WidthAndHeight" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="516" d:DesignWidth="492">
<Grid >
<AdornerDecorator Margin="25,12,27,65">
<tc:TChart Name="tChart1" Height="226" Width="412" />
</AdornerDecorator>
</Grid>
</Window>
代码xaml:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Steema.TeeChart.WPF;
using Steema.TeeChart.WPF.Styles;
using System.IO;
using System.Windows.Markup;
using Steema.TeeChart.WPF.Tools;
using Steema.TeeChart.WPF.Drawing;
using Steema.TeeChart.WPF.Themes;
namespace WpfApplication1
{
public partial class MainWindow : Window
{
private Steema.TeeChart.WPF.Styles.Line series;
private ScrollPager tool;
BlackIsBackTheme black;
public MainWindow()
{
InitializeComponent();
series = new Steema.TeeChart.WPF.Styles.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.Chart);
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;
}
}
}
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tc="clr-namespace:Steema.TeeChart.WPF;assembly=TeeChart.WPF"
Title="MainWindow" SizeToContent="WidthAndHeight" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="516" d:DesignWidth="492">
<Grid >
<AdornerDecorator Margin="25,12,27,65">
<tc:TChart Name="tChart1" Height="226" Width="412" />
</AdornerDecorator>
</Grid>
</Window>
?
谢谢
致意
SandraSandra,你的代码工作起来很有魅力!你救了我一天。不幸的是,我们仍然无法使用它,因为在滚动超出范围(应用程序挂起))时还有一个bug,Alex