├── Nuget
├── pack.bat
└── GridExtra.nuspec
├── docs
├── GridEx
│ ├── demo.gif
│ ├── demo2.gif
│ ├── example1.png
│ ├── example2.png
│ ├── example3.png
│ ├── example4.png
│ ├── example5.png
│ ├── example5_1.png
│ └── example5_2.png
├── WrapPanelEx
│ └── demo.gif
└── ResponsiveGrid
│ ├── demo.gif
│ ├── capture1.png
│ └── capture2.png
├── Sample
├── BasicSample.Uwp
│ ├── Assets
│ │ ├── StoreLogo.png
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Wide310x150Logo.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ └── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── App.xaml
│ ├── project.json
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── MainPage.xaml.cs
│ ├── MainPage.xaml
│ ├── Package.appxmanifest
│ ├── App.xaml.cs
│ └── BasicSample.Uwp.csproj
└── BasicSample.Wpf
│ ├── App.config
│ ├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
│ ├── App.xaml.cs
│ ├── App.xaml
│ ├── MainWindow.xaml.cs
│ ├── MainWindow.xaml
│ └── BasicSample.Wpf.csproj
├── GridExtra.Wpf
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── BreakPointsTypeConverter.cs
├── GridExtra.Wpf.csproj
└── WrapPanelEx.cs
├── GridExtra.Uwp
├── project.json
├── Properties
│ ├── AssemblyInfo.cs
│ └── GridExtra.Uwp.rd.xml
└── GridExtra.Uwp.csproj
├── GridExtra.Shared
├── GridExtra.Shared.projitems
├── GridExtra.Shared.shproj
├── BreakPoints.cs
├── ResponsiveGrid.cs
├── ResponsiveGrid.Properties.cs
└── GridEx.cs
├── LICENSE
├── .gitignore
├── GridExtra.sln
└── README.md
/Nuget/pack.bat:
--------------------------------------------------------------------------------
1 | nuget pack GridExtra.nuspec
2 | pause
3 |
--------------------------------------------------------------------------------
/docs/GridEx/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/demo.gif
--------------------------------------------------------------------------------
/docs/GridEx/demo2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/demo2.gif
--------------------------------------------------------------------------------
/docs/GridEx/example1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/example1.png
--------------------------------------------------------------------------------
/docs/GridEx/example2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/example2.png
--------------------------------------------------------------------------------
/docs/GridEx/example3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/example3.png
--------------------------------------------------------------------------------
/docs/GridEx/example4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/example4.png
--------------------------------------------------------------------------------
/docs/GridEx/example5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/example5.png
--------------------------------------------------------------------------------
/docs/WrapPanelEx/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/WrapPanelEx/demo.gif
--------------------------------------------------------------------------------
/docs/GridEx/example5_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/example5_1.png
--------------------------------------------------------------------------------
/docs/GridEx/example5_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/GridEx/example5_2.png
--------------------------------------------------------------------------------
/docs/ResponsiveGrid/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/ResponsiveGrid/demo.gif
--------------------------------------------------------------------------------
/docs/ResponsiveGrid/capture1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/ResponsiveGrid/capture1.png
--------------------------------------------------------------------------------
/docs/ResponsiveGrid/capture2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/docs/ResponsiveGrid/capture2.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/Sample/BasicSample.Uwp/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/Sample/BasicSample.Uwp/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/Sample/BasicSample.Uwp/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/Sample/BasicSample.Uwp/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/Sample/BasicSample.Uwp/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/Sample/BasicSample.Uwp/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sourcechord/GridExtra/HEAD/Sample/BasicSample.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GridExtra.Uwp/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace BasicSample.Wpf
10 | {
11 | ///
12 | /// App.xaml の相互作用ロジック
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/GridExtra.Shared/GridExtra.Shared.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 4914d867-f667-4151-a039-3fde665f3106
7 |
8 |
9 | SourceChord.GridExtra
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Nuget/GridExtra.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GridExtra
5 | 0.4.0
6 | GridExtra
7 | SourceChord
8 | SourceChord
9 | https://github.com/sourcechord/GridExtra/blob/master/LICENSE
10 | https://github.com/sourcechord/GridExtra
11 | false
12 | GridExtra is a custom panel library for WPF/UWP.
13 | Copyright 2016
14 | XAML WPF UWP Panel Library
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace BasicSample.Wpf
17 | {
18 | ///
19 | /// MainWindow.xaml の相互作用ロジック
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 |
28 | private void Button_Click(object sender, RoutedEventArgs e)
29 | {
30 | var temp = @"
31 | Header Header
32 | Menu SubMenu
33 | Content Content
34 | Footer Footer
35 | ";
36 | SourceChord.GridExtra.GridEx.SetTemplateArea(grid, temp);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/GridExtra.Shared/GridExtra.Shared.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4914d867-f667-4151-a039-3fde665f3106
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 minami_SC
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // このコードはツールによって生成されました。
4 | // ランタイム バージョン:4.0.30319.42000
5 | //
6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7 | // コードが再生成されるときに損失したりします。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SourceChord.GridExtra.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("BasicSample.Uwp")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("BasicSample.Uwp")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace BasicSample.Wpf.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GridExtra.Uwp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GridExtra.Uwp")]
9 | [assembly: AssemblyDescription("GridExtra is a custom panel library for WPF/UWP.")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("SourceChord")]
12 | [assembly: AssemblyProduct("GridExtra.Uwp")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("0.4.0.0")]
28 | [assembly: AssemblyFileVersion("0.4.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // 空白ページのアイテム テンプレートについては、http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 を参照してください
17 |
18 | namespace BasicSample.Uwp
19 | {
20 | ///
21 | /// それ自体で使用できる空白ページまたはフレーム内に移動できる空白ページ。
22 | ///
23 | public sealed partial class MainPage : Page
24 | {
25 | public MainPage()
26 | {
27 | this.InitializeComponent();
28 | }
29 |
30 | private void Button_Click(object sender, RoutedEventArgs e)
31 | {
32 | var temp = @"
33 | Header Header SubMenu
34 | Menu Content SubMenu
35 | Footer Footer Footer
36 | ";
37 | SourceChord.GridExtra.GridEx.SetTemplateArea(grid, temp);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/BreakPointsTypeConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Globalization;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace SourceChord.GridExtra
10 | {
11 | public class BreakPointsTypeConverter : TypeConverter
12 | {
13 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
14 | {
15 | //return base.CanConvertFrom(context, sourceType);
16 | return sourceType == typeof(string);
17 | }
18 |
19 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
20 | {
21 | var text = (string)value;
22 | var list = text.Split(',')
23 | .Select(o => o.Trim())
24 | .Select(o => int.Parse(o))
25 | .ToList();
26 |
27 | if (list.Count() != 3)
28 | {
29 | throw new ArgumentException($"'{value}' Invalid value. BreakPoints must contains 3 items.");
30 | }
31 |
32 | return new BreakPoints() { XS_SM = list[0], SM_MD = list[1], MD_LG = list[2] };
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/GridExtra.Uwp/Properties/GridExtra.Uwp.rd.xml:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | BasicSample.Uwp
18 | minami
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
8 | // アセンブリに関連付けられている情報を変更するには、
9 | // これらの属性値を変更してください。
10 | [assembly: AssemblyTitle("GridExtra.Wpf")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("SourceChord")]
14 | [assembly: AssemblyProduct("GridExtra.Wpf")]
15 | [assembly: AssemblyCopyright("Copyright © 2016")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
20 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
21 | // その型の ComVisible 属性を true に設定してください。
22 | [assembly: ComVisible(false)]
23 |
24 | //ローカライズ可能なアプリケーションのビルドを開始するには、
25 | //.csproj ファイルの CultureYouAreCodingWith を
26 | // 内部で設定します。たとえば、
27 | //ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、
28 | //下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を
29 | //プロジェクト ファイルの UICulture 設定と一致するよう更新します。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly:ThemeInfo(
35 | ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所
36 | //(リソースがページ、
37 | //またはアプリケーション リソース ディクショナリに見つからない場合に使用されます)
38 | ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所
39 | //(リソースがページ、
40 | //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます)
41 | )]
42 |
43 |
44 | // アセンブリのバージョン情報は次の 4 つの値で構成されています:
45 | //
46 | // メジャー バージョン
47 | // マイナー バージョン
48 | // ビルド番号
49 | // Revision
50 | //
51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
52 | // 既定値にすることができます:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("0.4.0.0")]
55 | [assembly: AssemblyFileVersion("0.4.0.0")]
56 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
8 | // アセンブリに関連付けられている情報を変更するには、
9 | // これらの属性値を変更してください。
10 | [assembly: AssemblyTitle("BasicSample.Wpf")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("BasicSample.Wpf")]
15 | [assembly: AssemblyCopyright("Copyright © 2016")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
20 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
21 | // その型の ComVisible 属性を true に設定してください。
22 | [assembly: ComVisible(false)]
23 |
24 | //ローカライズ可能なアプリケーションのビルドを開始するには、
25 | //.csproj ファイルの CultureYouAreCodingWith を
26 | // 内部で設定します。たとえば、
27 | //ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、
28 | //下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を
29 | //プロジェクト ファイルの UICulture 設定と一致するよう更新します。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所
36 | //(リソースがページ、
37 | //またはアプリケーション リソース ディクショナリに見つからない場合に使用されます)
38 | ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所
39 | //(リソースがページ、
40 | //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます)
41 | )]
42 |
43 |
44 | // アセンブリのバージョン情報は次の 4 つの値で構成されています:
45 | //
46 | // メジャー バージョン
47 | // マイナー バージョン
48 | // ビルド番号
49 | // Revision
50 | //
51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
52 | // 既定値にすることができます:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/GridExtra.Shared/BreakPoints.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | #if WINDOWS_WPF
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.ComponentModel;
10 | #elif WINDOWS_UWP
11 | using Windows.Foundation;
12 | using Windows.UI.Xaml;
13 | using Windows.UI.Xaml.Controls;
14 | #else
15 | #endif
16 |
17 | namespace SourceChord.GridExtra
18 | {
19 | #if WINDOWS_WPF
20 | [TypeConverter(typeof(BreakPointsTypeConverter))]
21 | #endif
22 | public class BreakPoints : DependencyObject
23 | {
24 | public double XS_SM
25 | {
26 | get { return (double)GetValue(XS_SMProperty); }
27 | set { SetValue(XS_SMProperty, value); }
28 | }
29 | // Using a DependencyProperty as the backing store for XS_SM. This enables animation, styling, binding, etc...
30 | public static readonly DependencyProperty XS_SMProperty =
31 | DependencyProperty.Register("XS_SM", typeof(double), typeof(BreakPoints), new PropertyMetadata(768.0));
32 |
33 | public double SM_MD
34 | {
35 | get { return (double)GetValue(SM_MDProperty); }
36 | set { SetValue(SM_MDProperty, value); }
37 | }
38 | // Using a DependencyProperty as the backing store for SM_MD. This enables animation, styling, binding, etc...
39 | public static readonly DependencyProperty SM_MDProperty =
40 | DependencyProperty.Register("SM_MD", typeof(double), typeof(BreakPoints), new PropertyMetadata(992.0));
41 |
42 |
43 | public double MD_LG
44 | {
45 | get { return (double)GetValue(MD_LGProperty); }
46 | set { SetValue(MD_LGProperty, value); }
47 | }
48 | // Using a DependencyProperty as the backing store for MD_LG. This enables animation, styling, binding, etc...
49 | public static readonly DependencyProperty MD_LGProperty =
50 | DependencyProperty.Register("MD_LG", typeof(double), typeof(BreakPoints), new PropertyMetadata(1200.0));
51 |
52 | public BreakPoints()
53 | {
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // このコードはツールによって生成されました。
4 | // ランタイム バージョン:4.0.30319.42000
5 | //
6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7 | // コードが再生成されるときに損失したりします。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SourceChord.GridExtra.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
17 | ///
18 | // このクラスは StronglyTypedResourceBuilder クラスが ResGen
19 | // または Visual Studio のようなツールを使用して自動生成されました。
20 | // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
21 | // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SourceChord.GridExtra.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、
51 | /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // このコードはツールによって生成されました。
4 | // ランタイム バージョン:4.0.30319.42000
5 | //
6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7 | // コードが再生成されるときに損失したりします
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace BasicSample.Wpf.Properties
12 | {
13 |
14 |
15 | ///
16 | /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
17 | ///
18 | // このクラスは StronglyTypedResourceBuilder クラスによって ResGen
19 | // または Visual Studio のようなツールを使用して自動生成されました。
20 | // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
21 | // ResGen を実行し直すか、または VS プロジェクトをリビルドします。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// このクラスで使用されるキャッシュされた ResourceManager インスタンスを返します。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BasicSample.Wpf.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、
56 | /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace BasicSample.Uwp
19 | {
20 | ///
21 | /// 既定の Application クラスを補完するアプリケーション固有の動作を提供します。
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// 単一アプリケーション オブジェクトを初期化します。これは、実行される作成したコードの
27 | ///最初の行であるため、main() または WinMain() と論理的に等価です。
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// アプリケーションがエンド ユーザーによって正常に起動されたときに呼び出されます。他のエントリ ポイントは、
37 | /// アプリケーションが特定のファイルを開くために起動されたときなどに使用されます。
38 | ///
39 | /// 起動の要求とプロセスの詳細を表示します。
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 | #if DEBUG
43 | if (System.Diagnostics.Debugger.IsAttached)
44 | {
45 | this.DebugSettings.EnableFrameRateCounter = true;
46 | }
47 | #endif
48 | Frame rootFrame = Window.Current.Content as Frame;
49 |
50 | // ウィンドウに既にコンテンツが表示されている場合は、アプリケーションの初期化を繰り返さずに、
51 | // ウィンドウがアクティブであることだけを確認してください
52 | if (rootFrame == null)
53 | {
54 | // ナビゲーション コンテキストとして動作するフレームを作成し、最初のページに移動します
55 | rootFrame = new Frame();
56 |
57 | rootFrame.NavigationFailed += OnNavigationFailed;
58 |
59 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
60 | {
61 | //TODO: 以前中断したアプリケーションから状態を読み込みます
62 | }
63 |
64 | // フレームを現在のウィンドウに配置します
65 | Window.Current.Content = rootFrame;
66 | }
67 |
68 | if (e.PrelaunchActivated == false)
69 | {
70 | if (rootFrame.Content == null)
71 | {
72 | // ナビゲーション スタックが復元されない場合は、最初のページに移動します。
73 | // このとき、必要な情報をナビゲーション パラメーターとして渡して、新しいページを
74 | //構成します
75 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
76 | }
77 | // 現在のウィンドウがアクティブであることを確認します
78 | Window.Current.Activate();
79 | }
80 | }
81 |
82 | ///
83 | /// 特定のページへの移動が失敗したときに呼び出されます
84 | ///
85 | /// 移動に失敗したフレーム
86 | /// ナビゲーション エラーの詳細
87 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
88 | {
89 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
90 | }
91 |
92 | ///
93 | /// アプリケーションの実行が中断されたときに呼び出されます。
94 | /// アプリケーションが終了されるか、メモリの内容がそのままで再開されるかに
95 | /// かかわらず、アプリケーションの状態が保存されます。
96 | ///
97 | /// 中断要求の送信元。
98 | /// 中断要求の詳細。
99 | private void OnSuspending(object sender, SuspendingEventArgs e)
100 | {
101 | var deferral = e.SuspendingOperation.GetDeferral();
102 | //TODO: アプリケーションの状態を保存してバックグラウンドの動作があれば停止します
103 | deferral.Complete();
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/GridExtra.Wpf.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}
8 | library
9 | Properties
10 | SourceChord.GridExtra
11 | GridExtra.Wpf
12 | v4.5
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 |
17 |
18 |
19 | true
20 | full
21 | false
22 | ..\Build\Wpf\Debug\
23 | TRACE;DEBUG;WINDOWS_WPF
24 | prompt
25 | 4
26 |
27 |
28 | none
29 | true
30 | ..\Build\Wpf\Release\
31 | TRACE;WINDOWS_WPF
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 4.0
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Code
55 |
56 |
57 | True
58 | True
59 | Resources.resx
60 |
61 |
62 | True
63 | Settings.settings
64 | True
65 |
66 |
67 |
68 | ResXFileCodeGenerator
69 | Resources.Designer.cs
70 |
71 |
72 | SettingsSingleFileGenerator
73 | Settings.Designer.cs
74 |
75 |
76 |
77 |
78 |
79 |
86 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/WrapPanelEx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 |
9 | namespace SourceChord.GridExtra
10 | {
11 | public static class WrapPanelEx
12 | {
13 |
14 | public static Size GetOriginalSize(DependencyObject obj)
15 | {
16 | return (Size)obj.GetValue(OriginalSizeProperty);
17 | }
18 |
19 | private static void SetOriginalSize(DependencyObject obj, Size value)
20 | {
21 | obj.SetValue(OriginalSizeProperty, value);
22 | }
23 |
24 | // Using a DependencyProperty as the backing store for OriginalSize. This enables animation, styling, binding, etc...
25 | public static readonly DependencyProperty OriginalSizeProperty =
26 | DependencyProperty.RegisterAttached("OriginalSize", typeof(Size), typeof(WrapPanelEx), new PropertyMetadata(Size.Empty));
27 |
28 |
29 | public static bool GetAdaptiveLayout(DependencyObject obj)
30 | {
31 | return (bool)obj.GetValue(AdaptiveLayoutProperty);
32 | }
33 |
34 | public static void SetAdaptiveLayout(DependencyObject obj, bool value)
35 | {
36 | obj.SetValue(AdaptiveLayoutProperty, value);
37 | }
38 |
39 | // Using a DependencyProperty as the backing store for AdaptiveLayout. This enables animation, styling, binding, etc...
40 | public static readonly DependencyProperty AdaptiveLayoutProperty =
41 | DependencyProperty.RegisterAttached("AdaptiveLayout", typeof(bool), typeof(WrapPanelEx), new PropertyMetadata(false, OnAdaptiveLayoutChanged));
42 |
43 | private static void OnAdaptiveLayoutChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
44 | {
45 | var panel = d as WrapPanel;
46 | var isEnabled = (bool)e.NewValue;
47 | if (panel == null) { return; }
48 |
49 | if (isEnabled)
50 | {
51 | SetOriginalSize(panel, new Size(panel.ItemWidth, panel.ItemHeight));
52 | var layoutUpdateCallback = CreateLayoutUpdateHandler(panel);
53 | panel.LayoutUpdated += layoutUpdateCallback;
54 | SetLayoutUpdatedCallback(panel, layoutUpdateCallback);
55 | }
56 | else
57 | {
58 | var originalSize = GetOriginalSize(panel);
59 |
60 | panel.ItemWidth = originalSize.Width;
61 | panel.ItemHeight = originalSize.Height;
62 |
63 | panel.ClearValue(OriginalSizeProperty);
64 | // イベントの解除
65 | var callback = GetLayoutUpdatedCallback(panel);
66 | panel.LayoutUpdated -= callback;
67 | }
68 | }
69 |
70 | private static EventHandler CreateLayoutUpdateHandler(WrapPanel panel)
71 | {
72 | var layoutUpdateCallback = new EventHandler((sender, args) =>
73 | {
74 | if (panel == null) return;
75 | var orientaion = panel.Orientation;
76 | var originalSize = GetOriginalSize(panel);
77 |
78 | if (orientaion == Orientation.Horizontal)
79 | {
80 | if (double.IsNaN(originalSize.Width)) return;
81 |
82 | var count = Math.Floor(panel.ActualWidth / originalSize.Width);
83 | var size = panel.ActualWidth / count;
84 |
85 | panel.ItemWidth = size;
86 | }
87 | else
88 | {
89 | if (double.IsNaN(originalSize.Width)) return;
90 |
91 | var count = Math.Floor(panel.ActualHeight / originalSize.Height);
92 | var size = panel.ActualHeight / count;
93 |
94 | panel.ItemHeight = size;
95 | }
96 | });
97 |
98 | return layoutUpdateCallback;
99 | }
100 |
101 | public static EventHandler GetLayoutUpdatedCallback(DependencyObject obj)
102 | {
103 | return (EventHandler)obj.GetValue(LayoutUpdatedCallbackProperty);
104 | }
105 | private static void SetLayoutUpdatedCallback(DependencyObject obj, EventHandler value)
106 | {
107 | obj.SetValue(LayoutUpdatedCallbackProperty, value);
108 | }
109 | // Using a DependencyProperty as the backing store for LayoutUpdatedCallback. This enables animation, styling, binding, etc...
110 | public static readonly DependencyProperty LayoutUpdatedCallbackProperty =
111 | DependencyProperty.RegisterAttached("LayoutUpdatedCallback", typeof(EventHandler), typeof(WrapPanelEx), new PropertyMetadata(null));
112 |
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/BasicSample.Wpf.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}
8 | WinExe
9 | Properties
10 | BasicSample.Wpf
11 | BasicSample.Wpf
12 | v4.5.2
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 | true
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | 4.0
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | MSBuild:Compile
56 | Designer
57 |
58 |
59 | MSBuild:Compile
60 | Designer
61 |
62 |
63 | App.xaml
64 | Code
65 |
66 |
67 | MainWindow.xaml
68 | Code
69 |
70 |
71 |
72 |
73 | Code
74 |
75 |
76 | True
77 | True
78 | Resources.resx
79 |
80 |
81 | True
82 | Settings.settings
83 | True
84 |
85 |
86 | ResXFileCodeGenerator
87 | Resources.Designer.cs
88 |
89 |
90 | SettingsSingleFileGenerator
91 | Settings.Designer.cs
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | {631c583b-5e88-4abd-9926-c18e4addf6c6}
101 | GridExtra.Wpf
102 |
103 |
104 |
105 |
112 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 | *.VC.VC.opendb
85 |
86 | # Visual Studio profiler
87 | *.psess
88 | *.vsp
89 | *.vspx
90 | *.sap
91 |
92 | # TFS 2012 Local Workspace
93 | $tf/
94 |
95 | # Guidance Automation Toolkit
96 | *.gpState
97 |
98 | # ReSharper is a .NET coding add-in
99 | _ReSharper*/
100 | *.[Rr]e[Ss]harper
101 | *.DotSettings.user
102 |
103 | # JustCode is a .NET coding add-in
104 | .JustCode
105 |
106 | # TeamCity is a build add-in
107 | _TeamCity*
108 |
109 | # DotCover is a Code Coverage Tool
110 | *.dotCover
111 |
112 | # NCrunch
113 | _NCrunch_*
114 | .*crunch*.local.xml
115 | nCrunchTemp_*
116 |
117 | # MightyMoose
118 | *.mm.*
119 | AutoTest.Net/
120 |
121 | # Web workbench (sass)
122 | .sass-cache/
123 |
124 | # Installshield output folder
125 | [Ee]xpress/
126 |
127 | # DocProject is a documentation generator add-in
128 | DocProject/buildhelp/
129 | DocProject/Help/*.HxT
130 | DocProject/Help/*.HxC
131 | DocProject/Help/*.hhc
132 | DocProject/Help/*.hhk
133 | DocProject/Help/*.hhp
134 | DocProject/Help/Html2
135 | DocProject/Help/html
136 |
137 | # Click-Once directory
138 | publish/
139 |
140 | # Publish Web Output
141 | *.[Pp]ublish.xml
142 | *.azurePubxml
143 | # TODO: Comment the next line if you want to checkin your web deploy settings
144 | # but database connection strings (with potential passwords) will be unencrypted
145 | *.pubxml
146 | *.publishproj
147 |
148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
149 | # checkin your Azure Web App publish settings, but sensitive information contained
150 | # in these scripts will be unencrypted
151 | PublishScripts/
152 |
153 | # NuGet Packages
154 | *.nupkg
155 | # The packages folder can be ignored because of Package Restore
156 | **/packages/*
157 | # except build/, which is used as an MSBuild target.
158 | !**/packages/build/
159 | # Uncomment if necessary however generally it will be regenerated when needed
160 | #!**/packages/repositories.config
161 | # NuGet v3's project.json files produces more ignoreable files
162 | *.nuget.props
163 | *.nuget.targets
164 |
165 | # Microsoft Azure Build Output
166 | csx/
167 | *.build.csdef
168 |
169 | # Microsoft Azure Emulator
170 | ecf/
171 | rcf/
172 |
173 | # Windows Store app package directories and files
174 | AppPackages/
175 | BundleArtifacts/
176 | Package.StoreAssociation.xml
177 | _pkginfo.txt
178 |
179 | # Visual Studio cache files
180 | # files ending in .cache can be ignored
181 | *.[Cc]ache
182 | # but keep track of directories ending in .cache
183 | !*.[Cc]ache/
184 |
185 | # Others
186 | ClientBin/
187 | ~$*
188 | *~
189 | *.dbmdl
190 | *.dbproj.schemaview
191 | *.pfx
192 | *.publishsettings
193 | node_modules/
194 | orleans.codegen.cs
195 |
196 | # Since there are multiple workflows, uncomment next line to ignore bower_components
197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
198 | #bower_components/
199 |
200 | # RIA/Silverlight projects
201 | Generated_Code/
202 |
203 | # Backup & report files from converting an old project file
204 | # to a newer Visual Studio version. Backup files are not needed,
205 | # because we have git ;-)
206 | _UpgradeReport_Files/
207 | Backup*/
208 | UpgradeLog*.XML
209 | UpgradeLog*.htm
210 |
211 | # SQL Server files
212 | *.mdf
213 | *.ldf
214 |
215 | # Business Intelligence projects
216 | *.rdl.data
217 | *.bim.layout
218 | *.bim_*.settings
219 |
220 | # Microsoft Fakes
221 | FakesAssemblies/
222 |
223 | # GhostDoc plugin setting file
224 | *.GhostDoc.xml
225 |
226 | # Node.js Tools for Visual Studio
227 | .ntvs_analysis.dat
228 |
229 | # Visual Studio 6 build log
230 | *.plg
231 |
232 | # Visual Studio 6 workspace options file
233 | *.opt
234 |
235 | # Visual Studio LightSwitch build output
236 | **/*.HTMLClient/GeneratedArtifacts
237 | **/*.DesktopClient/GeneratedArtifacts
238 | **/*.DesktopClient/ModelManifest.xml
239 | **/*.Server/GeneratedArtifacts
240 | **/*.Server/ModelManifest.xml
241 | _Pvt_Extensions
242 |
243 | # Paket dependency manager
244 | .paket/paket.exe
245 | paket-files/
246 |
247 | # FAKE - F# Make
248 | .fake/
249 |
250 | # JetBrains Rider
251 | .idea/
252 | *.sln.iml
253 |
--------------------------------------------------------------------------------
/GridExtra.Wpf/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Wpf/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/GridExtra.Uwp/GridExtra.Uwp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}
8 | Library
9 | Properties
10 | SourceChord.GridExtra
11 | GridExtra.Uwp
12 | ja-JP
13 | UAP
14 | 10.0.14393.0
15 | 10.0.10586.0
16 | 14
17 | 512
18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 |
20 |
21 | AnyCPU
22 | true
23 | full
24 | false
25 | ..\Build\Uwp\Debug\
26 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
27 | prompt
28 | 4
29 |
30 |
31 | AnyCPU
32 | none
33 | true
34 | ..\Build\Uwp\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | prompt
37 | 4
38 |
39 |
40 | x86
41 | true
42 | bin\x86\Debug\
43 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
44 | ;2008
45 | full
46 | x86
47 | false
48 | prompt
49 |
50 |
51 | x86
52 | bin\x86\Release\
53 | TRACE;NETFX_CORE;WINDOWS_UWP
54 | true
55 | ;2008
56 | pdbonly
57 | x86
58 | false
59 | prompt
60 |
61 |
62 | ARM
63 | true
64 | bin\ARM\Debug\
65 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
66 | ;2008
67 | full
68 | ARM
69 | false
70 | prompt
71 |
72 |
73 | ARM
74 | bin\ARM\Release\
75 | TRACE;NETFX_CORE;WINDOWS_UWP
76 | true
77 | ;2008
78 | pdbonly
79 | ARM
80 | false
81 | prompt
82 |
83 |
84 | x64
85 | true
86 | bin\x64\Debug\
87 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
88 | ;2008
89 | full
90 | x64
91 | false
92 | prompt
93 |
94 |
95 | x64
96 | bin\x64\Release\
97 | TRACE;NETFX_CORE;WINDOWS_UWP
98 | true
99 | ;2008
100 | pdbonly
101 | x64
102 | false
103 | prompt
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | 14.0
116 |
117 |
118 |
125 |
--------------------------------------------------------------------------------
/Sample/BasicSample.Uwp/BasicSample.Uwp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}
8 | AppContainerExe
9 | Properties
10 | BasicSample.Uwp
11 | BasicSample.Uwp
12 | ja-JP
13 | UAP
14 | 10.0.14393.0
15 | 10.0.10586.0
16 | 14
17 | 512
18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 | BasicSample.Uwp_TemporaryKey.pfx
20 |
21 |
22 | true
23 | bin\x86\Debug\
24 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
25 | ;2008
26 | full
27 | x86
28 | false
29 | prompt
30 | true
31 |
32 |
33 | bin\x86\Release\
34 | TRACE;NETFX_CORE;WINDOWS_UWP
35 | true
36 | ;2008
37 | pdbonly
38 | x86
39 | false
40 | prompt
41 | true
42 | true
43 |
44 |
45 | true
46 | bin\ARM\Debug\
47 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
48 | ;2008
49 | full
50 | ARM
51 | false
52 | prompt
53 | true
54 |
55 |
56 | bin\ARM\Release\
57 | TRACE;NETFX_CORE;WINDOWS_UWP
58 | true
59 | ;2008
60 | pdbonly
61 | ARM
62 | false
63 | prompt
64 | true
65 | true
66 |
67 |
68 | true
69 | bin\x64\Debug\
70 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
71 | ;2008
72 | full
73 | x64
74 | false
75 | prompt
76 | true
77 |
78 |
79 | bin\x64\Release\
80 | TRACE;NETFX_CORE;WINDOWS_UWP
81 | true
82 | ;2008
83 | pdbonly
84 | x64
85 | false
86 | prompt
87 | true
88 | true
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | App.xaml
97 |
98 |
99 | MainPage.xaml
100 |
101 |
102 |
103 |
104 |
105 | Designer
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | MSBuild:Compile
122 | Designer
123 |
124 |
125 | MSBuild:Compile
126 | Designer
127 |
128 |
129 |
130 |
131 | {fe7a5887-17bc-48e9-b601-815a2fdbf2a0}
132 | GridExtra.Uwp
133 |
134 |
135 |
136 | 14.0
137 |
138 |
139 |
146 |
--------------------------------------------------------------------------------
/GridExtra.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridExtra.Wpf", "GridExtra.Wpf\GridExtra.Wpf.csproj", "{631C583B-5E88-4ABD-9926-C18E4ADDF6C6}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridExtra.Uwp", "GridExtra.Uwp\GridExtra.Uwp.csproj", "{FE7A5887-17BC-48E9-B601-815A2FDBF2A0}"
9 | EndProject
10 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GridExtra.Shared", "GridExtra.Shared\GridExtra.Shared.shproj", "{4914D867-F667-4151-A039-3FDE665F3106}"
11 | EndProject
12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{611249A1-CDE6-4AAD-B532-73007C552C77}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicSample.Wpf", "Sample\BasicSample.Wpf\BasicSample.Wpf.csproj", "{E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}"
15 | EndProject
16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicSample.Uwp", "Sample\BasicSample.Uwp\BasicSample.Uwp.csproj", "{416D9AA6-F3E7-4338-B9A3-E060060DAF0C}"
17 | EndProject
18 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Nuget", "Nuget", "{E1C85495-293B-4198-845C-6D7068A1961E}"
19 | ProjectSection(SolutionItems) = preProject
20 | Nuget\GridExtra.nuspec = Nuget\GridExtra.nuspec
21 | Nuget\pack.bat = Nuget\pack.bat
22 | EndProjectSection
23 | EndProject
24 | Global
25 | GlobalSection(SharedMSBuildProjectFiles) = preSolution
26 | GridExtra.Shared\GridExtra.Shared.projitems*{4914d867-f667-4151-a039-3fde665f3106}*SharedItemsImports = 13
27 | GridExtra.Shared\GridExtra.Shared.projitems*{631c583b-5e88-4abd-9926-c18e4addf6c6}*SharedItemsImports = 4
28 | GridExtra.Shared\GridExtra.Shared.projitems*{fe7a5887-17bc-48e9-b601-815a2fdbf2a0}*SharedItemsImports = 4
29 | EndGlobalSection
30 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
31 | Debug|Any CPU = Debug|Any CPU
32 | Debug|ARM = Debug|ARM
33 | Debug|x64 = Debug|x64
34 | Debug|x86 = Debug|x86
35 | Release|Any CPU = Release|Any CPU
36 | Release|ARM = Release|ARM
37 | Release|x64 = Release|x64
38 | Release|x86 = Release|x86
39 | EndGlobalSection
40 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
41 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
43 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|ARM.ActiveCfg = Debug|Any CPU
44 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|ARM.Build.0 = Debug|Any CPU
45 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|x64.ActiveCfg = Debug|Any CPU
46 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|x64.Build.0 = Debug|Any CPU
47 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|x86.ActiveCfg = Debug|Any CPU
48 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Debug|x86.Build.0 = Debug|Any CPU
49 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
50 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|Any CPU.Build.0 = Release|Any CPU
51 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|ARM.ActiveCfg = Release|Any CPU
52 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|ARM.Build.0 = Release|Any CPU
53 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|x64.ActiveCfg = Release|Any CPU
54 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|x64.Build.0 = Release|Any CPU
55 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|x86.ActiveCfg = Release|Any CPU
56 | {631C583B-5E88-4ABD-9926-C18E4ADDF6C6}.Release|x86.Build.0 = Release|Any CPU
57 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
58 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
59 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|ARM.ActiveCfg = Debug|ARM
60 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|ARM.Build.0 = Debug|ARM
61 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|x64.ActiveCfg = Debug|x64
62 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|x64.Build.0 = Debug|x64
63 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|x86.ActiveCfg = Debug|x86
64 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Debug|x86.Build.0 = Debug|x86
65 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
66 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|Any CPU.Build.0 = Release|Any CPU
67 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|ARM.ActiveCfg = Release|ARM
68 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|ARM.Build.0 = Release|ARM
69 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|x64.ActiveCfg = Release|x64
70 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|x64.Build.0 = Release|x64
71 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|x86.ActiveCfg = Release|x86
72 | {FE7A5887-17BC-48E9-B601-815A2FDBF2A0}.Release|x86.Build.0 = Release|x86
73 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
74 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|Any CPU.Build.0 = Debug|Any CPU
75 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|ARM.ActiveCfg = Debug|Any CPU
76 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|ARM.Build.0 = Debug|Any CPU
77 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|x64.ActiveCfg = Debug|Any CPU
78 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|x64.Build.0 = Debug|Any CPU
79 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|x86.ActiveCfg = Debug|Any CPU
80 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Debug|x86.Build.0 = Debug|Any CPU
81 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|Any CPU.ActiveCfg = Release|Any CPU
82 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|Any CPU.Build.0 = Release|Any CPU
83 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|ARM.ActiveCfg = Release|Any CPU
84 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|ARM.Build.0 = Release|Any CPU
85 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|x64.ActiveCfg = Release|Any CPU
86 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|x64.Build.0 = Release|Any CPU
87 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|x86.ActiveCfg = Release|Any CPU
88 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B}.Release|x86.Build.0 = Release|Any CPU
89 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|Any CPU.ActiveCfg = Debug|x86
90 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|ARM.ActiveCfg = Debug|ARM
91 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|ARM.Build.0 = Debug|ARM
92 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|ARM.Deploy.0 = Debug|ARM
93 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|x64.ActiveCfg = Debug|x64
94 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|x64.Build.0 = Debug|x64
95 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|x64.Deploy.0 = Debug|x64
96 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|x86.ActiveCfg = Debug|x86
97 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|x86.Build.0 = Debug|x86
98 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Debug|x86.Deploy.0 = Debug|x86
99 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|Any CPU.ActiveCfg = Release|x86
100 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|ARM.ActiveCfg = Release|ARM
101 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|ARM.Build.0 = Release|ARM
102 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|ARM.Deploy.0 = Release|ARM
103 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|x64.ActiveCfg = Release|x64
104 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|x64.Build.0 = Release|x64
105 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|x64.Deploy.0 = Release|x64
106 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|x86.ActiveCfg = Release|x86
107 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|x86.Build.0 = Release|x86
108 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C}.Release|x86.Deploy.0 = Release|x86
109 | EndGlobalSection
110 | GlobalSection(SolutionProperties) = preSolution
111 | HideSolutionNode = FALSE
112 | EndGlobalSection
113 | GlobalSection(NestedProjects) = preSolution
114 | {E180DF3E-1A9F-482E-A7E2-FD7FBB27514B} = {611249A1-CDE6-4AAD-B532-73007C552C77}
115 | {416D9AA6-F3E7-4338-B9A3-E060060DAF0C} = {611249A1-CDE6-4AAD-B532-73007C552C77}
116 | EndGlobalSection
117 | EndGlobal
118 |
--------------------------------------------------------------------------------
/GridExtra.Shared/ResponsiveGrid.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | #if WINDOWS_WPF
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.Windows.Media;
10 | #elif WINDOWS_UWP
11 | using Windows.Foundation;
12 | using Windows.UI.Xaml;
13 | using Windows.UI.Xaml.Controls;
14 | #else
15 | #endif
16 |
17 |
18 | namespace SourceChord.GridExtra
19 | {
20 | public partial class ResponsiveGrid : Panel
21 | {
22 | public ResponsiveGrid()
23 | {
24 | this.MaxDivision = 12;
25 | this.BreakPoints = new BreakPoints();
26 | }
27 |
28 | protected override Size MeasureOverride(Size availableSize)
29 | {
30 | var count = 0;
31 | var currentRow = 0;
32 |
33 | var availableWidth = double.IsPositiveInfinity(availableSize.Width) ? double.PositiveInfinity : availableSize.Width / this.MaxDivision;
34 | var children = this.Children.OfType();
35 |
36 |
37 | foreach (UIElement child in this.Children)
38 | {
39 | if (child != null)
40 | {
41 | // Collapsedの時はレイアウトしない
42 | if (child.Visibility == Visibility.Collapsed) { continue; }
43 |
44 | var span = this.GetSpan(child, availableSize.Width);
45 | var offset = this.GetOffset(child, availableSize.Width);
46 | var push = this.GetPush(child, availableSize.Width);
47 | var pull = this.GetPull(child, availableSize.Width);
48 |
49 | if (count + span + offset > this.MaxDivision)
50 | {
51 | // リセット
52 | currentRow++;
53 | count = 0;
54 | }
55 |
56 | SetActualColumn(child, count + offset + push - pull);
57 | SetActualRow(child, currentRow);
58 |
59 | count += (span + offset);
60 |
61 | var size = new Size(availableWidth * span, double.PositiveInfinity);
62 | child.Measure(size);
63 | }
64 | }
65 |
66 | // 行ごとにグルーピングする
67 | var group = this.Children.OfType()
68 | .GroupBy(x => GetActualRow(x));
69 |
70 | var totalSize = new Size();
71 | if (group.Count() != 0)
72 | {
73 | totalSize.Width = group.Max(rows => rows.Sum(o => o.DesiredSize.Width));
74 | totalSize.Height = group.Sum(rows => rows.Max(o => o.DesiredSize.Height));
75 | }
76 |
77 | return totalSize;
78 | }
79 |
80 | protected int GetSpan(UIElement element, double width)
81 | {
82 | var span = 0;
83 |
84 | var getXS = new Func((o) => { var x = GetXS(o); return x != 0 ? x : this.MaxDivision; });
85 | var getSM = new Func((o) => { var x = GetSM(o); return x != 0 ? x : getXS(o); });
86 | var getMD = new Func((o) => { var x = GetMD(o); return x != 0 ? x : getSM(o); });
87 | var getLG = new Func((o) => { var x = GetLG(o); return x != 0 ? x : getMD(o); });
88 |
89 | if (width < this.BreakPoints.XS_SM)
90 | {
91 | span = getXS(element);
92 | }
93 | else if (width < this.BreakPoints.SM_MD)
94 | {
95 | span = getSM(element);
96 | }
97 | else if (width < this.BreakPoints.MD_LG)
98 | {
99 | span = getMD(element);
100 | }
101 | else
102 | {
103 | span = getLG(element);
104 | }
105 |
106 | return Math.Min(Math.Max(0, span), this.MaxDivision); ;
107 | }
108 |
109 | protected int GetOffset(UIElement element, double width)
110 | {
111 | var span = 0;
112 |
113 | var getXS = new Func((o) => { var x = GetXS_Offset(o); return x != 0 ? x : 0; });
114 | var getSM = new Func((o) => { var x = GetSM_Offset(o); return x != 0 ? x : getXS(o); });
115 | var getMD = new Func((o) => { var x = GetMD_Offset(o); return x != 0 ? x : getSM(o); });
116 | var getLG = new Func((o) => { var x = GetLG_Offset(o); return x != 0 ? x : getMD(o); });
117 |
118 | if (width < this.BreakPoints.XS_SM)
119 | {
120 | span = getXS(element);
121 | }
122 | else if (width < this.BreakPoints.SM_MD)
123 | {
124 | span = getSM(element);
125 | }
126 | else if (width < this.BreakPoints.MD_LG)
127 | {
128 | span = getMD(element);
129 | }
130 | else
131 | {
132 | span = getLG(element);
133 | }
134 |
135 | return Math.Min(Math.Max(0, span), this.MaxDivision); ;
136 | }
137 |
138 | protected int GetPush(UIElement element, double width)
139 | {
140 | var span = 0;
141 |
142 | var getXS = new Func((o) => { var x = GetXS_Push(o); return x != 0 ? x : 0; });
143 | var getSM = new Func((o) => { var x = GetSM_Push(o); return x != 0 ? x : getXS(o); });
144 | var getMD = new Func((o) => { var x = GetMD_Push(o); return x != 0 ? x : getSM(o); });
145 | var getLG = new Func((o) => { var x = GetLG_Push(o); return x != 0 ? x : getMD(o); });
146 |
147 | if (width < this.BreakPoints.XS_SM)
148 | {
149 | span = getXS(element);
150 | }
151 | else if (width < this.BreakPoints.SM_MD)
152 | {
153 | span = getSM(element);
154 | }
155 | else if (width < this.BreakPoints.MD_LG)
156 | {
157 | span = getMD(element);
158 | }
159 | else
160 | {
161 | span = getLG(element);
162 | }
163 |
164 | return Math.Min(Math.Max(0, span), this.MaxDivision); ;
165 | }
166 |
167 | protected int GetPull(UIElement element, double width)
168 | {
169 | var span = 0;
170 |
171 | var getXS = new Func((o) => { var x = GetXS_Pull(o); return x != 0 ? x : 0; });
172 | var getSM = new Func((o) => { var x = GetSM_Pull(o); return x != 0 ? x : getXS(o); });
173 | var getMD = new Func((o) => { var x = GetMD_Pull(o); return x != 0 ? x : getSM(o); });
174 | var getLG = new Func((o) => { var x = GetLG_Pull(o); return x != 0 ? x : getMD(o); });
175 |
176 | if (width < this.BreakPoints.XS_SM)
177 | {
178 | span = getXS(element);
179 | }
180 | else if (width < this.BreakPoints.SM_MD)
181 | {
182 | span = getSM(element);
183 | }
184 | else if (width < this.BreakPoints.MD_LG)
185 | {
186 | span = getMD(element);
187 | }
188 | else
189 | {
190 | span = getLG(element);
191 | }
192 |
193 | return Math.Min(Math.Max(0, span), this.MaxDivision); ;
194 | }
195 |
196 | protected override Size ArrangeOverride(Size finalSize)
197 | {
198 | var columnWidth = finalSize.Width / this.MaxDivision;
199 |
200 | // 行ごとにグルーピングする
201 | var group = this.Children.OfType()
202 | .GroupBy(x => GetActualRow(x));
203 |
204 | double temp = 0;
205 | foreach (var rows in group)
206 | {
207 | double max = 0;
208 |
209 | var columnHeight = rows.Max(o => o.DesiredSize.Height);
210 | foreach (var element in rows)
211 | {
212 | var column = GetActualColumn(element);
213 | var row = GetActualRow(element);
214 | var columnSpan = this.GetSpan(element, finalSize.Width);
215 |
216 | var rect = new Rect(columnWidth * column, temp, columnWidth * columnSpan, columnHeight);
217 |
218 | element.Arrange(rect);
219 |
220 | max = Math.Max(element.DesiredSize.Height, max);
221 | }
222 |
223 | temp += max;
224 | }
225 | return base.ArrangeOverride(finalSize);
226 | }
227 |
228 | #if WINDOWS_WPF
229 | // ShowGridLinesで表示する際に利用するペンの定義
230 | private static readonly Pen _guidePen1
231 | = new Pen(Brushes.Yellow, 1);
232 | private static readonly Pen _guidePen2
233 | = new Pen(Brushes.Blue, 1) { DashStyle = new DashStyle(new double[] { 4, 4 }, 0) };
234 |
235 | protected override void OnRender(DrawingContext dc)
236 | {
237 | base.OnRender(dc);
238 | // ShowGridLinesが有効な場合、各種エレメントを描画する前に、ガイド用のグリッドを描画する。
239 | if (this.ShowGridLines)
240 | {
241 | var gridNum = this.MaxDivision;
242 | var unit = this.ActualWidth / gridNum;
243 | for (var i = 0; i <= gridNum; i++)
244 | {
245 | var x = (int)(unit * i);
246 | dc.DrawLine(_guidePen1, new Point(x, 0), new Point(x, this.ActualHeight));
247 | dc.DrawLine(_guidePen2, new Point(x, 0), new Point(x, this.ActualHeight));
248 | }
249 | }
250 | }
251 | #endif
252 |
253 | }
254 | }
255 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GridExtra
2 | GridExtra is a custom panel library for WPF/UWP.
3 |
4 |
5 | * ResponsiveGrid
6 | * Custom Panel class that provides bootstrap like grid system.
7 | * Grid system
8 | * switch layout with window width.
9 | * XS(<768px), SM(<992px), MD(<1200px), LG(1200px<=)
10 | * 12 columns across the page.(customizable with MaxDivision property)
11 | * GridEx
12 | * Helper class that defines usefull attached properties for Grid panel.
13 | * WrapPanelEx
14 | * Helper class that provide adaptive layout for WrapPanel.
15 |
16 | ## install
17 | *Nuget Package*
18 | ```
19 | Install-Package GridExtra
20 | ```
21 | https://www.nuget.org/packages/GridExtra/
22 |
23 | ### Preparation
24 | Add xmlns to xaml code.
25 |
26 | #### For WPF
27 | ```xml
28 | xmlns:ge="clr-namespace:SourceChord.GridExtra;assembly=GridExtra.Wpf"
29 | ```
30 |
31 | #### For UWP
32 | ```xml
33 | xmlns:ge="using:SourceChord.GridExtra"
34 | ```
35 |
36 |
37 | ## Usage
38 | ### ResponsiveGrid
39 | ResponsiveGrid provides the grid layout system that is similar to Bootstrap framework.
40 |
41 | 
42 |
43 | #### Example
44 | ```xml
45 |
46 |
47 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | ```
61 | *extra small device(~768px)*
62 | 
63 |
64 | *small device(~992px)*
65 | 
66 |
67 | #### Properties
68 |
69 | ##### Dependency Properties
70 | |Property Name|Type|Description|
71 | |-----|-----|-----|
72 | |MaxDivision|int|Gets or sets a value that determines grid divisions.|
73 | |BreakPoints|BreakPoints class||
74 | |ShowGridLines|int|Gets or sets a value that indicates whether grid column's lines are visible within this ResponsiveGrid. |
75 |
76 |
77 | ##### Attached Properties
78 |
79 | |Property Name|Type|Description|
80 | |-----|-----|-----|
81 | |XS
SM
MD
LG
|int|Gets or sets a value that determines grid columns for XS(extra small), SM(small), MD(medium), LG(large) devices.|
82 | |XS_Offset
SM_Offset
MD_Offset
LG_Offset
|int|Gets or sets a value that determines grid columns offset for XS(extra small), SM(small), MD(medium), LG(large) devices.|
83 | |XS_Push
SM_Push
MD_Push
LG_Push
|int|Gets or sets a value that moves columns to right from the original position.|
84 | |XS_Pull
SM_Pull
MD_Pull
LG_Pull
|int|Gets or sets a value that moves columns to left from the original position.|
85 |
86 |
87 | ##### Compared to bootstrap
88 |
89 | |bootstrap|ResponsiveGrid|
90 | |-----|-----|
91 | |col-xs
col-sm
col-md
col-lg
|XS
SM
MD
LG
|
92 | |col-xs-offset
col-sm-offset
col-md-offset
col-lg-offset
|XS_Offset
SM_Offset
MD_Offset
LG_Offset
|
93 | |col-xs-push
col-sm-push
col-md-push
col-lg-push
|XS_Push
SM_Push
MD_Push
LG_Push
|
94 | |col-xs-pull
col-sm-pull
col-md-pull
col-lg-pull
|XS_Pull
SM_Pull
MD_Pull
LG_Pull
|
95 | |visibility-xs, visibility-sm,…
hidden-xs, hidden-sm,...|(T.B.D.)|
96 |
97 |
98 |
99 | #### attention
100 | ResponsiveGrid is not suitable for ItemsPanel, because it isn't implemented VirtualizingPanel class.
101 |
102 | If you use ResponsiveGrid in ListBox as ItemsPanel.
103 | Your ListBox become to not virtualize items of ListBox.
104 |
105 |
106 |
107 | ### GridEx
108 | GridEx is Helper class for defining Grid properties.
109 |
110 | 
111 |
112 | #### Example1 (Row/Column Definition)
113 | ```xml
114 |
117 |
121 |
122 | ```
123 |
124 | 
125 |
126 |
127 | ##### Row/Column Definition with Min/Max size
128 |
129 | ```xml
130 |
133 |
137 |
138 | ```
139 | `ge:GridEx.ColumnDefinition="50, *(50-200), 2*(80-), 2*(-300)"` is similar to below definition.
140 |
141 | ```xml
142 |
143 |
144 |
145 |
146 |
147 |
148 | ```
149 |
150 | #### Example2 (Area Definition)
151 | `Area` property provides the way of defineing Row/Column/RowSpan/ColumnSpan.
152 |
153 | ```xml
154 |
157 |
160 |
163 |
164 | ```
165 |
166 | 
167 |
168 |
169 | #### Example3 (Named Template Area)
170 |
171 | `TemplateArea` provides named grid areas, like CSS Grid Layout Module Level 1.
172 | `TemplateArea` property makes row/column definition. And, define region's name.
173 |
174 | Children of Grid can be placed with region's name, that is defined by `TemplateArea` property.
175 |
176 |
177 | ```xml
178 |
184 |
187 |
190 |
193 |
196 |
199 |
200 | ```
201 |
202 | 
203 |
204 |
205 | Row devision is defined by line feed or `/`.
206 | * line feed
207 | * `\n`(.cs)
208 | * `
`(xaml)
209 | * `/`
210 |
211 | ```xml
212 |
217 | ```
218 |
219 |
220 | #### Example4 (Named Template Area, working with RowDefinition/ColumnDefintion)
221 |
222 | ```xml
223 |
231 |
234 |
237 |
240 |
243 |
246 |
247 | ```
248 |
249 | 
250 |
251 |
252 |
253 |
254 | ##### Attached Properties(for Grid)
255 |
256 | |Property Name|Type|Description|
257 | |-----|-----|-----|
258 | |RowDefinition|string|Sets a value that determines row definition of Grid.|
259 | |ColumnDefinition|string|Sets a value that determines column definition of Grid.|
260 | |TemplateArea|string|Sets a definition of grid devision and area names. |
261 |
262 | ##### Attached Properties(for Grid children)
263 |
264 | |Property Name|Type|Description|
265 | |-----|-----|-----|
266 | |Area|string|Sets a value that determines Row, Column, RowSpan, ColumnSpan properties.|
267 | |AreaName|string|Sets a name of regions for item's belong.(use with `TemplateArea` property)|
268 |
269 |
270 |
271 | #### Example5 (Auto fill children)
272 |
273 | 
274 |
275 |
276 | ##### Attached Properties(for Grid)
277 | |Property Name|Type|Description|
278 | |-----|-----|-----|
279 | |AutoFillChildren|string|Gets or sets a value that indicates whether the Grid arranges its children to each cell.|
280 | |AutoFillOrientation|string|Sets a value that determines auto fill orientation.|
281 | ##### Attached Properties(for Grid children)
282 | |Property Name|Type|Description|
283 | |-----|-----|-----|
284 | |AutoFillSpan|string|Sets a value that determines cell span value that is used during AutoFill process.|
285 |
286 |
287 | ```xml
288 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
302 |
303 | ```
304 | 
305 |
306 |
307 | ##### AutoFillChildren with Hidden/Collapsed items
308 |
309 | ```xml
310 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 | ```
321 | 
322 |
323 |
324 |
325 | ##### AutoFillChildren with pinned items
326 |
327 | ```xml
328 |
331 |
332 |
333 |
334 |
335 |
336 |
337 | ```
338 |
339 | 
340 |
341 |
342 |
343 | ### WrapPanelEx **(WPF Only)**
344 | WrapPanelEx is Helper class that provide adaptive layout for WrapPanel.
345 |
346 | 
347 |
348 | #### Example1
349 | WrapPanelEx.AdaptiveLayout property makes WrapPanel into UWP Community Toolkit's [AdaptiveGridView](https://docs.microsoft.com/en-us/windows/uwpcommunitytoolkit/controls/AdaptiveGridView) like layout.
350 |
351 | ```xml
352 |
353 |
354 |
355 |
356 |
357 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
371 |
372 | ```
373 |
374 | ## Lisence
375 | [MIT](LICENSE)
376 |
--------------------------------------------------------------------------------
/GridExtra.Shared/ResponsiveGrid.Properties.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | #if WINDOWS_WPF
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | #elif WINDOWS_UWP
10 | using Windows.Foundation;
11 | using Windows.UI.Xaml;
12 | using Windows.UI.Xaml.Controls;
13 | #else
14 | #endif
15 |
16 |
17 | namespace SourceChord.GridExtra
18 | {
19 | public partial class ResponsiveGrid
20 | {
21 | #region ResponsiveGrid自体に設定する依存関係プロパティ
22 | // 各種ブレークポイントの設定用プロパティ
23 | public int MaxDivision
24 | {
25 | get { return (int)GetValue(MaxDivisionProperty); }
26 | set { SetValue(MaxDivisionProperty, value); }
27 | }
28 | #if WINDOWS_WPF
29 | // Using a DependencyProperty as the backing store for MaxDivision. This enables animation, styling, binding, etc...
30 | public static readonly DependencyProperty MaxDivisionProperty =
31 | DependencyProperty.Register("MaxDivision",
32 | typeof(int),
33 | typeof(ResponsiveGrid),
34 | new FrameworkPropertyMetadata(12, FrameworkPropertyMetadataOptions.AffectsMeasure));
35 | #elif WINDOWS_UWP
36 | // Using a DependencyProperty as the backing store for MaxDivision. This enables animation, styling, binding, etc...
37 | public static readonly DependencyProperty MaxDivisionProperty =
38 | DependencyProperty.Register("MaxDivision", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(12, OnDependencyPropertyChanged));
39 |
40 | private static void OnDependencyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
41 | {
42 | var element = d as FrameworkElement;
43 | var parent = element?.Parent as ResponsiveGrid;
44 | parent?.InvalidateMeasure();
45 | }
46 | #else
47 | #endif
48 |
49 | public BreakPoints BreakPoints
50 | {
51 | get { return (BreakPoints)GetValue(BreakPointsProperty); }
52 | set { SetValue(BreakPointsProperty, value); }
53 | }
54 | #if WINDOWS_WPF
55 | // Using a DependencyProperty as the backing store for BreakPoints. This enables animation, styling, binding, etc...
56 | public static readonly DependencyProperty BreakPointsProperty =
57 | DependencyProperty.Register("BreakPoints",
58 | typeof(BreakPoints),
59 | typeof(ResponsiveGrid),
60 | new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsMeasure));
61 | #elif WINDOWS_UWP
62 | // Using a DependencyProperty as the backing store for BreakPoints. This enables animation, styling, binding, etc...
63 | public static readonly DependencyProperty BreakPointsProperty =
64 | DependencyProperty.Register("BreakPoints", typeof(BreakPoints), typeof(ResponsiveGrid), new PropertyMetadata(null, OnDependencyPropertyChanged));
65 | #else
66 | #endif
67 |
68 | #if WINDOWS_WPF
69 | public bool ShowGridLines
70 | {
71 | get { return (bool)GetValue(ShowGridLinesProperty); }
72 | set { SetValue(ShowGridLinesProperty, value); }
73 | }
74 | // Using a DependencyProperty as the backing store for ShowGridLines. This enables animation, styling, binding, etc...
75 | public static readonly DependencyProperty ShowGridLinesProperty =
76 | DependencyProperty.Register("ShowGridLines", typeof(bool), typeof(ResponsiveGrid), new PropertyMetadata(false));
77 | #endif
78 |
79 |
80 | #endregion
81 |
82 |
83 |
84 | #region 各子要素のサイズを決めるための添付プロパティ
85 | public static int GetXS(DependencyObject obj)
86 | {
87 | return (int)obj.GetValue(XSProperty);
88 | }
89 | public static void SetXS(DependencyObject obj, int value)
90 | {
91 | obj.SetValue(XSProperty, value);
92 | }
93 | #if WINDOWS_WPF
94 | // Using a DependencyProperty as the backing store for XS. This enables animation, styling, binding, etc...
95 | public static readonly DependencyProperty XSProperty =
96 | DependencyProperty.RegisterAttached("XS",
97 | typeof(int),
98 | typeof(ResponsiveGrid),
99 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
100 | #elif WINDOWS_UWP
101 | // Using a DependencyProperty as the backing store for XS. This enables animation, styling, binding, etc...
102 | public static readonly DependencyProperty XSProperty =
103 | DependencyProperty.RegisterAttached("XS", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
104 |
105 | private static void OnAttachedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
106 | {
107 | var element = d as FrameworkElement;
108 | var parent = element?.Parent as ResponsiveGrid;
109 | parent?.InvalidateMeasure();
110 | }
111 | #else
112 | #endif
113 |
114 | public static int GetSM(DependencyObject obj)
115 | {
116 | return (int)obj.GetValue(SMProperty);
117 | }
118 | public static void SetSM(DependencyObject obj, int value)
119 | {
120 | obj.SetValue(SMProperty, value);
121 | }
122 | #if WINDOWS_WPF
123 | // Using a DependencyProperty as the backing store for SM. This enables animation, styling, binding, etc...
124 | public static readonly DependencyProperty SMProperty =
125 | DependencyProperty.RegisterAttached("SM",
126 | typeof(int),
127 | typeof(ResponsiveGrid),
128 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
129 | #elif WINDOWS_UWP
130 | // Using a DependencyProperty as the backing store for SM. This enables animation, styling, binding, etc...
131 | public static readonly DependencyProperty SMProperty =
132 | DependencyProperty.RegisterAttached("SM", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
133 | #else
134 | #endif
135 |
136 | public static int GetMD(DependencyObject obj)
137 | {
138 | return (int)obj.GetValue(MDProperty);
139 | }
140 | public static void SetMD(DependencyObject obj, int value)
141 | {
142 | obj.SetValue(MDProperty, value);
143 | }
144 | #if WINDOWS_WPF
145 | // Using a DependencyProperty as the backing store for MD. This enables animation, styling, binding, etc...
146 | public static readonly DependencyProperty MDProperty =
147 | DependencyProperty.RegisterAttached("MD",
148 | typeof(int),
149 | typeof(ResponsiveGrid),
150 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
151 | #elif WINDOWS_UWP
152 | // Using a DependencyProperty as the backing store for MD. This enables animation, styling, binding, etc...
153 | public static readonly DependencyProperty MDProperty =
154 | DependencyProperty.RegisterAttached("MD", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
155 | #else
156 | #endif
157 |
158 | public static int GetLG(DependencyObject obj)
159 | {
160 | return (int)obj.GetValue(LGProperty);
161 | }
162 | public static void SetLG(DependencyObject obj, int value)
163 | {
164 | obj.SetValue(LGProperty, value);
165 | }
166 | #if WINDOWS_WPF
167 | // Using a DependencyProperty as the backing store for LG. This enables animation, styling, binding, etc...
168 | public static readonly DependencyProperty LGProperty =
169 | DependencyProperty.RegisterAttached("LG",
170 | typeof(int),
171 | typeof(ResponsiveGrid),
172 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
173 | #elif WINDOWS_UWP
174 | // Using a DependencyProperty as the backing store for LG. This enables animation, styling, binding, etc...
175 | public static readonly DependencyProperty LGProperty =
176 | DependencyProperty.RegisterAttached("LG", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
177 | #else
178 | #endif
179 |
180 | #endregion
181 |
182 | #region Offsetプロパティ
183 | public static int GetXS_Offset(DependencyObject obj)
184 | {
185 | return (int)obj.GetValue(XS_OffsetProperty);
186 | }
187 | public static void SetXS_Offset(DependencyObject obj, int value)
188 | {
189 | obj.SetValue(XS_OffsetProperty, value);
190 | }
191 | #if WINDOWS_WPF
192 | // Using a DependencyProperty as the backing store for XS_Offset. This enables animation, styling, binding, etc...
193 | public static readonly DependencyProperty XS_OffsetProperty =
194 | DependencyProperty.RegisterAttached("XS_Offset",
195 | typeof(int),
196 | typeof(ResponsiveGrid),
197 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
198 | #elif WINDOWS_UWP
199 | // Using a DependencyProperty as the backing store for XS_Offset. This enables animation, styling, binding, etc...
200 | public static readonly DependencyProperty XS_OffsetProperty =
201 | DependencyProperty.RegisterAttached("XS_Offset", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
202 | #else
203 | #endif
204 |
205 | public static int GetSM_Offset(DependencyObject obj)
206 | {
207 | return (int)obj.GetValue(SM_OffsetProperty);
208 | }
209 | public static void SetSM_Offset(DependencyObject obj, int value)
210 | {
211 | obj.SetValue(SM_OffsetProperty, value);
212 | }
213 | #if WINDOWS_WPF
214 | // Using a DependencyProperty as the backing store for SM_Offset. This enables animation, styling, binding, etc...
215 | public static readonly DependencyProperty SM_OffsetProperty =
216 | DependencyProperty.RegisterAttached("SM_Offset",
217 | typeof(int),
218 | typeof(ResponsiveGrid),
219 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
220 | #elif WINDOWS_UWP
221 | // Using a DependencyProperty as the backing store for SM_Offset. This enables animation, styling, binding, etc...
222 | public static readonly DependencyProperty SM_OffsetProperty =
223 | DependencyProperty.RegisterAttached("SM_Offset", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
224 | #else
225 | #endif
226 |
227 | public static int GetMD_Offset(DependencyObject obj)
228 | {
229 | return (int)obj.GetValue(MD_OffsetProperty);
230 | }
231 | public static void SetMD_Offset(DependencyObject obj, int value)
232 | {
233 | obj.SetValue(MD_OffsetProperty, value);
234 | }
235 | #if WINDOWS_WPF
236 | // Using a DependencyProperty as the backing store for MD_Offset. This enables animation, styling, binding, etc...
237 | public static readonly DependencyProperty MD_OffsetProperty =
238 | DependencyProperty.RegisterAttached("MD_Offset",
239 | typeof(int),
240 | typeof(ResponsiveGrid),
241 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
242 | #elif WINDOWS_UWP
243 | // Using a DependencyProperty as the backing store for MD_Offset. This enables animation, styling, binding, etc...
244 | public static readonly DependencyProperty MD_OffsetProperty =
245 | DependencyProperty.RegisterAttached("MD_Offset", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
246 | #else
247 | #endif
248 |
249 | public static int GetLG_Offset(DependencyObject obj)
250 | {
251 | return (int)obj.GetValue(LG_OffsetProperty);
252 | }
253 | public static void SetLG_Offset(DependencyObject obj, int value)
254 | {
255 | obj.SetValue(LG_OffsetProperty, value);
256 | }
257 | #if WINDOWS_WPF
258 | // Using a DependencyProperty as the backing store for LG_Offset. This enables animation, styling, binding, etc...
259 | public static readonly DependencyProperty LG_OffsetProperty =
260 | DependencyProperty.RegisterAttached("LG_Offset",
261 | typeof(int),
262 | typeof(ResponsiveGrid),
263 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
264 | #elif WINDOWS_UWP
265 | // Using a DependencyProperty as the backing store for LG_Offset. This enables animation, styling, binding, etc...
266 | public static readonly DependencyProperty LG_OffsetProperty =
267 | DependencyProperty.RegisterAttached("LG_Offset", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
268 | #else
269 | #endif
270 |
271 | #endregion
272 |
273 |
274 | #region Pushプロパティ
275 | public static int GetXS_Push(DependencyObject obj)
276 | {
277 | return (int)obj.GetValue(XS_PushProperty);
278 | }
279 | public static void SetXS_Push(DependencyObject obj, int value)
280 | {
281 | obj.SetValue(XS_PushProperty, value);
282 | }
283 | #if WINDOWS_WPF
284 | // Using a DependencyProperty as the backing store for XS_Push. This enables animation, styling, binding, etc...
285 | public static readonly DependencyProperty XS_PushProperty =
286 | DependencyProperty.RegisterAttached("XS_Push",
287 | typeof(int),
288 | typeof(ResponsiveGrid),
289 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
290 | #elif WINDOWS_UWP
291 | // Using a DependencyProperty as the backing store for XS_Push. This enables animation, styling, binding, etc...
292 | public static readonly DependencyProperty XS_PushProperty =
293 | DependencyProperty.RegisterAttached("XS_Push", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
294 | #else
295 | #endif
296 |
297 | public static int GetSM_Push(DependencyObject obj)
298 | {
299 | return (int)obj.GetValue(SM_PushProperty);
300 | }
301 | public static void SetSM_Push(DependencyObject obj, int value)
302 | {
303 | obj.SetValue(SM_PushProperty, value);
304 | }
305 | #if WINDOWS_WPF
306 | // Using a DependencyProperty as the backing store for SM_Push. This enables animation, styling, binding, etc...
307 | public static readonly DependencyProperty SM_PushProperty =
308 | DependencyProperty.RegisterAttached("SM_Push",
309 | typeof(int),
310 | typeof(ResponsiveGrid),
311 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
312 | #elif WINDOWS_UWP
313 | // Using a DependencyProperty as the backing store for SM_Push. This enables animation, styling, binding, etc...
314 | public static readonly DependencyProperty SM_PushProperty =
315 | DependencyProperty.RegisterAttached("SM_Push", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
316 | #else
317 | #endif
318 |
319 | public static int GetMD_Push(DependencyObject obj)
320 | {
321 | return (int)obj.GetValue(MD_PushProperty);
322 | }
323 | public static void SetMD_Push(DependencyObject obj, int value)
324 | {
325 | obj.SetValue(MD_PushProperty, value);
326 | }
327 | #if WINDOWS_WPF
328 | // Using a DependencyProperty as the backing store for MD_Push. This enables animation, styling, binding, etc...
329 | public static readonly DependencyProperty MD_PushProperty =
330 | DependencyProperty.RegisterAttached("MD_Push",
331 | typeof(int),
332 | typeof(ResponsiveGrid),
333 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
334 | #elif WINDOWS_UWP
335 | // Using a DependencyProperty as the backing store for MD_Push. This enables animation, styling, binding, etc...
336 | public static readonly DependencyProperty MD_PushProperty =
337 | DependencyProperty.RegisterAttached("MD_Push", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
338 | #else
339 | #endif
340 |
341 | public static int GetLG_Push(DependencyObject obj)
342 | {
343 | return (int)obj.GetValue(LG_PushProperty);
344 | }
345 | public static void SetLG_Push(DependencyObject obj, int value)
346 | {
347 | obj.SetValue(LG_PushProperty, value);
348 | }
349 | #if WINDOWS_WPF
350 | // Using a DependencyProperty as the backing store for LG_Push. This enables animation, styling, binding, etc...
351 | public static readonly DependencyProperty LG_PushProperty =
352 | DependencyProperty.RegisterAttached("LG_Push",
353 | typeof(int),
354 | typeof(ResponsiveGrid),
355 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
356 | #elif WINDOWS_UWP
357 | // Using a DependencyProperty as the backing store for LG_Push. This enables animation, styling, binding, etc...
358 | public static readonly DependencyProperty LG_PushProperty =
359 | DependencyProperty.RegisterAttached("LG_Push", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
360 | #else
361 | #endif
362 |
363 | #endregion
364 |
365 |
366 | #region Pullプロパティ
367 | public static int GetXS_Pull(DependencyObject obj)
368 | {
369 | return (int)obj.GetValue(XS_PullProperty);
370 | }
371 | public static void SetXS_Pull(DependencyObject obj, int value)
372 | {
373 | obj.SetValue(XS_PullProperty, value);
374 | }
375 | #if WINDOWS_WPF
376 | // Using a DependencyProperty as the backing store for XS_Pull. This enables animation, styling, binding, etc...
377 | public static readonly DependencyProperty XS_PullProperty =
378 | DependencyProperty.RegisterAttached("XS_Pull",
379 | typeof(int),
380 | typeof(ResponsiveGrid),
381 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
382 | #elif WINDOWS_UWP
383 | // Using a DependencyProperty as the backing store for XS_Pull. This enables animation, styling, binding, etc...
384 | public static readonly DependencyProperty XS_PullProperty =
385 | DependencyProperty.RegisterAttached("XS_Pull", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
386 | #else
387 | #endif
388 |
389 | public static int GetSM_Pull(DependencyObject obj)
390 | {
391 | return (int)obj.GetValue(SM_PullProperty);
392 | }
393 | public static void SetSM_Pull(DependencyObject obj, int value)
394 | {
395 | obj.SetValue(SM_PullProperty, value);
396 | }
397 | #if WINDOWS_WPF
398 | // Using a DependencyProperty as the backing store for SM_Pull. This enables animation, styling, binding, etc...
399 | public static readonly DependencyProperty SM_PullProperty =
400 | DependencyProperty.RegisterAttached("SM_Pull",
401 | typeof(int),
402 | typeof(ResponsiveGrid),
403 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
404 | #elif WINDOWS_UWP
405 | // Using a DependencyProperty as the backing store for SM_Pull. This enables animation, styling, binding, etc...
406 | public static readonly DependencyProperty SM_PullProperty =
407 | DependencyProperty.RegisterAttached("SM_Pull", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
408 | #else
409 | #endif
410 |
411 | public static int GetMD_Pull(DependencyObject obj)
412 | {
413 | return (int)obj.GetValue(MD_PullProperty);
414 | }
415 | public static void SetMD_Pull(DependencyObject obj, int value)
416 | {
417 | obj.SetValue(MD_PullProperty, value);
418 | }
419 | #if WINDOWS_WPF
420 | // Using a DependencyProperty as the backing store for MD_Pull. This enables animation, styling, binding, etc...
421 | public static readonly DependencyProperty MD_PullProperty =
422 | DependencyProperty.RegisterAttached("MD_Pull",
423 | typeof(int),
424 | typeof(ResponsiveGrid),
425 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
426 | #elif WINDOWS_UWP
427 | // Using a DependencyProperty as the backing store for MD_Pull. This enables animation, styling, binding, etc...
428 | public static readonly DependencyProperty MD_PullProperty =
429 | DependencyProperty.RegisterAttached("MD_Pull", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
430 | #else
431 | #endif
432 |
433 | public static int GetLG_Pull(DependencyObject obj)
434 | {
435 | return (int)obj.GetValue(LG_PullProperty);
436 | }
437 | public static void SetLG_Pull(DependencyObject obj, int value)
438 | {
439 | obj.SetValue(LG_PullProperty, value);
440 | }
441 | #if WINDOWS_WPF
442 | // Using a DependencyProperty as the backing store for LG_Pull. This enables animation, styling, binding, etc...
443 | public static readonly DependencyProperty LG_PullProperty =
444 | DependencyProperty.RegisterAttached("LG_Pull",
445 | typeof(int),
446 | typeof(ResponsiveGrid),
447 | new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
448 | #elif WINDOWS_UWP
449 | // Using a DependencyProperty as the backing store for LG_Pull. This enables animation, styling, binding, etc...
450 | public static readonly DependencyProperty LG_PullProperty =
451 | DependencyProperty.RegisterAttached("LG_Pull", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0, OnAttachedPropertyChanged));
452 | #else
453 | #endif
454 |
455 | #endregion
456 |
457 |
458 | #region 読み取り専用の添付プロパティ
459 | public static int GetActualColumn(DependencyObject obj)
460 | {
461 | return (int)obj.GetValue(ActualColumnProperty);
462 | }
463 | protected static void SetActualColumn(DependencyObject obj, int value)
464 | {
465 | obj.SetValue(ActualColumnProperty, value);
466 | }
467 | // Using a DependencyProperty as the backing store for ActualColumn. This enables animation, styling, binding, etc...
468 | public static readonly DependencyProperty ActualColumnProperty =
469 | DependencyProperty.RegisterAttached("ActualColumn", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0));
470 |
471 | public static int GetActualRow(DependencyObject obj)
472 | {
473 | return (int)obj.GetValue(ActualRowProperty);
474 | }
475 | protected static void SetActualRow(DependencyObject obj, int value)
476 | {
477 | obj.SetValue(ActualRowProperty, value);
478 | }
479 | // Using a DependencyProperty as the backing store for ActualRow. This enables animation, styling, binding, etc...
480 | public static readonly DependencyProperty ActualRowProperty =
481 | DependencyProperty.RegisterAttached("ActualRow", typeof(int), typeof(ResponsiveGrid), new PropertyMetadata(0));
482 |
483 | #endregion
484 | }
485 | }
486 |
--------------------------------------------------------------------------------
/GridExtra.Shared/GridEx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | #if WINDOWS_WPF
8 | using System.Windows;
9 | using System.Windows.Controls;
10 | using System.Windows.Media;
11 | #elif WINDOWS_UWP
12 | using Windows.Foundation;
13 | using Windows.UI.Xaml;
14 | using Windows.UI.Xaml.Controls;
15 | #else
16 | #endif
17 |
18 |
19 | namespace SourceChord.GridExtra
20 | {
21 | #if WINDOWS_WPF
22 | using LayoutUpdateEventHandler = EventHandler;
23 | #elif WINDOWS_UWP
24 | using LayoutUpdateEventHandler = EventHandler