diff --git a/README.md b/README.md index 9df7006..bfb35d8 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,15 @@ It has been achieved by setting [Interior](https://help.syncfusion.com/cr/wpf/Sy ## Output: -![gradient colors for each series WPF Chart](Output.png) +![gradient colors for each series WPF Chart](Output.png) -KB article - [How to apply gradient colors for each series in WPF Chart](https://www.syncfusion.com/kb/11849/how-to-apply-gradient-colors-for-each-series-in-wpf-chart) +## Troubleshooting + +#### Path too long exception + +If you are facing a path too long exception when building this example project, close Visual Studio and rename the repository to a shorter name before building the project. + +For more details, refer to the KB on [How to apply gradient colors for each series in WPF Chart](https://www.syncfusion.com/kb/11849/how-to-apply-gradient-colors-for-each-series-in-wpf-chart). ### See Also @@ -60,4 +66,4 @@ KB article - [How to apply gradient colors for each series in WPF Chart](https:/ [How to change colors of specific data points in the chart](https://www.syncfusion.com/kb/10928/how-to-change-colors-of-specific-data-points-in-the-chart) -[How to add custom color model to series](https://www.syncfusion.com/kb/5480/how-to-add-custom-color-model-to-series) +[How to add custom color model to series](https://www.syncfusion.com/kb/5480/how-to-add-custom-color-model-to-series) \ No newline at end of file diff --git a/Sample-WPF.sln b/Sample-WPF.sln deleted file mode 100644 index 448d9e6..0000000 --- a/Sample-WPF.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample-WPF", "Sample-WPF\Sample-WPF.csproj", "{36F26733-E90C-436A-9C63-F416942CCCC2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - Release-Xml|Any CPU = Release-Xml|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {36F26733-E90C-436A-9C63-F416942CCCC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {36F26733-E90C-436A-9C63-F416942CCCC2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {36F26733-E90C-436A-9C63-F416942CCCC2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {36F26733-E90C-436A-9C63-F416942CCCC2}.Release|Any CPU.Build.0 = Release|Any CPU - {36F26733-E90C-436A-9C63-F416942CCCC2}.Release-Xml|Any CPU.ActiveCfg = Release|Any CPU - {36F26733-E90C-436A-9C63-F416942CCCC2}.Release-Xml|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Sample-WPF/App.config b/Sample-WPF/App.config deleted file mode 100644 index 2d2a12d..0000000 --- a/Sample-WPF/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Sample-WPF/MainWindow.xaml.cs b/Sample-WPF/MainWindow.xaml.cs deleted file mode 100644 index 098aa93..0000000 --- a/Sample-WPF/MainWindow.xaml.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Syncfusion.UI.Xaml.Charts; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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; - -namespace Sample_WPF -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - } - } - -} diff --git a/Sample-WPF/Properties/AssemblyInfo.cs b/Sample-WPF/Properties/AssemblyInfo.cs deleted file mode 100644 index 5a5ee87..0000000 --- a/Sample-WPF/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Sample-WPF")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Sample-WPF")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Sample-WPF/Properties/Resources.Designer.cs b/Sample-WPF/Properties/Resources.Designer.cs deleted file mode 100644 index f84118d..0000000 --- a/Sample-WPF/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Sample_WPF.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Sample_WPF.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/Sample-WPF/Properties/Resources.resx b/Sample-WPF/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/Sample-WPF/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Sample-WPF/Properties/Settings.Designer.cs b/Sample-WPF/Properties/Settings.Designer.cs deleted file mode 100644 index 6bc5179..0000000 --- a/Sample-WPF/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Sample_WPF.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/Sample-WPF/Properties/Settings.settings b/Sample-WPF/Properties/Settings.settings deleted file mode 100644 index 033d7a5..0000000 --- a/Sample-WPF/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Sample-WPF/Sample-WPF.csproj b/Sample-WPF/Sample-WPF.csproj deleted file mode 100644 index 3667e75..0000000 --- a/Sample-WPF/Sample-WPF.csproj +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Debug - AnyCPU - {36F26733-E90C-436A-9C63-F416942CCCC2} - WinExe - Properties - Sample_WPF - Sample-WPF - v4.6 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - * - - - - - \ No newline at end of file diff --git a/Sample-WPF/App.xaml b/Sample_Wpf/App.xaml similarity index 74% rename from Sample-WPF/App.xaml rename to Sample_Wpf/App.xaml index 41080d1..5f39ad4 100644 --- a/Sample-WPF/App.xaml +++ b/Sample_Wpf/App.xaml @@ -1,7 +1,7 @@ - diff --git a/Sample-WPF/App.xaml.cs b/Sample_Wpf/App.xaml.cs similarity index 54% rename from Sample-WPF/App.xaml.cs rename to Sample_Wpf/App.xaml.cs index 5439146..f228f42 100644 --- a/Sample-WPF/App.xaml.cs +++ b/Sample_Wpf/App.xaml.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Configuration; +using System.Configuration; using System.Data; -using System.Linq; -using System.Threading.Tasks; using System.Windows; -namespace Sample_WPF +namespace Sample_Wpf { /// /// Interaction logic for App.xaml @@ -14,4 +10,5 @@ namespace Sample_WPF public partial class App : Application { } + } diff --git a/Sample_Wpf/AssemblyInfo.cs b/Sample_Wpf/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/Sample_Wpf/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Sample-WPF/MainWindow.xaml b/Sample_Wpf/MainWindow.xaml similarity index 77% rename from Sample-WPF/MainWindow.xaml rename to Sample_Wpf/MainWindow.xaml index a940275..fc18133 100644 --- a/Sample-WPF/MainWindow.xaml +++ b/Sample_Wpf/MainWindow.xaml @@ -1,13 +1,13 @@ - - + @@ -29,9 +29,9 @@ + Label="0-100" + YBindingPath="YValue1" + ItemsSource="{Binding Data}"> @@ -41,9 +41,9 @@ + Label="100-200" + YBindingPath="YValue2" + ItemsSource="{Binding Data}"> @@ -53,9 +53,9 @@ + Label="200-300" + YBindingPath="YValue3" + ItemsSource="{Binding Data}"> @@ -63,8 +63,6 @@ - - diff --git a/Sample_Wpf/MainWindow.xaml.cs b/Sample_Wpf/MainWindow.xaml.cs new file mode 100644 index 0000000..ad878c8 --- /dev/null +++ b/Sample_Wpf/MainWindow.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace Sample_Wpf +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Sample-WPF/Model.cs b/Sample_Wpf/Model.cs similarity index 60% rename from Sample-WPF/Model.cs rename to Sample_Wpf/Model.cs index 293eaa6..ff7d2cf 100644 --- a/Sample-WPF/Model.cs +++ b/Sample_Wpf/Model.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Sample_WPF +namespace Sample_Wpf { public class Model { diff --git a/Sample_Wpf/Sample_Wpf.csproj b/Sample_Wpf/Sample_Wpf.csproj new file mode 100644 index 0000000..195e784 --- /dev/null +++ b/Sample_Wpf/Sample_Wpf.csproj @@ -0,0 +1,15 @@ + + + + WinExe + net9.0-windows + enable + enable + true + + + + + + + diff --git a/Sample_Wpf/Sample_Wpf.sln b/Sample_Wpf/Sample_Wpf.sln new file mode 100644 index 0000000..62e715e --- /dev/null +++ b/Sample_Wpf/Sample_Wpf.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35527.113 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample_Wpf", "Sample_Wpf.csproj", "{301309C4-0A87-4D14-ABDA-F2BF82229334}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {301309C4-0A87-4D14-ABDA-F2BF82229334}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {301309C4-0A87-4D14-ABDA-F2BF82229334}.Debug|Any CPU.Build.0 = Debug|Any CPU + {301309C4-0A87-4D14-ABDA-F2BF82229334}.Release|Any CPU.ActiveCfg = Release|Any CPU + {301309C4-0A87-4D14-ABDA-F2BF82229334}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Sample-WPF/ViewModel.cs b/Sample_Wpf/ViewModel.cs similarity index 83% rename from Sample-WPF/ViewModel.cs rename to Sample_Wpf/ViewModel.cs index eb3fef9..e2fff7e 100644 --- a/Sample-WPF/ViewModel.cs +++ b/Sample_Wpf/ViewModel.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.ObjectModel; -namespace Sample_WPF +namespace Sample_Wpf { public class ViewModel {