Hi,
I'm trying to use TeeChart as derived control in a WPF application.
I've created a simple class:
public class GraphBasicControl : TChart {}
and when I try to use it (create an instance):
GraphBasicControl test = new GraphBasicControl();
I'm getting an exception:
"
The component 'GraphExtendedPH' does not have a resource identified by the URI '/TeeChart.WPF;component/wpfteechart.xaml'.
"
If I try to continue, then everything is working fine.
Please advice.
- Sharon
WPF Derived Control
Re: WPF Derived Control
Hi Sharon,
Could you please send us a simple example project we can run as-is to reproduce the problem here? (Note that you can attach files directly with the forum messages)
Could you please send us a simple example project we can run as-is to reproduce the problem here? (Note that you can attach files directly with the forum messages)
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: WPF Derived Control
Hi,
Thanks for replying. It's actually very simple:
Create a WPF Application:
I've attached a sample project, just in case.
BTW, I'm having other strange issues with the WPF version, I've worked with the WinForm version and now I'm converting it to WPF.
I'm using a DLL to wrap TeeChart with the functioinlity required by our application, I can skip the exception, if I continue the program execution after the exception, the chart is loading. When I try to show the TeeChart editor, nothing happens:
TeeChartControlInstance.ShowEditor();
Please advice.
- Sharon
Thanks for replying. It's actually very simple:
Create a WPF Application:
Code: Select all
public class ChartDemo : TChart
{
}
public Window1()
{
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
ChartDemo chartDemo = new ChartDemo();
}
BTW, I'm having other strange issues with the WPF version, I've worked with the WinForm version and now I'm converting it to WPF.
I'm using a DLL to wrap TeeChart with the functioinlity required by our application, I can skip the exception, if I continue the program execution after the exception, the chart is loading. When I try to show the TeeChart editor, nothing happens:
TeeChartControlInstance.ShowEditor();
Please advice.
- Sharon
- Attachments
-
- WpfApplicationDemoForTeeChart.zip
- WPF Demo application
- (7.43 KiB) Downloaded 202 times
Re: WPF Derived Control
Hi Given,
Yes you are right, I've added this bug to the wish list to be fixed asap (TW16014279).
And regarding the editor, here it was discussed.
Yes you are right, I've added this bug to the wish list to be fixed asap (TW16014279).
And regarding the editor, here it was discussed.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: WPF Derived Control
Hi Alonso,
Thanks for the reply.
1. Do you have any time estimation when this will be fixed and how (patch/new version)?
2. I have some other critical problems with the WPF version. This is the one I'm working on:
In the WinForm version, I've added a scroll bar in case the user zoom in, this was quite complex since the bottom axis is using datetime format but I've managed to handle it.
The control I've used was HScrollBar, which of course, I cannot use now, instead I'm using ScrollBar which is UIElement.
In the previous version, the HScrollBar was added to the "Controls" of the chart:
this cannot be done with WPF, hence I'm *trying* to use "Children":
The problem is that "Children" is not set properly in the chart, whenever I try to use it I'm getting an exception: "'m_BasicGraph.Children' threw an exception of type 'System.NullReferenceException'"
I don't think a sample project is required, just open the debugger and try to access the "Children" and you will see the problem.
Please advice.
Thanks for the reply.
1. Do you have any time estimation when this will be fixed and how (patch/new version)?
2. I have some other critical problems with the WPF version. This is the one I'm working on:
In the WinForm version, I've added a scroll bar in case the user zoom in, this was quite complex since the bottom axis is using datetime format but I've managed to handle it.
The control I've used was HScrollBar, which of course, I cannot use now, instead I'm using ScrollBar which is UIElement.
In the previous version, the HScrollBar was added to the "Controls" of the chart:
Code: Select all
m_BasicGraph.Children.Add(m_HScrollBar);
Code: Select all
m_BasicGraph.Children.Add(hSBar);
I don't think a sample project is required, just open the debugger and try to access the "Children" and you will see the problem.
Please advice.
Re: WPF Derived Control
Hi Given,
1. We plan to publish a new NET maintenance release for v2009 around 12th August but I'm afraid that I can't tell you if this will be fixed or not. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
2. I'm getting an error adding controls created in design time into a chart but also into other components so it doesn't seem to be a TeeChart problem. For example, once a scroll bar is created at design time, the following crashes:
But this crashes too:
On the other hand, creating the controls at runtime, both adding them to the chart or to the panel it seems to work fine:
1. We plan to publish a new NET maintenance release for v2009 around 12th August but I'm afraid that I can't tell you if this will be fixed or not. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
2. I'm getting an error adding controls created in design time into a chart but also into other components so it doesn't seem to be a TeeChart problem. For example, once a scroll bar is created at design time, the following crashes:
Code: Select all
tChart1.Children.Add(scrollBar1);
Code: Select all
dockPanel1.Children.Add(scrollBar1);
Code: Select all
System.Windows.Controls.Primitives.ScrollBar myScrollBar = new System.Windows.Controls.Primitives.ScrollBar();
tChart1.Children.Add(myScrollBar);
Code: Select all
System.Windows.Controls.Primitives.ScrollBar myScrollBar = new System.Windows.Controls.Primitives.ScrollBar();
dockPanel1.Children.Add(myScrollBar);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |