From d36f7c60522bae5e6e362ab609aaa81f4f3e1d06 Mon Sep 17 00:00:00 2001 From: kanimozhi-b <56257880+kanimozhi-b@users.noreply.github.com> Date: Tue, 17 Mar 2020 11:17:13 +0530 Subject: [PATCH 1/2] Add files via upload --- App.config | 6 ++ App.xaml | 8 ++ App.xaml.cs | 17 +++++ MainWindow.xaml | 19 +++++ MainWindow.xaml.cs | 94 ++++++++++++++++++++++++ Properties/AssemblyInfo.cs | 55 ++++++++++++++ Properties/Resources.Designer.cs | 71 ++++++++++++++++++ Properties/Resources.resx | 117 +++++++++++++++++++++++++++++ Properties/Settings.Designer.cs | 30 ++++++++ Properties/Settings.settings | 7 ++ WpfApplication1.csproj | 122 +++++++++++++++++++++++++++++++ WpfApplication1.sln | 22 ++++++ 12 files changed, 568 insertions(+) create mode 100644 App.config create mode 100644 App.xaml create mode 100644 App.xaml.cs create mode 100644 MainWindow.xaml create mode 100644 MainWindow.xaml.cs create mode 100644 Properties/AssemblyInfo.cs create mode 100644 Properties/Resources.Designer.cs create mode 100644 Properties/Resources.resx create mode 100644 Properties/Settings.Designer.cs create mode 100644 Properties/Settings.settings create mode 100644 WpfApplication1.csproj create mode 100644 WpfApplication1.sln diff --git a/App.config b/App.config new file mode 100644 index 0000000..00bfd11 --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..5cfbb1e --- /dev/null +++ b/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..79fb246 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WpfApplication1 +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..bb22acf --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs new file mode 100644 index 0000000..95cd79b --- /dev/null +++ b/MainWindow.xaml.cs @@ -0,0 +1,94 @@ +using Syncfusion.Windows.Controls.Cells; +using Syncfusion.Windows.Controls.Grid; +using Syncfusion.Windows.Controls.Scroll; +using System; +using System.Collections.Generic; +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 WpfApplication1 +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + + public MainWindow() + { + InitializeComponent(); + configureGrid(); + } + + + // Help Functions + private void configureGrid() + { + // Setting the number of rows and columns. + grid.Model.RowCount = 10; + grid.Model.ColumnCount = 10; + // Setting the width and height of the cells. + grid.Model.RowHeights.DefaultLineSize = 50; + grid.Model.ColumnWidths.DefaultLineSize = 50; + + // Configuring headers + configureHeaders(); + grid.SizeChanged += grid_SizeChanged; + grid.Model.QueryCellInfo += Model_QueryCellInfo; + + } + + void grid_SizeChanged(object sender, SizeChangedEventArgs e) + { + + double width = (e.NewSize.Width - grid.Model.ColumnWidths.DefaultLineSize - 1) / (grid.Model.ColumnCount - 1); + double height = (e.NewSize.Height - grid.Model.RowHeights.DefaultLineSize - 1) / (grid.Model.RowCount - 1); + for (int i = 1; i < grid.Model.ColumnCount; ++i) + grid.Model.ColumnWidths[i] = width; + for (int j = 1; j < grid.Model.RowCount; ++j) + grid.Model.RowHeights[j] = height; + + } + + void Model_QueryCellInfo(object sender, Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventArgs e) + { + + if (e.Cell.RowIndex == 0 && e.Cell.ColumnIndex > 0) + { + e.Style.Text = GridRangeInfo.GetAlphaLabel(e.Cell.ColumnIndex); + e.Style.HorizontalAlignment = HorizontalAlignment.Center; + e.Style.VerticalAlignment = VerticalAlignment.Center; + } + else if (e.Cell.RowIndex > 0 && e.Cell.ColumnIndex == 0) + { + e.Style.Text = e.Cell.RowIndex.ToString(); + e.Style.HorizontalAlignment = HorizontalAlignment.Center; + e.Style.VerticalAlignment = VerticalAlignment.Center; + } + } + + + + + private void configureHeaders() + { + grid.Model.RowHeights[0] = 25; + grid.Model.ColumnWidths[0] = 25; + grid.Model.HeaderStyle.Background = new SolidColorBrush(Colors.NavajoWhite); + } + + + + + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..67e5b53 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +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("WpfApplication1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WpfApplication1")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..4228751 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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 WpfApplication1.Properties +{ + + + /// + /// 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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WpfApplication1.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/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..5adb9f1 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 WpfApplication1.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..8f2fd95 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/WpfApplication1.csproj b/WpfApplication1.csproj new file mode 100644 index 0000000..cd59d91 --- /dev/null +++ b/WpfApplication1.csproj @@ -0,0 +1,122 @@ + + + + + Debug + AnyCPU + {23954F7D-1B9B-4A13-B1F7-44F9B18400F5} + WinExe + Properties + WpfApplication1 + WpfApplication1 + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Compression.Base.dll + + + C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Grid.WPF.dll + + + C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.GridCommon.WPF.dll + + + C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Linq.Base.dll + + + C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Shared.WPF.dll + + + C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Tools.WPF.dll + + + + + + + + + + 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/WpfApplication1.sln b/WpfApplication1.sln new file mode 100644 index 0000000..8a145a9 --- /dev/null +++ b/WpfApplication1.sln @@ -0,0 +1,22 @@ + +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}") = "WpfApplication1", "WpfApplication1.csproj", "{23954F7D-1B9B-4A13-B1F7-44F9B18400F5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {23954F7D-1B9B-4A13-B1F7-44F9B18400F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23954F7D-1B9B-4A13-B1F7-44F9B18400F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23954F7D-1B9B-4A13-B1F7-44F9B18400F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23954F7D-1B9B-4A13-B1F7-44F9B18400F5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From b522f06b2a4cb3e46456aebbbcfc130dad9e913e Mon Sep 17 00:00:00 2001 From: kanimozhi-b <56257880+kanimozhi-b@users.noreply.github.com> Date: Tue, 17 Mar 2020 12:11:19 +0530 Subject: [PATCH 2/2] modified --- App.config | 10 +++++++++- WpfApplication1.csproj | 25 +++++++++++++++++-------- packages.config | 8 ++++++++ 3 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 packages.config diff --git a/App.config b/App.config index 00bfd11..9640059 100644 --- a/App.config +++ b/App.config @@ -1,6 +1,14 @@ - + + + + + + + + + \ No newline at end of file diff --git a/WpfApplication1.csproj b/WpfApplication1.csproj index cd59d91..d702ec9 100644 --- a/WpfApplication1.csproj +++ b/WpfApplication1.csproj @@ -37,17 +37,25 @@ C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Compression.Base.dll - - C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Grid.WPF.dll + + packages\Syncfusion.Grid.WPF.17.4.0.55\lib\net46\Syncfusion.Grid.WPF.dll + True - - C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.GridCommon.WPF.dll + + packages\Syncfusion.GridCommon.Wpf.17.4.0.55\lib\net46\Syncfusion.GridCommon.WPF.dll + True - - C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Linq.Base.dll + + packages\Syncfusion.Licensing.17.4.0.55\lib\net46\Syncfusion.Licensing.dll + True - - C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Shared.WPF.dll + + packages\Syncfusion.Linq.Base.17.4.0.55\lib\net46\Syncfusion.Linq.Base.dll + True + + + packages\Syncfusion.Shared.WPF.17.4.0.55\lib\net46\Syncfusion.Shared.WPF.dll + True C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\precompiledassemblies\14.2.0.26\4.5\Syncfusion.Tools.WPF.dll @@ -102,6 +110,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/packages.config b/packages.config new file mode 100644 index 0000000..8823bc0 --- /dev/null +++ b/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file