We are migrating .net V3 to WPF v4 and having issues with Editors.
How do i declare following statement for WPF?
Dim editor1 As New Steema.TeeChart.Editors.PenEditor(fastlineseries1.LinePen)
We also have editors related code for print preview, export to PNG. Please give us a sample code where all these editors can be accessed via WPF TChart.
Any help is much appreciated.
PenEditor in WPF
Re: PenEditor in WPF
Hello asupriya,
You need know that TeeChart.WPF doesn't support XAML designtime surfaces. You can place a TChart in a XAML page at designtime, but you cannot do any editing on the TChart objects or properties using XAML. This has been so since the existence of TeeChart.WPF. Therefore, if you want that TeeChart have same funcionalities, in WPF that in Winforms you can achieve same results without problems, if you work in runtime.
Thanks,
You need know that TeeChart.WPF doesn't support XAML designtime surfaces. You can place a TChart in a XAML page at designtime, but you cannot do any editing on the TChart objects or properties using XAML. This has been so since the existence of TeeChart.WPF. Therefore, if you want that TeeChart have same funcionalities, in WPF that in Winforms you can achieve same results without problems, if you work in runtime.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: PenEditor in WPF
Sandra,
I am creating the editor as a response to double-click on fastline series on a tchart object that was created at runtime.
Can you post some sample code to show how a user can change the color of a fastlineseries at runtime?
Thanks,
I am creating the editor as a response to double-click on fastline series on a tchart object that was created at runtime.
Can you post some sample code to show how a user can change the color of a fastlineseries at runtime?
Thanks,
Re: PenEditor in WPF
Here is the code to show that tee chart handle is grabbed from an event
'if the selected part is a series then
' opens the trace editor dialog for changing the styles,colors of a series
' and then updates the graph colors etc.,
'if the selected part is a series then
' opens the trace editor dialog for changing the styles,colors of a series
' and then updates the graph colors etc.,
Code: Select all
If (selectorPart.Part = Steema.TeeChart.WPF.ChartClickedPartStyle.Series) Then
Dim s As Steema.TeeChart.WPF.Styles.FastLine = CType(selectorPart.ASeries, Steema.TeeChart.WPF.Styles.FastLine)
'do not allow color change for digitals
If s.Tag(_CHNLTYPE_) = _DIGITAL_BITS_ Then
MessageBox.Show("Digital trace color can not be changed.", "Digital trace selected", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Exit Function
End If
Dim prevClr As Color = s.Color
'declaring and defining a trace editor for changing the colors of a trace
Dim editor1 As New Steema.TeeChart.WPF.Editors.PenEditor(s.LinePen) ====> Problem at this point
editor1.Text = "Trace Editor"
'if cancel button is clicked then
'set the prevoius colors
If Not editor1.ShowDialog() = Windows.Forms.DialogResult.OK Then
'restore to prev. color
s.Color = prevClr
s.LinePen.Color = prevClr
Exit Function
End If
editor1 = Nothing
Re: PenEditor in WPF
Hope someone is looking into this issue.
Thanks
Thanks
Re: PenEditor in WPF
Hello asupriya,
The editors of TeeChartFor.Net aren't supported in TeeChartFor.Net WPF as I have explained in previously post, therefore you can not use it. For this reason, if you want work in WPF project an you want achieve change the color of your FastLine in run time, you only have two options allow you do it. The first is create a Color Editor as explain in this link http://msdn.microsoft.com/en-us/library ... .100).aspx and use it in your TeeChart application. The second is similar of my previous suggestion, but instead of create a Color Editor is implemented a ColorPicket as explain in next link: http://www.codeproject.com/Articles/343 ... er-for-WPF and you only must adapt this, because works in TeeChartFor.WPF application.
On the other hand, If you want migrated without lose funcionalities of your applications, I recommend use winforms version 4.
If you have some problems to implement the Color Editor or ColorPicket please let me know and I try to help you.
Thanks,
The editors of TeeChartFor.Net aren't supported in TeeChartFor.Net WPF as I have explained in previously post, therefore you can not use it. For this reason, if you want work in WPF project an you want achieve change the color of your FastLine in run time, you only have two options allow you do it. The first is create a Color Editor as explain in this link http://msdn.microsoft.com/en-us/library ... .100).aspx and use it in your TeeChart application. The second is similar of my previous suggestion, but instead of create a Color Editor is implemented a ColorPicket as explain in next link: http://www.codeproject.com/Articles/343 ... er-for-WPF and you only must adapt this, because works in TeeChartFor.WPF application.
On the other hand, If you want migrated without lose funcionalities of your applications, I recommend use winforms version 4.
If you have some problems to implement the Color Editor or ColorPicket please let me know and I try to help you.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: PenEditor in WPF
Hi asupriya,
You may also be interested in using the Color Picker control from the Extended WPF Toolkit: https://wpftoolkit.codeplex.com/wikipag ... olorPicker
You may also be interested in using the Color Picker control from the Extended WPF Toolkit: https://wpftoolkit.codeplex.com/wikipag ... olorPicker
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |