├── .gitignore
├── LICENSE
├── README.md
├── build.cmd
├── build.proj
├── build
└── packages.config
└── src
├── .editorconfig
├── Before.Xamarin.Forms.Dynamic.sln.targets
├── Demo
├── DynamicFormsDemo.Android
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── DynamicFormsDemo.Android.csproj
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.Designer.cs
│ │ ├── drawable
│ │ │ └── Icon.png
│ │ ├── layout
│ │ │ └── Main.axml
│ │ └── values
│ │ │ └── Strings.xml
│ └── packages.config
├── DynamicFormsDemo.iOS.Classic
│ ├── AppDelegate.cs
│ ├── DynamicFormsDemo.iOS.Classic.csproj
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ └── Default-568h@2x.png
│ └── packages.config
├── DynamicFormsDemo.iOS
│ ├── AppDelegate.cs
│ ├── DynamicFormsDemo.iOS.csproj
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
└── DynamicFormsDemo
│ ├── App.cs
│ ├── DynamicFormsDemo.csproj
│ ├── Main.json
│ ├── Main.xaml
│ ├── Properties
│ └── AssemblyInfo.cs
│ └── packages.config
├── GlobalAssemblyInfo.cs
├── IntegrationTests
├── DictionaryModelSpec.cs
├── IntegrationTests.csproj
├── JsonModelSpec.cs
├── MockPlatformServices.cs
├── Properties
│ └── AssemblyInfo.cs
└── packages.config
├── ModelTests
├── CommandsTests.cs
├── DictionaryModelTests.cs
├── JsonTests.cs
├── ModelTests.csproj
├── Properties
│ └── AssemblyInfo.cs
└── packages.config
├── NuGet.Restore.targets
├── Xamarin.Forms.Dynamic.Android
├── Properties
│ └── AssemblyInfo.cs
├── Resources
│ ├── AboutResources.txt
│ ├── Resource.Designer.cs
│ └── Values
│ │ └── Strings.xml
├── Xamarin.Forms.Dynamic.Android.csproj
└── packages.config
├── Xamarin.Forms.Dynamic.Desktop
├── BindingObjectExtensions.cs
├── DictionaryModel.cs
├── DynamicParameterInfo.cs
├── DynamicPropertyInfo.cs
├── DynamicTypeInfo.cs
├── JsonCommand.cs
├── JsonExtensions.cs
├── JsonModel.cs
├── Xamarin.Forms.Dynamic.Desktop.csproj
└── packages.config
├── Xamarin.Forms.Dynamic.WP8
├── JTypeInfo.cs
├── Properties
│ └── AssemblyInfo.cs
├── Xamarin.Forms.Dynamic.WP8.csproj
└── packages.config
├── Xamarin.Forms.Dynamic.iOS.Classic
├── Properties
│ └── AssemblyInfo.cs
├── Xamarin.Forms.Dynamic.iOS.Classic.csproj
└── packages.config
├── Xamarin.Forms.Dynamic.iOS
├── Properties
│ └── AssemblyInfo.cs
├── Xamarin.Forms.Dynamic.iOS.csproj
└── packages.config
├── Xamarin.Forms.Dynamic.nuspec
├── Xamarin.Forms.Dynamic.sln
├── Xamarin.Forms.Dynamic.targets
└── Xamarin.Forms.Dynamic
├── BindingObjectExtensions.cs
├── DictionaryModel.cs
├── JsonModel.cs
├── Xamarin.Forms.Dynamic.csproj
└── packages.config
/.gitignore:
--------------------------------------------------------------------------------
1 | .nuget
2 | .vs
3 | bin
4 | obj
5 | packages
6 | *.nupkg
7 | *.suo
8 | *.user
9 | .DS_Store
10 | *.DS_Store
11 | *.cache
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Mobile Essentials
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 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DynamicForms
2 | Makes Xamarin.Forms more dynamic, by allowing loading of XAML for views, and Json for bi-directionally bindable view models
3 |
4 | ## Install
5 |
6 | PM> Install-Package Xamarin.Forms.Dynamic -Pre
7 |
8 |
9 | > Note: Json view models aren't supported on Windows Phone yet.
--------------------------------------------------------------------------------
/build.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | rem Only need to run this the first time after clone. Subsequent builds can be just "msbuild".
3 | rem Alternatively, this batch file can be invoked passing msbuild parameters, like: build.cmd /v:detailed /t:Rebuild
4 |
5 | cd %~dp0
6 |
7 | SETLOCAL
8 | SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
9 |
10 | IF EXIST %CACHED_NUGET% goto copynuget
11 | echo Downloading latest version of NuGet.exe...
12 | IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
13 | @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
14 |
15 | :copynuget
16 | IF EXIST build\.nuget\nuget.exe goto restore
17 | md build\.nuget
18 | copy %CACHED_NUGET% build\.nuget\nuget.exe > nul
19 |
20 | :restore
21 | IF NOT EXIST build\packages.config goto run
22 | build\.nuget\NuGet.exe install build\packages.config -OutputDirectory build\packages -ExcludeVersion
23 |
24 | :run
25 | msbuild /nologo /v:minimal /p:WarningLevel=0 %1 %2 %3 %4 %5 %6 %7 %8 %9
--------------------------------------------------------------------------------
/build.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | high
7 | build\
8 |
9 |
10 |
11 | $(IntermediateOutputPath).nuget
12 | $(NuGetPath)\NuGet.exe
13 |
14 |
15 |
16 | nuget
17 |
18 |
19 |
20 |
21 | $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)
22 | -Version $(Version) -NoPackageAnalysis -NonInteractive -OutputDirectory out -Properties Configuration=$(Configuration)
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/build/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/.editorconfig:
--------------------------------------------------------------------------------
1 | ; EditorConfig to support per-solution formatting.
2 | ; Use the EditorConfig VS add-in to make this work.
3 | ; http://editorconfig.org/
4 |
5 | ; This is the default for the codeline.
6 | root = true
7 |
8 | [*]
9 | end_of_line = CRLF
10 |
11 | [*.{cs,fs}]
12 | indent_style = tab
13 | indent_size = 4
14 |
15 | [*.{sln,proj,props,targets,xaml,config,nuspec,vsixmanifest,vsct,vstemplate}]
16 | indent_style = tab
17 | indent_size = 4
18 |
19 | [*.{csproj,ps1,resx,rst,fsproj}]
20 | indent_style = space
21 | indent_size = 2
22 |
--------------------------------------------------------------------------------
/src/Before.Xamarin.Forms.Dynamic.sln.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | .\
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Demo/DynamicFormsDemo.Android/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
--------------------------------------------------------------------------------
/src/Demo/DynamicFormsDemo.Android/DynamicFormsDemo.Android.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {B69409D8-C4E2-4FEA-BC80-761E389E0746}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | DynamicFormsDemo.Android
13 | DynamicFormsDemo.Android
14 | 512
15 | true
16 | Resources\Resource.Designer.cs
17 | Off
18 | True
19 | v5.0
20 | Properties\AndroidManifest.xml
21 | ..\..\
22 | true
23 |
24 |
25 | true
26 | full
27 | false
28 | bin\Debug\
29 | DEBUG;TRACE
30 | prompt
31 | 4
32 | True
33 | None
34 |
35 |
36 | pdbonly
37 | true
38 | bin\Release\
39 | TRACE
40 | prompt
41 | 4
42 | False
43 | SdkOnly
44 |
45 |
46 |
47 | ..\..\packages\Xamarin.Forms.Master.1.2.2.8690\lib\MonoAndroid10\FormsViewGroup.dll
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | ..\..\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\Xamarin.Android.Support.v4.dll
57 |
58 |
59 | ..\..\packages\Xamarin.Forms.Master.1.2.2.8690\lib\MonoAndroid10\Xamarin.Forms.Core.dll
60 |
61 |
62 | ..\..\packages\Xamarin.Forms.Master.1.2.2.8690\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
63 |
64 |
65 | ..\..\packages\Xamarin.Forms.Master.1.2.2.8690\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
66 |
67 |
68 | ..\..\packages\Xamarin.Forms.Master.1.2.2.8690\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
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 | {eba60109-e20a-4c9d-a730-e40eaa90589e}
96 | Xamarin.Forms.Dynamic.Android
97 |
98 |
99 | {500905ca-9bf4-43c6-9af8-71dee6618ddd}
100 | DynamicFormsDemo
101 |
102 |
103 |
104 |
105 |
106 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
107 |
108 |
109 |
110 |
111 |
118 |
--------------------------------------------------------------------------------
/src/Demo/DynamicFormsDemo.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.App;
3 | using Android.Content;
4 | using Android.Runtime;
5 | using Android.Views;
6 | using Android.Widget;
7 | using Android.OS;
8 |
9 | namespace DynamicFormsDemo.Android
10 | {
11 | [Activity (Label = "DynamicFormsDemo.Android", MainLauncher = true, Icon = "@drawable/icon")]
12 | public class MainActivity : Activity
13 | {
14 | int count = 1;
15 |
16 | protected override void OnCreate (Bundle bundle)
17 | {
18 | base.OnCreate (bundle);
19 |
20 | // Set our view from the "main" layout resource
21 | SetContentView (Resource.Layout.Main);
22 |
23 | // Get our button from the layout resource,
24 | // and attach an event to it
25 | Button button = FindViewById