Page 1 of 1

Problem in XAML export

Posted: Wed Feb 21, 2018 6:28 am
by 15681125
hi,

i'm using version build 4.1.2015.12163.
i have a problem in exporting teechart into XAML.

it seems like a bug in the control.
the issue is related to strike-through.

i attached a picture of the exception i get.

i cannot upload the xaml file also as a text because you block this extention.
here is the xaml

https://pastebin.com/et2uP7dX

Re: Problem in XAML export

Posted: Wed Feb 21, 2018 5:53 pm
by Christopher
Hello,

In the release notes of TeeChart for .NET version 4.1.2015.12160 we have:
4) [ID1361] http://bugs.teechart.net/show_bug.cgi?id=1361
Text strikeout not functional in XAML exportation.
Fixed.
I have tested the code in this issue using TeeChart.dll version 4.1.2015.12163:

Code: Select all

	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			tChart1.AfterDraw += TChart1_AfterDraw;
		}

		private void TChart1_AfterDraw(object sender, Graphics3D g)
		{
			g.Font.Strikeout = true;
			g.TextOut(100, 100, "HELLO WORLD");
		}

		private void button1_Click(object sender, EventArgs e)
		{
			tChart1.Export.Image.XAML.Save(@"C:\tmp\chartstrikeout1.xaml");
		}
	}
I then opened chartstrikeout1.xaml in Visual Studio:
devenv_2018-02-21_18-44-38.png
devenv_2018-02-21_18-44-38.png (81.2 KiB) Viewed 16635 times
this works as expected. Could you please give me the TeeChart code you used to create the xaml file you posted?

Re: Problem in XAML export

Posted: Thu Feb 22, 2018 7:20 am
by 15681125
Hi,

Strike-though works for us too, but there is some end case it doesn't work.
Sorry but i cannot post the code of our teechart, it's too long and complicated and scattered over many files.
you can maybe try to investigate what is different from the XAML i posted. the WPF property TextDecorations is set twice.

Re: Problem in XAML export

Posted: Thu Feb 22, 2018 6:58 pm
by Christopher
Hello,
iMDuser wrote: you can maybe try to investigate what is different from the XAML i posted. the WPF property TextDecorations is set twice.
It would be extremely useful to have some code with which we can reproduce the issue. If in the future you discover such code then please pass it to us. In the meantime we will run our own tests.

Re: Problem in XAML export

Posted: Sun Apr 08, 2018 7:22 am
by 15681125
Hi,

it's not easy for us to give code example because it is deep inside our application.

Is something has been found by you?
i'm sure if you'll give your developers a chance to look on it with the data i posted previously about the issue it will be found

Re: Problem in XAML export

Posted: Mon Apr 09, 2018 9:06 am
by Christopher
iMDuser wrote:Is something has been found by you?
Yes, we have found the issue in TeeChart's source code and have resolved it (see id=2025). This fix will be available in the next maintenance release due out within the next two weeks.