From be4f563c7518a3a6c28acf800c3f81c624eb20f9 Mon Sep 17 00:00:00 2001 From: SivaThennarasu Date: Tue, 21 Apr 2026 14:59:18 +0530 Subject: [PATCH] Changed the snipped code alignment and minor mistakes --- wpf/Charts/CodedUI.md | 52 +- .../Export-Chart-to-Image-Windows-8-1.md | 23 +- wpf/Charts/How-To/Serialize-the-SfChart.md | 31 +- ...xis-value-to-pixel-value-and-vice-versa.md | 52 +- wpf/Charts/Migrating-from-Chart-to-SfChart.md | 1586 ++++++++--------- wpf/Charts/Serialization.md | 87 +- 6 files changed, 816 insertions(+), 1015 deletions(-) diff --git a/wpf/Charts/CodedUI.md b/wpf/Charts/CodedUI.md index a6bd38236..7b950541e 100644 --- a/wpf/Charts/CodedUI.md +++ b/wpf/Charts/CodedUI.md @@ -106,35 +106,32 @@ Once the record is completed, click the GenerateCode icon in CodedUITestBuilder {% highlight c# %} - public void RecordedMethod1() - - { - - #region Variable Declarations - - WpfSfChart uISfChartCustom = this.UICUITestSampleDemoWindow.UISfChartCustom; +public void RecordedMethod1() +{ + #region Variable Declarations - WpfChartSeries uIColumnSeriesCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIColumnSeriesCustom; + WpfSfChart uISfChartCustom = this.UICUITestSampleDemoWindow.UISfChartCustom; - WpfLegend uIChartLegendCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIChartLegendCustom; + WpfChartSeries uIColumnSeriesCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIColumnSeriesCustom; - WpfChartAxis uINumericalAxisCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UINumericalAxisCustom; + WpfLegend uIChartLegendCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIChartLegendCustom; - WpfChartAxis uICategoryAxisCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UICategoryAxisCustom; + WpfChartAxis uINumericalAxisCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UINumericalAxisCustom; - WpfZoomingBehavior uIZoomInCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomInCustom; + WpfChartAxis uICategoryAxisCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UICategoryAxisCustom; - WpfZoomingBehavior uIZoomOutCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomOutCustom; + WpfZoomingBehavior uIZoomInCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomInCustom; - WpfZoomingBehavior uIZoomResetCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomResetCustom; + WpfZoomingBehavior uIZoomOutCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomOutCustom; - WpfZoomingBehavior uIZoomPanCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomPanCustom; + WpfZoomingBehavior uIZoomResetCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomResetCustom; - WpfZoomingBehavior uISelectionZoomCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UISelectionZoomCustom; + WpfZoomingBehavior uIZoomPanCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIZoomPanCustom; - #endregion + WpfZoomingBehavior uISelectionZoomCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UISelectionZoomCustom; - } + #endregion +} {% endhighlight %} @@ -164,21 +161,14 @@ Click Generate code icon to generate assertion code then close the builder if va {% highlight c# %} public void AssertMethod1() - { - - #region Variable Declarations - - WpfChartSeries uIColumnSeriesCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIColumnSeriesCustom; - - #endregion - - // Verify that the 'SegmentsCount' property of 'ColumnSeries' custom control equals '10' - - Assert.AreEqual(this.AssertMethod1ExpectedValues.UIColumnSeriesCustomSegmentsCount, uIColumnSeriesCustom.SegmentsCount, "Segemnts Count Mismatched..."); - + #region Variable Declarations + WpfChartSeries uIColumnSeriesCustom = this.UICUITestSampleDemoWindow.UISfChartCustom.UIColumnSeriesCustom; + #endregion + + // Verify that the 'SegmentsCount' property of 'ColumnSeries' custom control equals '10' + Assert.AreEqual(this.AssertMethod1ExpectedValues.UIColumnSeriesCustomSegmentsCount, uIColumnSeriesCustom.SegmentsCount, "Segemnts Count Mismatched..."); } - {% endhighlight %} ## Run Tests diff --git a/wpf/Charts/How-To/Export-Chart-to-Image-Windows-8-1.md b/wpf/Charts/How-To/Export-Chart-to-Image-Windows-8-1.md index 3789145b1..15f7fd5f5 100644 --- a/wpf/Charts/How-To/Export-Chart-to-Image-Windows-8-1.md +++ b/wpf/Charts/How-To/Export-Chart-to-Image-Windows-8-1.md @@ -54,25 +54,16 @@ chart.Save("sfchart.jpg", KnownFolders.PicturesLibrary); {% highlight c# %} var memoryStream = new InMemoryRandomAccessStream(); - chart.Save(memoryStream, BitmapEncoder.BmpEncoderId); +chart.Save(memoryStream, BitmapEncoder.BmpEncoderId); +StorageFolder storageFolder = Windows.ApplicationModel.Package.Current.InstalledLocation; +var file = await storageFolder.CreateFileAsync("chartwithstream.jpg", CreationCollisionOption.GenerateUniqueName); - StorageFolder storageFolder = Windows.ApplicationModel.Package.Current.InstalledLocation; - - - - var file = await storageFolder.CreateFileAsync("chartwithstream.jpg", CreationCollisionOption.GenerateUniqueName); - - - - var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.ReadWrite); - - { - - chart.Save(stream, BitmapEncoder.BmpEncoderId); - - } +var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.ReadWrite); +{ + chart.Save(stream, BitmapEncoder.BmpEncoderId); +} {% endhighlight %} diff --git a/wpf/Charts/How-To/Serialize-the-SfChart.md b/wpf/Charts/How-To/Serialize-the-SfChart.md index 01f4909f2..37d3951a8 100644 --- a/wpf/Charts/How-To/Serialize-the-SfChart.md +++ b/wpf/Charts/How-To/Serialize-the-SfChart.md @@ -50,17 +50,16 @@ XAML {% highlight xaml %} - - - + - -