├── .gitattributes
├── .github
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── LICENSE.md
├── Xfx.Controls.sln
├── Xfx.Controls.sln.DotSettings
├── build.cake
├── build.ps1
├── build.sh
├── example
├── Xfx.Controls.Example.Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.Designer.cs
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ └── drawable
│ │ │ └── icon.png
│ ├── Xfx.Controls.Example.Droid.csproj
│ └── packages.config
├── Xfx.Controls.Example.iOS
│ ├── AppDelegate.cs
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-76.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-Small-40.png
│ │ ├── Icon-Small-40@2x.png
│ │ ├── Icon-Small-40@3x.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Small@3x.png
│ │ ├── LaunchScreen.storyboard
│ │ └── Media.xcassets
│ │ │ ├── AppIcons.appiconset
│ │ │ └── Contents.json
│ │ │ └── LaunchImages.launchimage
│ │ │ └── Contents.json
│ ├── Xfx.Controls.Example.iOS.csproj
│ ├── iTunesArtwork
│ ├── iTunesArtwork@2x
│ └── packages.config
└── Xfx.Controls.Example
│ ├── Annotations.cs
│ ├── App.cs
│ ├── BaseViewModel.cs
│ ├── Features
│ └── Controls
│ │ ├── ControlsPage.xaml
│ │ ├── ControlsPage.xaml.cs
│ │ └── ControlsPageModel.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ └── Xfx.Controls.Example.csproj
├── readme.md
├── resources
├── xfx.controls.droid.gif
├── xfx.controls.ios.gif
└── xfx.png
├── src
├── SolutionInfo.cs
├── Xfx.Controls.Droid
│ ├── Extensions
│ │ ├── CollectionExtensions.cs
│ │ ├── ColorExtensions.cs
│ │ ├── FontExtensions.cs
│ │ └── KeyboardExtensions.cs
│ ├── Forms.Internals
│ │ ├── GestureManager.cs
│ │ ├── InnerGestureListener.cs
│ │ ├── InnerScaleListener.cs
│ │ ├── InstantAutoCompleteTextView.cs
│ │ ├── PanGestureHandler.cs
│ │ ├── PinchGestureHandler.cs
│ │ └── TapGestureHandler.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Renderers
│ │ ├── XfxCardViewRendererDroid.cs
│ │ ├── XfxComboBoxRendererDroid.cs
│ │ └── XfxEntryRendererDroid.cs
│ ├── Resources
│ │ └── Resource.Designer.cs
│ ├── Xfx.Controls.Droid.csproj
│ ├── XfxComboBox
│ │ ├── XfxComboBoxArrayAdapter.cs
│ │ └── XfxComboBoxFilter.cs
│ ├── XfxControls.cs
│ ├── XfxVisualElementManager.cs
│ └── packages.config
├── Xfx.Controls.Shared
│ ├── Extensions
│ │ └── XamarinFormsExtensions.cs
│ ├── Xfx.Controls.Shared.projitems
│ └── Xfx.Controls.Shared.shproj
├── Xfx.Controls.iOS
│ ├── Controls
│ │ ├── FloatLabeledTextField.cs
│ │ ├── MbAutoComplete
│ │ │ ├── MbAutoCompleteDefaultDataSource.cs
│ │ │ ├── MbAutoCompleteTableView.cs
│ │ │ ├── MbAutoCompleteTextField.cs
│ │ │ └── MbAutoCompleteViewSource.cs
│ │ └── UICardView.cs
│ ├── Extensions
│ │ ├── ColorExtensions.cs
│ │ ├── FontExtensions.cs
│ │ ├── KeyboardExtensions.cs
│ │ ├── StringExtensions.cs
│ │ └── UIViewExtensions.cs
│ ├── InvalidRendererException.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Renderers
│ │ ├── XfxCardViewRendererTouch.cs
│ │ ├── XfxComboBoxRendererTouch.cs
│ │ └── XfxEntryRendererTouch.cs
│ ├── Xfx.Controls.iOS.csproj
│ ├── XfxControls.cs
│ ├── XfxVisualElementManager.cs
│ └── packages.config
└── Xfx.Controls
│ ├── Behaviors
│ ├── BindableBehavior.cs
│ └── ValidatesOnNotifyDataErrors.cs
│ ├── IXfxValidatableElement.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Xfx.Controls.csproj
│ ├── XfxBinding.cs
│ ├── XfxBindingExtensions.cs
│ ├── XfxCardView.cs
│ ├── XfxComboBox.cs
│ ├── XfxEntry.cs
│ └── XfxSelectedItemChangedEventArgs.cs
└── tools
├── Cake
├── .signature.p7s
├── Autofac.dll
├── Cake.Common.dll
├── Cake.Common.xml
├── Cake.Core.dll
├── Cake.Core.xml
├── Cake.NuGet.dll
├── Cake.NuGet.xml
├── Cake.exe
├── Cake.exe.config
├── Cake.xml
├── LICENSE
├── Microsoft.CodeAnalysis.CSharp.Scripting.dll
├── Microsoft.CodeAnalysis.CSharp.dll
├── Microsoft.CodeAnalysis.Scripting.dll
├── Microsoft.CodeAnalysis.dll
├── Microsoft.Web.XmlTransform.dll
├── Microsoft.Win32.Primitives.dll
├── Newtonsoft.Json.dll
├── NuGet.Commands.dll
├── NuGet.Common.dll
├── NuGet.Configuration.dll
├── NuGet.Credentials.dll
├── NuGet.DependencyResolver.Core.dll
├── NuGet.Frameworks.dll
├── NuGet.LibraryModel.dll
├── NuGet.PackageManagement.dll
├── NuGet.Packaging.Core.dll
├── NuGet.Packaging.dll
├── NuGet.ProjectModel.dll
├── NuGet.Protocol.dll
├── NuGet.Resolver.dll
├── NuGet.Versioning.dll
├── System.AppContext.dll
├── System.Collections.Concurrent.dll
├── System.Collections.Immutable.dll
├── System.Collections.NonGeneric.dll
├── System.Collections.Specialized.dll
├── System.Collections.dll
├── System.ComponentModel.EventBasedAsync.dll
├── System.ComponentModel.Primitives.dll
├── System.ComponentModel.TypeConverter.dll
├── System.ComponentModel.dll
├── System.Console.dll
├── System.Data.Common.dll
├── System.Diagnostics.Contracts.dll
├── System.Diagnostics.Debug.dll
├── System.Diagnostics.FileVersionInfo.dll
├── System.Diagnostics.Process.dll
├── System.Diagnostics.StackTrace.dll
├── System.Diagnostics.TextWriterTraceListener.dll
├── System.Diagnostics.Tools.dll
├── System.Diagnostics.TraceSource.dll
├── System.Diagnostics.Tracing.dll
├── System.Drawing.Primitives.dll
├── System.Dynamic.Runtime.dll
├── System.Globalization.Calendars.dll
├── System.Globalization.Extensions.dll
├── System.Globalization.dll
├── System.IO.Compression.ZipFile.dll
├── System.IO.Compression.dll
├── System.IO.FileSystem.DriveInfo.dll
├── System.IO.FileSystem.Primitives.dll
├── System.IO.FileSystem.Watcher.dll
├── System.IO.FileSystem.dll
├── System.IO.IsolatedStorage.dll
├── System.IO.MemoryMappedFiles.dll
├── System.IO.Pipes.dll
├── System.IO.UnmanagedMemoryStream.dll
├── System.IO.dll
├── System.Linq.Expressions.dll
├── System.Linq.Parallel.dll
├── System.Linq.Queryable.dll
├── System.Linq.dll
├── System.Net.Http.dll
├── System.Net.NameResolution.dll
├── System.Net.NetworkInformation.dll
├── System.Net.Ping.dll
├── System.Net.Primitives.dll
├── System.Net.Requests.dll
├── System.Net.Security.dll
├── System.Net.Sockets.dll
├── System.Net.WebHeaderCollection.dll
├── System.Net.WebSockets.Client.dll
├── System.Net.WebSockets.dll
├── System.ObjectModel.dll
├── System.Reflection.Extensions.dll
├── System.Reflection.Metadata.dll
├── System.Reflection.Primitives.dll
├── System.Reflection.dll
├── System.Resources.Reader.dll
├── System.Resources.ResourceManager.dll
├── System.Resources.Writer.dll
├── System.Runtime.CompilerServices.VisualC.dll
├── System.Runtime.Extensions.dll
├── System.Runtime.Handles.dll
├── System.Runtime.InteropServices.RuntimeInformation.dll
├── System.Runtime.InteropServices.dll
├── System.Runtime.Numerics.dll
├── System.Runtime.Serialization.Formatters.dll
├── System.Runtime.Serialization.Json.dll
├── System.Runtime.Serialization.Primitives.dll
├── System.Runtime.Serialization.Xml.dll
├── System.Runtime.dll
├── System.Security.Claims.dll
├── System.Security.Cryptography.Algorithms.dll
├── System.Security.Cryptography.Csp.dll
├── System.Security.Cryptography.Encoding.dll
├── System.Security.Cryptography.Primitives.dll
├── System.Security.Cryptography.X509Certificates.dll
├── System.Security.Principal.dll
├── System.Security.SecureString.dll
├── System.Text.Encoding.CodePages.dll
├── System.Text.Encoding.Extensions.dll
├── System.Text.Encoding.dll
├── System.Text.RegularExpressions.dll
├── System.Threading.Overlapped.dll
├── System.Threading.Tasks.Extensions.dll
├── System.Threading.Tasks.Parallel.dll
├── System.Threading.Tasks.dll
├── System.Threading.Thread.dll
├── System.Threading.ThreadPool.dll
├── System.Threading.Timer.dll
├── System.Threading.dll
├── System.ValueTuple.dll
├── System.Xml.ReaderWriter.dll
├── System.Xml.XDocument.dll
├── System.Xml.XPath.XDocument.dll
├── System.Xml.XPath.dll
├── System.Xml.XmlDocument.dll
├── System.Xml.XmlSerializer.dll
└── netstandard.dll
├── nuget.exe
├── packages.config
└── packages.config.md5sum
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
--------------------------------------------------------------------------------
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at chase.florell@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contribution Guidelines
2 |
3 | -----
4 |
5 | First of all, thank you for your willingness to contribute to Xfx.Controls. This is a fun little project that simply adds a little flare to some of the existing Xamarn Forms controls.
6 |
7 | ### Coding Style
8 |
9 | The coding style is quite simple. Please use the Visual Studio defauls for everything (SPACES NOT TABS), and also if you're running Resharper, try your best to get a green checkmark on every file you touch. R#'s default formatting can be acheived on a per-file basis by running ctrl + alt + shift + f.
10 |
11 | ### Renderer Approach
12 |
13 | It's really easy to make a mess of custom renderers. The best way to keep your renderers clean and supported is to follow the style used in the [Xamarin.Forms](https://github.com/Xamarin/Xamarin.Forms) repository.
14 |
15 | **Focused / Unfocused**
16 | When building a custom renderer from scratch (`ViewRenderer`), you'll have to ensure you use the reflection approach to raising the focused/unfocused event.*
17 |
18 | ```csharp
19 | var isFocusedPropertyKey = Element.GetInternalField("IsFocusedPropertyKey");
20 | ElementController.SetValueFromRenderer(isFocusedPropertyKey, true/false);
21 | ```
22 |
23 | **Events**
24 | A personal preference of mine is to not use the `MessagingCenter`. Instead I subscribe to `internal` events within the core library (these events are exposed to the other platforms via `InternalsVisibleTo`).
25 | Please avoid using the MessagingCenter in favor of event subscriptions.
26 |
27 | DON'T FORGET TO UNSUBSCRIBE FROM EVENTS
28 |
29 | ### Spelling, Documentation, Comments
30 |
31 | I'm absolutely open to taking Pull Requests just to fix spelling, documentation, or comments, providing they add value.
32 |
33 | - Please avoid unnecessary whitespace commits
34 | - Please don't fix spelling at the expense of breaking the API. Use the `[ObsoleteAttribute]` if you find a method, property, or enum value that is spelled incorrectly, and add the correct spelling beside it.
35 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Please fill out either the bug or feature request section and remove whatever section you are not using.
2 |
3 | # Bug
4 |
5 | * Version Number of Control:
6 | * Device Tested On:
7 | * Simulator Tested On:
8 |
9 | ### Affects
10 |
11 | - [ ] iOS
12 | - [ ] Android
13 |
14 | ### Expected Behavior
15 |
16 |
17 | ### Actual Behavior
18 |
19 |
20 | ### Steps to reproduce the Behavior
21 |
22 |
23 | ### Link to Github Reproduction (optional but recommended)
24 |
25 | [Repro]()
26 |
27 | # Feature Request:
28 | Please fill in what you would like
29 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Please take a moment to fill out the following (change to preview to check or place x in [ ]):
2 |
3 | ## Description
4 |
5 | Changes Proposed in this pull request:
6 | -
7 | -
8 | -
9 |
10 | ## This is a:
11 | - [ ] Bug Fix
12 | - [ ] Feature Request
13 | - [ ] New Feature
14 |
--------------------------------------------------------------------------------
/.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 | *.sln.docstates
8 | *.userprefs
9 |
10 | # Xamarin Components
11 | Components/
12 |
13 | # Nuget Releases
14 | *.nupkg
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | x64/
21 | build/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Pp]ackages/
26 | [Cc]omponents/
27 | data/
28 | .nuget/
29 | .vs/
30 | .idea/
31 | .droidres/
32 | *.csproj.bak
33 | build-artifacts/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | #NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 |
84 | # Visual Studio profiler
85 | *.psess
86 | *.vsp
87 | *.vspx
88 |
89 | # TFS 2012 Local Workspace
90 | $tf/
91 |
92 | # Guidance Automation Toolkit
93 | *.gpState
94 |
95 | # ReSharper is a .NET coding add-in
96 | _ReSharper*/
97 | *.[Rr]e[Ss]harper
98 | *.DotSettings.user
99 |
100 | # JustCode is a .NET coding addin-in
101 | .JustCode
102 |
103 | # TeamCity is a build add-in
104 | _TeamCity*
105 |
106 | # DotCover is a Code Coverage Tool
107 | *.dotCover
108 |
109 | # NCrunch
110 | *.ncrunch*
111 | _NCrunch_*
112 | .*crunch*.local.xml
113 |
114 | # MightyMoose
115 | *.mm.*
116 | AutoTest.Net/
117 |
118 | # Web workbench (sass)
119 | .sass-cache/
120 |
121 | # Installshield output folder
122 | [Ee]xpress/
123 |
124 | # DocProject is a documentation generator add-in
125 | DocProject/buildhelp/
126 | DocProject/Help/*.HxT
127 | DocProject/Help/*.HxC
128 | DocProject/Help/*.hhc
129 | DocProject/Help/*.hhk
130 | DocProject/Help/*.hhp
131 | DocProject/Help/Html2
132 | DocProject/Help/html
133 |
134 | # Click-Once directory
135 | publish/
136 |
137 | # Publish Web Output
138 | *.[Pp]ublish.xml
139 | *.azurePubxml
140 |
141 | # Windows Azure Build Output
142 | csx/
143 | *.build.csdef
144 |
145 | # Windows Store app package directory
146 | AppPackages/
147 |
148 | # Others
149 | sql/
150 | *.Cache
151 | ClientBin/
152 | [Ss]tyle[Cc]op.*
153 | ~$*
154 | *~
155 | *.dbmdl
156 | *.dbproj.schemaview
157 | *.pfx
158 | *.publishsettings
159 | node_modules/
160 | .DS_Store
161 |
162 | # RIA/Silverlight projects
163 | Generated_Code/
164 |
165 | # Backup & report files from converting an old project file to a newer
166 | # Visual Studio version. Backup files are not needed, because we have git ;-)
167 | _UpgradeReport_Files/
168 | Backup*/
169 | UpgradeLog*.XML
170 | UpgradeLog*.htm
171 |
172 | # SQL Server files
173 | *.mdf
174 | *.ldf
175 |
176 | # Business Intelligence projects
177 | *.rdl.data
178 | *.bim.layout
179 | *.bim_*.settings
180 |
181 | # Microsoft Fakes
182 | FakesAssemblies/
183 |
184 | ._.DS_Store
185 |
186 | # project.json
187 | *.lock.json
188 | *.nuget.props
189 | *.nuget.targets
190 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | =====================
3 |
4 | Copyright (c) 2017 Chase Florell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/Xfx.Controls.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
--------------------------------------------------------------------------------
/build.cake:
--------------------------------------------------------------------------------
1 | var target = Argument("target", "Default");
2 | var local = BuildSystem.IsLocalBuild;
3 | var appName = "Xfx.Controls";
4 | var versionParam = Argument("BuildVersion");
5 | var versionParts = versionParam.Split('.');
6 |
7 | var version = string.Format("{0}.{1}.{2}", versionParts[0],versionParts[1],versionParts[2]);
8 | var semVersion = local ? version : (version + string.Concat("-build-", versionParts[3]));
9 | var configuration = Argument("configuration", "Release");
10 | var primaryAuthor = "Chase Florell";
11 |
12 | var touchDir = MakeAbsolute(Directory("./build-artifacts/output/touch"));
13 | var droidDir = MakeAbsolute(Directory("./build-artifacts/output/droid"));
14 | var coreDir = MakeAbsolute(Directory("./build-artifacts/output/core"));
15 | var nugetOutDir = MakeAbsolute(Directory("./nuget"));
16 | Setup(context =>
17 | {
18 | var binsToClean = GetDirectories("./src/**/bin/");
19 | var artifactsToClean = new []{
20 | touchDir.ToString(),
21 | droidDir.ToString(),
22 | coreDir.ToString(),
23 | nugetOutDir.ToString()
24 | };
25 | CleanDirectories(binsToClean);
26 | CleanDirectories(artifactsToClean);
27 |
28 | //Executed BEFORE the first task.
29 | Information("Building version {0} of {1}.", semVersion, appName);
30 | });
31 |
32 | Task("Default")
33 | .IsDependentOn("Package Library");
34 |
35 | Task("Build Droid")
36 | .IsDependentOn("Patch Assembly Info")
37 | .Does(() =>
38 | {
39 | MSBuild("./src/Xfx.Controls.Droid/Xfx.Controls.Droid.csproj", new MSBuildSettings
40 | {
41 | ToolVersion = MSBuildToolVersion.VS2017
42 | }
43 | .WithProperty("OutDir", droidDir.ToString())
44 | .SetConfiguration(configuration));
45 | });
46 |
47 | Task("Build Touch")
48 | .IsDependentOn("Patch Assembly Info")
49 | .Does(() =>
50 | {
51 | MSBuild("./src/Xfx.Controls.iOS/Xfx.Controls.iOS.csproj", new MSBuildSettings
52 | {
53 | ToolVersion = MSBuildToolVersion.VS2017,
54 | MSBuildPlatform = (Cake.Common.Tools.MSBuild.MSBuildPlatform)1
55 | }
56 | .WithProperty("OutDir", touchDir.ToString())
57 | .SetConfiguration(configuration));
58 | });
59 |
60 | Task("Build Core")
61 | .IsDependentOn("Patch Assembly Info")
62 | .Does(() =>
63 | {
64 | MSBuild("./src/Xfx.Controls/Xfx.Controls.csproj", new MSBuildSettings
65 | {
66 | ToolVersion = MSBuildToolVersion.VS2017
67 | }
68 | .WithProperty("OutDir", coreDir.ToString())
69 | .SetConfiguration(configuration));
70 | });
71 |
72 | Task("Patch Assembly Info")
73 | .IsDependentOn("Nuget Restore")
74 | .Does(() =>
75 | {
76 | var file = "./src/SolutionInfo.cs";
77 |
78 | CreateAssemblyInfo(file, new AssemblyInfoSettings
79 | {
80 | Product = appName,
81 | Version = version,
82 | FileVersion = version,
83 | InformationalVersion = semVersion,
84 | Copyright = "Copyright (c) 2015 - " + DateTime.Now.Year.ToString() + " " + primaryAuthor
85 | });
86 | });
87 |
88 | Task("Nuget Restore")
89 | .Does(() => {
90 | NuGetRestore("./Xfx.Controls.sln", new NuGetRestoreSettings { NoCache = true });
91 | });
92 |
93 |
94 |
95 | Task("Package Library")
96 | .IsDependentOn("Build Droid")
97 | .IsDependentOn("Build Touch")
98 | .IsDependentOn("Build Core")
99 | .Does(() => {
100 | var nuGetPackSettings = new NuGetPackSettings {
101 | Id = appName,
102 | Version = version,
103 | Title = "Xamarin Forms Extended Controls",
104 | Authors = new[] {primaryAuthor},
105 | LicenseUrl = new Uri("https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/master/LICENSE.md"),
106 | Description = "Xamarin Forms Extended Controls. Provides extended controls with a 'Material Design' flare.",
107 | ProjectUrl = new Uri("https://github.com/XamFormsExtended/Xfx.Controls"),
108 | Files = new [] {
109 | new NuSpecContent {Source = coreDir.ToString() + "/Xfx.Controls.dll", Target = "lib/netcore45"},
110 | new NuSpecContent {Source = coreDir.ToString() + "/Xfx.Controls.dll", Target = "lib/netstandard1.3"},
111 | new NuSpecContent {Source = coreDir.ToString() + "/Xfx.Controls.dll", Target = "lib/portable-net45+win8+wpa81+wp8"},
112 |
113 | new NuSpecContent {Source = droidDir.ToString() + "/Xfx.Controls.Droid.dll", Target = "lib/MonoAndroid"},
114 | new NuSpecContent {Source = droidDir.ToString() + "/Xfx.Controls.dll", Target = "lib/MonoAndroid"},
115 |
116 | new NuSpecContent {Source = touchDir.ToString() + "/Xfx.Controls.iOS.dll", Target = "lib/Xamarin.iOS10"},
117 | new NuSpecContent {Source = touchDir.ToString() + "/Xfx.Controls.dll", Target = "lib/Xamarin.iOS10"},
118 | },
119 | Dependencies = new [] {
120 | new NuSpecDependency { Id = "Xamarin.Forms", Version = "2.0" }
121 | },
122 | BasePath = "./src",
123 | NoPackageAnalysis = true,
124 | OutputDirectory = nugetOutDir
125 | };
126 |
127 | NuGetPack(nuGetPackSettings);
128 | });
129 |
130 | RunTarget(target);
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##########################################################################
4 | # This is the Cake bootstrapper script for Linux and OS X.
5 | # This file was downloaded from https://github.com/cake-build/resources
6 | # Feel free to change this file to fit your needs.
7 | ##########################################################################
8 |
9 | # Define directories.
10 | SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
11 | TOOLS_DIR=$SCRIPT_DIR/tools
12 | ADDINS_DIR=$TOOLS_DIR/Addins
13 | MODULES_DIR=$TOOLS_DIR/Modules
14 | NUGET_EXE=$TOOLS_DIR/nuget.exe
15 | CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
16 | PACKAGES_CONFIG=$TOOLS_DIR/packages.config
17 | PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum
18 | ADDINS_PACKAGES_CONFIG=$ADDINS_DIR/packages.config
19 | MODULES_PACKAGES_CONFIG=$MODULES_DIR/packages.config
20 |
21 | # Define md5sum or md5 depending on Linux/OSX
22 | MD5_EXE=
23 | if [[ "$(uname -s)" == "Darwin" ]]; then
24 | MD5_EXE="md5 -r"
25 | else
26 | MD5_EXE="md5sum"
27 | fi
28 |
29 | # Define default arguments.
30 | SCRIPT="build.cake"
31 | CAKE_ARGUMENTS=()
32 |
33 | # Parse arguments.
34 | for i in "$@"; do
35 | case $1 in
36 | -s|--script) SCRIPT="$2"; shift ;;
37 | --) shift; CAKE_ARGUMENTS+=("$@"); break ;;
38 | *) CAKE_ARGUMENTS+=("$1") ;;
39 | esac
40 | shift
41 | done
42 |
43 | # Make sure the tools folder exist.
44 | if [ ! -d "$TOOLS_DIR" ]; then
45 | mkdir "$TOOLS_DIR"
46 | fi
47 |
48 | # Make sure that packages.config exist.
49 | if [ ! -f "$TOOLS_DIR/packages.config" ]; then
50 | echo "Downloading packages.config..."
51 | curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages
52 | if [ $? -ne 0 ]; then
53 | echo "An error occurred while downloading packages.config."
54 | exit 1
55 | fi
56 | fi
57 |
58 | # Download NuGet if it does not exist.
59 | if [ ! -f "$NUGET_EXE" ]; then
60 | echo "Downloading NuGet..."
61 | curl -Lsfo "$NUGET_EXE" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
62 | if [ $? -ne 0 ]; then
63 | echo "An error occurred while downloading nuget.exe."
64 | exit 1
65 | fi
66 | fi
67 |
68 | # Restore tools from NuGet.
69 | pushd "$TOOLS_DIR" >/dev/null
70 | if [ ! -f "$PACKAGES_CONFIG_MD5" ] || [ "$( cat "$PACKAGES_CONFIG_MD5" | sed 's/\r$//' )" != "$( $MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' )" ]; then
71 | find . -type d ! -name . ! -name 'Cake.Bakery' | xargs rm -rf
72 | fi
73 |
74 | mono "$NUGET_EXE" install -ExcludeVersion
75 | if [ $? -ne 0 ]; then
76 | echo "Could not restore NuGet tools."
77 | exit 1
78 | fi
79 |
80 | $MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' >| "$PACKAGES_CONFIG_MD5"
81 |
82 | popd >/dev/null
83 |
84 | # Restore addins from NuGet.
85 | if [ -f "$ADDINS_PACKAGES_CONFIG" ]; then
86 | pushd "$ADDINS_DIR" >/dev/null
87 |
88 | mono "$NUGET_EXE" install -ExcludeVersion
89 | if [ $? -ne 0 ]; then
90 | echo "Could not restore NuGet addins."
91 | exit 1
92 | fi
93 |
94 | popd >/dev/null
95 | fi
96 |
97 | # Restore modules from NuGet.
98 | if [ -f "$MODULES_PACKAGES_CONFIG" ]; then
99 | pushd "$MODULES_DIR" >/dev/null
100 |
101 | mono "$NUGET_EXE" install -ExcludeVersion
102 | if [ $? -ne 0 ]; then
103 | echo "Could not restore NuGet modules."
104 | exit 1
105 | fi
106 |
107 | popd >/dev/null
108 | fi
109 |
110 | # Make sure that Cake has been installed.
111 | if [ ! -f "$CAKE_EXE" ]; then
112 | echo "Could not find Cake.exe at '$CAKE_EXE'."
113 | exit 1
114 | fi
115 |
116 | # Start Cake
117 | exec mono "$CAKE_EXE" $SCRIPT "${CAKE_ARGUMENTS[@]}"
118 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/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");
20 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.OS;
4 |
5 | namespace Xfx.Controls.Example.Droid
6 | {
7 | [Activity(Label = "Xfx.Controls.Example.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
8 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
9 | {
10 | protected override void OnCreate(Bundle bundle)
11 | {
12 | base.OnCreate(bundle);
13 |
14 | XfxControls.Init();
15 | global::Xamarin.Forms.Forms.Init(this, bundle);
16 | LoadApplication(new App());
17 | }
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Xfx.Controls.Example.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("Xfx.Controls.Example.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using UIKit;
3 |
4 | namespace Xfx.Controls.Example.iOS
5 | {
6 | // The UIApplicationDelegate for the application. This class is responsible for launching the
7 | // User Interface of the application, as well as listening (and optionally responding) to
8 | // application events from iOS.
9 | [Register("AppDelegate")]
10 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
11 | {
12 | //
13 | // This method is invoked when the application has loaded and is ready to run. In this
14 | // method you should instantiate the window, load the UI into it and then make the window
15 | // visible.
16 | //
17 | // You have 17 seconds to return from this method, or iOS will terminate your application.
18 | //
19 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
20 | {
21 | XfxControls.Init();
22 | global::Xamarin.Forms.Forms.Init();
23 | LoadApplication(new App());
24 |
25 | return base.FinishedLaunching(app, options);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 10.3
25 | CFBundleDisplayName
26 | Xfx.Controls.Example
27 | CFBundleIdentifier
28 | com.yourcompany.Xfx.Controls.Example
29 | CFBundleVersion
30 | 1.0
31 | CFBundleIconFiles
32 |
33 | Icon-60@2x.png
34 | Icon-76.png
35 | Icon-76@2x.png
36 | Default.png
37 | Default@2x.png
38 | Default-568h@2x.png
39 | Default-Portrait.png
40 | Default-Portrait@2x.png
41 | Icon-Small-40.png
42 | Icon-Small-40@2x.png
43 | Icon-Small.png
44 | Icon-Small@2x.png
45 |
46 | UILaunchStoryboardName
47 | LaunchScreen
48 | CFBundleShortVersionString
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace Xfx.Controls.Example.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/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("Xfx.Controls.Example.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Xfx.Controls.Example.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Media.xcassets/AppIcons.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "scale": "2x",
5 | "size": "20x20",
6 | "idiom": "iphone"
7 | },
8 | {
9 | "scale": "3x",
10 | "size": "20x20",
11 | "idiom": "iphone"
12 | },
13 | {
14 | "scale": "2x",
15 | "size": "29x29",
16 | "idiom": "iphone"
17 | },
18 | {
19 | "scale": "3x",
20 | "size": "29x29",
21 | "idiom": "iphone"
22 | },
23 | {
24 | "scale": "2x",
25 | "size": "40x40",
26 | "idiom": "iphone"
27 | },
28 | {
29 | "scale": "3x",
30 | "size": "40x40",
31 | "idiom": "iphone"
32 | },
33 | {
34 | "scale": "2x",
35 | "size": "60x60",
36 | "idiom": "iphone"
37 | },
38 | {
39 | "scale": "3x",
40 | "size": "60x60",
41 | "idiom": "iphone"
42 | },
43 | {
44 | "scale": "1x",
45 | "size": "20x20",
46 | "idiom": "ipad"
47 | },
48 | {
49 | "scale": "2x",
50 | "size": "20x20",
51 | "idiom": "ipad"
52 | },
53 | {
54 | "scale": "1x",
55 | "size": "29x29",
56 | "idiom": "ipad"
57 | },
58 | {
59 | "scale": "2x",
60 | "size": "29x29",
61 | "idiom": "ipad"
62 | },
63 | {
64 | "scale": "1x",
65 | "size": "40x40",
66 | "idiom": "ipad"
67 | },
68 | {
69 | "scale": "2x",
70 | "size": "40x40",
71 | "idiom": "ipad"
72 | },
73 | {
74 | "scale": "1x",
75 | "size": "76x76",
76 | "idiom": "ipad"
77 | },
78 | {
79 | "scale": "2x",
80 | "size": "76x76",
81 | "idiom": "ipad"
82 | },
83 | {
84 | "scale": "2x",
85 | "size": "83.5x83.5",
86 | "idiom": "ipad"
87 | },
88 | {
89 | "scale": "1x",
90 | "size": "1024x1024",
91 | "idiom": "ios-marketing"
92 | }
93 | ],
94 | "properties": {},
95 | "info": {
96 | "version": 1,
97 | "author": "xcode"
98 | }
99 | }
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/Resources/Media.xcassets/LaunchImages.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "orientation": "portrait",
5 | "extent": "full-screen",
6 | "minimum-system-version": "7.0",
7 | "scale": "2x",
8 | "size": "0x0",
9 | "idiom": "iphone"
10 | },
11 | {
12 | "orientation": "portrait",
13 | "extent": "full-screen",
14 | "minimum-system-version": "7.0",
15 | "subtype": "retina4",
16 | "scale": "2x",
17 | "size": "0x0",
18 | "idiom": "iphone"
19 | },
20 | {
21 | "orientation": "portrait",
22 | "extent": "full-screen",
23 | "minimum-system-version": "7.0",
24 | "scale": "1x",
25 | "size": "0x0",
26 | "idiom": "ipad"
27 | },
28 | {
29 | "orientation": "landscape",
30 | "extent": "full-screen",
31 | "minimum-system-version": "7.0",
32 | "scale": "1x",
33 | "size": "0x0",
34 | "idiom": "ipad"
35 | },
36 | {
37 | "orientation": "portrait",
38 | "extent": "full-screen",
39 | "minimum-system-version": "7.0",
40 | "scale": "2x",
41 | "size": "0x0",
42 | "idiom": "ipad"
43 | },
44 | {
45 | "orientation": "landscape",
46 | "extent": "full-screen",
47 | "minimum-system-version": "7.0",
48 | "scale": "2x",
49 | "size": "0x0",
50 | "idiom": "ipad"
51 | }
52 | ],
53 | "properties": {},
54 | "info": {
55 | "version": 1,
56 | "author": ""
57 | }
58 | }
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/iTunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/iTunesArtwork
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/iTunesArtwork@2x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/example/Xfx.Controls.Example.iOS/iTunesArtwork@2x
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/App.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using Xamarin.Forms.Xaml;
3 |
4 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
5 | namespace Xfx.Controls.Example
6 | {
7 | public class App : Application
8 | {
9 | public App()
10 | {
11 | // The root page of your application
12 | MainPage = new NavigationPage(new MainPage());
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/BaseViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Linq;
6 | using System.Runtime.CompilerServices;
7 | using Xamarin.Forms;
8 |
9 | namespace Xfx.Controls.Example
10 | {
11 | public abstract class BaseViewModel : BindableObject, INotifyDataErrorInfo
12 | {
13 | public static readonly BindablePropertyKey IsValidPropertyKey = BindableProperty.CreateReadOnly(nameof(IsValid),
14 | typeof(bool),
15 | typeof(BaseViewModel),
16 | default(bool));
17 |
18 | protected readonly Dictionary> Errors = new Dictionary>();
19 |
20 | ///
21 | /// ReadOnly IsValid summary. This is a bindable property.
22 | ///
23 | public bool IsValid
24 | {
25 | get => (bool) GetValue(IsValidPropertyKey.BindableProperty);
26 | set => SetValue(IsValidPropertyKey, value);
27 | }
28 |
29 | public event EventHandler ErrorsChanged;
30 |
31 | public IEnumerable GetErrors(string propertyName)
32 | {
33 | IList errorsForName;
34 | Errors.TryGetValue(propertyName, out errorsForName);
35 | return errorsForName;
36 | }
37 |
38 | public bool HasErrors => Errors.Any(kv => kv.Value != null && kv.Value.Count > 0);
39 |
40 |
41 | public abstract void ValidateProperty([CallerMemberName] string propertyName = null);
42 |
43 | protected void RaiseErrorsChanged(string propertyName) => ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
44 | }
45 | }
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/Features/Controls/ControlsPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
50 |
51 |
52 |
57 |
58 |
59 |
65 |
66 |
67 |
74 |
75 |
76 |
83 |
84 |
85 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/Features/Controls/ControlsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx.Controls.Example.Features.Controls
5 | {
6 | public partial class ControlsPage
7 | {
8 | public ControlsPage()
9 | {
10 | InitializeComponent();
11 | }
12 |
13 | private void Email_OnFocused(object sender, FocusEventArgs e)
14 | {
15 | Debug.WriteLine("Email Focused");
16 | }
17 |
18 | private void Email_OnUnfocused(object sender, FocusEventArgs e)
19 | {
20 | Debug.WriteLine("Email Unfocused");
21 | }
22 |
23 | private void Email_ItemSelected(object sender, XfxSelectedItemChangedEventArgs args)
24 | {
25 | Debug.WriteLine($"Selected Item from Event: {args.SelectedItem}");
26 | Debug.WriteLine($"Selected Item index from Event: {args.SelectedItemIndex}");
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/Features/Controls/ControlsPageModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Collections.ObjectModel;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Runtime.CompilerServices;
7 | using Xamarin.Forms;
8 |
9 | namespace Xfx.Controls.Example.Features.Controls
10 | {
11 | public class MainPageModel : BaseViewModel
12 | {
13 | // here's a list of email address suffixes that we're going to use
14 | private static readonly string[] _emails =
15 | {
16 | "@gmail.com",
17 | "@hotmail.com",
18 | "@me.com",
19 | "@outlook.com",
20 | "@mail.com",
21 | "@live.com", // does anyone care about this one? haha
22 | "@yahoo.com" // seriously, does anyone use this anymore?
23 | };
24 |
25 | public static readonly BindableProperty EmailAddressProperty = BindableProperty.Create(nameof(EmailAddress),
26 | typeof(string),
27 | typeof(MainPage),
28 | default(string),
29 | propertyChanged: EmailAddressPropertyChanged);
30 |
31 | public static readonly BindableProperty EmailSuggestionsProperty =
32 | BindableProperty.Create(nameof(EmailSuggestions),
33 | typeof(ObservableCollection),
34 | typeof(MainPage),
35 | new ObservableCollection());
36 |
37 | public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name),
38 | typeof(string),
39 | typeof(MainPage),
40 | default(string));
41 |
42 | public static readonly BindableProperty FooProperty = BindableProperty.Create(nameof(Foo),
43 | typeof(string),
44 | typeof(MainPageModel),
45 | default(string));
46 |
47 | public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create(nameof(SelectedItem),
48 | typeof(object),
49 | typeof(MainPageModel));
50 |
51 | public MainPageModel()
52 | {
53 | Name = "John Smith Jr.";
54 | EmailAddress = "";
55 | }
56 |
57 | ///
58 | /// Text . This is a bindable property.
59 | ///
60 | public string EmailAddress
61 | {
62 | get => (string)GetValue(EmailAddressProperty);
63 | set => SetValue(EmailAddressProperty, value);
64 | }
65 |
66 | ///
67 | /// Email Suggestions collection . This is a bindable property.
68 | ///
69 | public ObservableCollection EmailSuggestions
70 | {
71 | get => (ObservableCollection)GetValue(EmailSuggestionsProperty);
72 | set => SetValue(EmailSuggestionsProperty, value);
73 | }
74 |
75 | ///
76 | /// Foo summary. This is a bindable property.
77 | ///
78 | public string Foo
79 | {
80 | get => (string)GetValue(FooProperty);
81 | set
82 | {
83 | SetValue(FooProperty, value);
84 | ValidateProperty();
85 | }
86 | }
87 |
88 | ///
89 | /// Name summary. This is a bindable property.
90 | ///
91 | public string Name
92 | {
93 | get => (string)GetValue(NameProperty);
94 | set
95 | {
96 | SetValue(NameProperty, value);
97 | ValidateProperty();
98 | }
99 | }
100 |
101 |
102 | ///
103 | /// SelectedItem summary. This is a bindable property.
104 | ///
105 | public object SelectedItem
106 | {
107 | get => GetValue(SelectedItemProperty);
108 | set
109 | {
110 | SetValue(SelectedItemProperty, value);
111 | Debug.WriteLine($"Selected Item from ViewModel {value}");
112 | }
113 | }
114 |
115 | // you can customize your sorting algorithim to however you want it to work.
116 | public Func, ICollection> SortingAlgorithm { get; } =
117 | (text, values) => values
118 | .Where(x => x.ToLower().StartsWith(text.ToLower()))
119 | .OrderBy(x => x)
120 | .ToList();
121 |
122 | private static void EmailAddressPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
123 | {
124 | var model = (MainPageModel)bindable;
125 | // make sure we have the latest string.
126 | var text = newvalue.ToString();
127 |
128 | // if the text is empty or already contains an @ symbol, don't update anything.
129 | if (text.Contains("@")) return;
130 |
131 | /*
132 | note, you could use some sort of FastObservableCollection if
133 | you want the notification to only happen a single time.
134 | i'm not doing that here because I'm trying to K.I.S.S this example
135 | for reference: http://stackoverflow.com/a/13303245/124069
136 | */
137 |
138 | // clear the old suggestions, you're starting over. This also can be more efficient,
139 | // I'll leave that for you to figure out.
140 | model.EmailSuggestions.Clear();
141 |
142 | // side note: for loops will add a tiny performance boost over foreach
143 | for (var i = 0; i < _emails.Length; i++)
144 | model.EmailSuggestions.Add($"{text}{_emails[i]}");
145 | }
146 |
147 | public override void ValidateProperty([CallerMemberName]string propertyName = null)
148 | {
149 | // I actually recommend using FluentValidation for this
150 | switch (propertyName)
151 | {
152 | case nameof(Name): { ValidateName(); break; }
153 | case nameof(Foo): { ValidateFoo(); break; }
154 | }
155 |
156 | IsValid = Errors.Any();
157 | RaiseErrorsChanged(propertyName);
158 | }
159 |
160 | private void ValidateFoo()
161 | {
162 | const string nullMessage = "Foo cannot be empty";
163 | var nameMessages = new List();
164 | if (string.IsNullOrEmpty(Foo))
165 | {
166 | nameMessages.Add(nullMessage);
167 | Errors[nameof(Foo)] = nameMessages;
168 | }
169 | else
170 | {
171 | if (Errors.ContainsKey(nameof(Foo)))
172 | {
173 | Errors.Remove(nameof(Foo));
174 | }
175 | }
176 | }
177 |
178 | private void ValidateName()
179 | {
180 | const string nullMessage = "Name cannot be empty";
181 | var nameMessages = new List();
182 | if (string.IsNullOrEmpty(Name))
183 | {
184 | nameMessages.Add(nullMessage);
185 | Errors[nameof(Name)] = nameMessages;
186 | }
187 | else
188 | {
189 | if (Errors.ContainsKey(nameof(Name)))
190 | {
191 | Errors.Remove(nameof(Name));
192 | }
193 | }
194 | }
195 | }
196 | }
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
27 |
28 |
29 |
30 |
31 |
32 |
37 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx.Controls.Example
5 | {
6 | public partial class MainPage
7 | {
8 | public MainPage()
9 | {
10 | InitializeComponent();
11 | NavigationPage.SetHasNavigationBar(this,false);
12 | }
13 |
14 | private async void Button_OnClicked(object sender, EventArgs e)
15 | {
16 | await Navigation.PushAsync(new Features.Controls.ControlsPage());
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/example/Xfx.Controls.Example/Xfx.Controls.Example.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard1.3
5 |
6 |
7 |
8 |
9 |
10 |
11 | *.xaml
12 |
13 |
14 | *.xaml
15 |
16 |
17 | *.xaml
18 |
19 |
20 |
21 |
22 |
23 |
30 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Xamarin Forms Extended Controls
2 |
3 | *Description*
4 | Xfx Controls are just a few controls that differ from the baked in Xamarin.Forms Controls.
5 |
6 | | | iOS | Android | UWP | Mac |
7 | | ------------- |:------------------:|:------------------:|:---:|:---:|
8 | | XfxEntry | :white_check_mark: | :white_check_mark: | :x: | :x: |
9 | | XfxComboBox | :white_check_mark: | :white_check_mark: | :x: | :x: |
10 | | XfxCardView | :white_check_mark: | :white_check_mark: | :x: | :x: |
11 |
12 | -----
13 |
14 | - [Getting Started](#getting-started)
15 | - [Android](#android)
16 | - [iOS](#ios)
17 | - [Demos](#demos)
18 | - [Code](#code)
19 | - [XfxEntry](#xfxentry)
20 | - [XfxComboBox](#xfxcombobox)
21 | - [XfxCardView](#xfxcardview)
22 | - [Contributions / Thanks](#contributions--thanks)
23 | - [License](#license)
24 |
25 | -----
26 |
27 | ## Getting Started
28 |
29 | ### Android
30 |
31 | In your MainActivity, initialize XfxControls just before initializing Xamarin Forms
32 |
33 | ```csharp
34 | XfxControls.Init();
35 | global::Xamarin.Forms.Forms.Init(this, bundle);
36 | ```
37 |
38 | *note: XfxEntry and XfxComboBox REQUIRES your app to use an AppCompat theme.*
39 |
40 | ### iOS
41 |
42 | In your AppDelegate, initialize XfxControls just before initializing Xamarin Forms
43 |
44 | ```csharp
45 | XfxControls.Init();
46 | global::Xamarin.Forms.Forms.Init();
47 | ```
48 |
49 | ### Demos
50 |
51 | 
52 | 
53 |
54 | ### Code
55 |
56 | Declaration is exactly the same as a Xamarin.Forms.Entry, with some added properties
57 |
58 | #### XfxEntry
59 |
60 | ```xml
61 |
62 |
65 | ```
66 |
67 | When the `ErrorText` property is set, the ErrorText will display, otherwise if it is null or empty, it's removed.
68 |
69 | #### XfxComboBox
70 |
71 | ```xml
72 |
73 |
77 | ```
78 | The XfxComboBox extends the XfxEntry and therefore also includes the `ErrorText` property.
79 | Beyond that there is an `ItemsSource` property, `SelectedItem` property, and a `SortingAlgorithm` property.
80 | The first two are pretty self explanitory, but here's an example of how you can set the `SortingAlgorithm`
81 |
82 | ```csharp
83 | public class MyViewModel : INotifyPropertyChanged
84 | {
85 | public Func, ICollection> SortingAlgorithm { get; } = (text, values) => values
86 | .Where(x => x.StartsWith(text, StringComparison.CurrentCultureIgnoreCase)))
87 | .OrderBy(x => x)
88 | .ToList();
89 | }
90 | ```
91 |
92 | #### XfxCardView
93 |
94 | ```xml
95 |
96 |
97 |
98 |
99 |
104 |
105 |
106 |
107 |
108 | ```
109 |
110 | ## Contributions / Thanks
111 |
112 | - [@MarcBruins](https://github.com/MarcBruins) for: [MBAutoComplete](https://github.com/MarcBruins/MBAutoComplete)
113 | - [@gshackles](https://github.com/gshackles) for: [FloatLabeledEntry](https://github.com/gshackles/FloatLabeledEntry)
114 |
115 | ## License
116 |
117 | Licensed MIT, please review the [license](https://github.com/XamFormsExtended/Xfx.Controls/blob/master/LICENSE.md) file.
118 |
--------------------------------------------------------------------------------
/resources/xfx.controls.droid.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/resources/xfx.controls.droid.gif
--------------------------------------------------------------------------------
/resources/xfx.controls.ios.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/resources/xfx.controls.ios.gif
--------------------------------------------------------------------------------
/resources/xfx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/resources/xfx.png
--------------------------------------------------------------------------------
/src/SolutionInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by Cake.
4 | //
5 | //------------------------------------------------------------------------------
6 | using System.Reflection;
7 |
8 | [assembly: AssemblyProduct("Xfx.Controls")]
9 | [assembly: AssemblyVersion("1.2.1")]
10 | [assembly: AssemblyFileVersion("1.2.1")]
11 | [assembly: AssemblyInformationalVersion("1.2.1")]
12 | [assembly: AssemblyCopyright("Copyright (c) 2015 - 2019 Chase Florell")]
13 |
14 |
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Extensions/CollectionExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using ArrayList = Java.Util.ArrayList;
3 |
4 | namespace Xfx.Controls.Droid.Extensions
5 | {
6 | public static class CollectionExtensions
7 | {
8 | [Android.Runtime.Preserve (AllMembers = true)]
9 | public static ArrayList ToArrayList(this ICollection input)
10 | {
11 | return input.Count == 0 ? new ArrayList() : new ArrayList(input);
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Extensions/ColorExtensions.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using Android.Graphics;
3 | using Android.Util;
4 |
5 | namespace Xfx.Controls.Droid.Extensions
6 | {
7 | public static class ColorExtensions
8 | {
9 | public static Color GetColorByResourceId(this Context context, int resId)
10 | {
11 | var themeAccentColor = new TypedValue();
12 | context.Theme.ResolveAttribute(resId, themeAccentColor, true);
13 | return new Color(themeAccentColor.Data);
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Extensions/FontExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text.RegularExpressions;
4 | using Android.Graphics;
5 | using Xamarin.Forms;
6 | using AApplication = Android.App.Application;
7 |
8 | namespace Xfx.Controls.Droid.Extensions
9 | {
10 | [Android.Runtime.Preserve (AllMembers = true)]
11 | public static class FontExtensions
12 | {
13 | private static readonly Dictionary, Typeface> _typefaces = new Dictionary, Typeface>();
14 |
15 | // We don't create and cache a Regex object here because we may not ever need it, and creating Regexes is surprisingly expensive (especially on older hardware)
16 | // Instead, we'll use the static Regex.IsMatch below, which will create and cache the regex internally as needed. It's the equivalent of Lazy with less code.
17 | // See https://msdn.microsoft.com/en-us/library/sdx2bds0(v=vs.110).aspx#Anchor_2
18 | const string _loadFromAssetsRegex = @"\w+\.((ttf)|(otf))\#\w*";
19 |
20 | static Typeface _defaultTypeface;
21 |
22 | public static float ToScaledPixel(this Font self)
23 | {
24 | if (self.IsDefault)
25 | return 14;
26 |
27 | if (self.UseNamedSize)
28 | {
29 | switch (self.NamedSize)
30 | {
31 | case NamedSize.Micro:
32 | return 10;
33 |
34 | case NamedSize.Small:
35 | return 12;
36 |
37 | case NamedSize.Default:
38 | case NamedSize.Medium:
39 | return 14;
40 |
41 | case NamedSize.Large:
42 | return 18;
43 | }
44 | }
45 |
46 | return (float)self.FontSize;
47 | }
48 |
49 | public static Typeface ToTypeface(this Font self)
50 | {
51 | if (self.IsDefault)
52 | return _defaultTypeface ?? (_defaultTypeface = Typeface.Default);
53 |
54 | var key = new Tuple(self.FontFamily, self.FontAttributes);
55 | Typeface result;
56 | if (_typefaces.TryGetValue(key, out result))
57 | return result;
58 |
59 | if (self.FontFamily == null)
60 | {
61 | var style = ToTypefaceStyle(self.FontAttributes);
62 | result = Typeface.Create(Typeface.Default, style);
63 | }
64 | else if (Regex.IsMatch(self.FontFamily, _loadFromAssetsRegex))
65 | {
66 | result = Typeface.CreateFromAsset(AApplication.Context.Assets, FontNameToFontFile(self.FontFamily));
67 | }
68 | else
69 | {
70 | var style = ToTypefaceStyle(self.FontAttributes);
71 | result = Typeface.Create(self.FontFamily, style);
72 | }
73 | return (_typefaces[key] = result);
74 | }
75 |
76 | internal static bool IsDefault(this Entry self)
77 | {
78 | return self.FontFamily == null && self.FontAttributes == FontAttributes.None;
79 | }
80 |
81 | internal static Typeface ToTypeface(this Entry self)
82 | {
83 | if (self.IsDefault())
84 | return _defaultTypeface ?? (_defaultTypeface = Typeface.Default);
85 |
86 | var key = new Tuple(self.FontFamily, self.FontAttributes);
87 | Typeface result;
88 | if (_typefaces.TryGetValue(key, out result))
89 | return result;
90 |
91 | if (self.FontFamily == null)
92 | {
93 | var style = ToTypefaceStyle(self.FontAttributes);
94 | result = Typeface.Create(Typeface.Default, style);
95 | }
96 | else if (Regex.IsMatch(self.FontFamily, _loadFromAssetsRegex))
97 | {
98 | result = Typeface.CreateFromAsset(AApplication.Context.Assets, FontNameToFontFile(self.FontFamily));
99 | }
100 | else
101 | {
102 | var style = ToTypefaceStyle(self.FontAttributes);
103 | result = Typeface.Create(self.FontFamily, style);
104 | }
105 | return (_typefaces[key] = result);
106 | }
107 |
108 | public static TypefaceStyle ToTypefaceStyle(FontAttributes attrs)
109 | {
110 | var style = TypefaceStyle.Normal;
111 | if ((attrs & (FontAttributes.Bold | FontAttributes.Italic)) == (FontAttributes.Bold | FontAttributes.Italic))
112 | style = TypefaceStyle.BoldItalic;
113 | else if ((attrs & FontAttributes.Bold) != 0)
114 | style = TypefaceStyle.Bold;
115 | else if ((attrs & FontAttributes.Italic) != 0)
116 | style = TypefaceStyle.Italic;
117 | return style;
118 | }
119 |
120 | static string FontNameToFontFile(string fontFamily)
121 | {
122 | int hashtagIndex = fontFamily.IndexOf('#');
123 | if (hashtagIndex >= 0)
124 | return fontFamily.Substring(0, hashtagIndex);
125 |
126 | throw new InvalidOperationException($"Can't parse the {nameof(fontFamily)} {fontFamily}");
127 | }
128 | }
129 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Extensions/KeyboardExtensions.cs:
--------------------------------------------------------------------------------
1 | using Android.Text;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx.Controls.Droid.Extensions
5 | {
6 | [Android.Runtime.Preserve (AllMembers = true)]
7 | public static class KeyboardExtensions
8 | {
9 | public static InputTypes ToNative(this Keyboard input)
10 | {
11 | if (input == Keyboard.Url)
12 | {
13 | return InputTypes.ClassText | InputTypes.TextVariationUri;
14 | }
15 | if (input == Keyboard.Email)
16 | {
17 | return InputTypes.ClassText | InputTypes.TextVariationEmailAddress;
18 | }
19 | if (input == Keyboard.Numeric)
20 | {
21 | return InputTypes.ClassNumber;
22 | }
23 | if (input == Keyboard.Chat)
24 | {
25 | return InputTypes.ClassText | InputTypes.TextVariationShortMessage;
26 | }
27 | if (input == Keyboard.Telephone)
28 | {
29 | return InputTypes.ClassPhone;
30 | }
31 | if (input == Keyboard.Text)
32 | {
33 | return InputTypes.ClassText | InputTypes.TextFlagNoSuggestions;
34 | }
35 | return InputTypes.ClassText;
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Forms.Internals/GestureManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Linq;
4 | using Android.Support.V4.View;
5 | using Android.Views;
6 | using Xamarin.Forms;
7 | using Xamarin.Forms.Platform.Android;
8 | using View = Xamarin.Forms.View;
9 |
10 | namespace Xfx.Controls.Droid.Forms.Internals
11 | {
12 | [Android.Runtime.Preserve (AllMembers = true)]
13 | internal class GestureManager : IDisposable
14 | {
15 | IVisualElementRenderer _renderer;
16 | readonly Lazy _tapAndPanDetector;
17 | readonly Lazy _scaleDetector;
18 |
19 | bool _disposed;
20 | bool _inputTransparent;
21 | bool _isEnabled;
22 |
23 | VisualElement Element => _renderer?.Element;
24 |
25 | View View => _renderer?.Element as View;
26 |
27 | global::Android.Views.View Control => _renderer?.View;
28 |
29 | public GestureManager(IVisualElementRenderer renderer)
30 | {
31 | _renderer = renderer;
32 | _renderer.ElementChanged += OnElementChanged;
33 |
34 | _tapAndPanDetector = new Lazy(InitializeTapAndPanDetector);
35 | _scaleDetector = new Lazy(InitializeScaleDetector);
36 | }
37 |
38 | public bool OnTouchEvent(MotionEvent e)
39 | {
40 | if (Control == null)
41 | {
42 | return false;
43 | }
44 |
45 | if (!_isEnabled || _inputTransparent)
46 | {
47 | return false;
48 | }
49 |
50 | if (!DetectorsValid())
51 | {
52 | return false;
53 | }
54 |
55 | var eventConsumed = false;
56 | if (ViewHasPinchGestures())
57 | {
58 | eventConsumed = _scaleDetector.Value.OnTouchEvent(e);
59 | }
60 |
61 | eventConsumed = _tapAndPanDetector.Value.OnTouchEvent(e) || eventConsumed;
62 |
63 | return eventConsumed;
64 | }
65 |
66 | public void Dispose()
67 | {
68 | Dispose(true);
69 | GC.SuppressFinalize(this);
70 | }
71 |
72 | bool DetectorsValid()
73 | {
74 | // Make sure we're not testing for gestures on old motion events after our
75 | // detectors have already been disposed
76 |
77 | if (_scaleDetector.IsValueCreated && _scaleDetector.Value.Handle == IntPtr.Zero)
78 | {
79 | return false;
80 | }
81 |
82 | if (_tapAndPanDetector.IsValueCreated && _tapAndPanDetector.Value.Handle == IntPtr.Zero)
83 | {
84 | return false;
85 | }
86 |
87 | return true;
88 | }
89 |
90 | GestureDetector InitializeTapAndPanDetector()
91 | {
92 | var context = Control.Context;
93 | var listener = new InnerGestureListener(new TapGestureHandler(() => View),
94 | new PanGestureHandler(() => View, context.FromPixels));
95 |
96 | return new GestureDetector(context, listener);
97 | }
98 |
99 | ScaleGestureDetector InitializeScaleDetector()
100 | {
101 | var context = Control.Context;
102 | var listener = new InnerScaleListener(new PinchGestureHandler(() => View), context.FromPixels);
103 | var detector = new ScaleGestureDetector(context, listener, Control.Handler);
104 | ScaleGestureDetectorCompat.SetQuickScaleEnabled(detector, true);
105 |
106 | return detector;
107 | }
108 |
109 | bool ViewHasPinchGestures()
110 | {
111 | return View != null && View.GestureRecognizers.OfType().Any();
112 | }
113 |
114 | void OnElementChanged(object sender, VisualElementChangedEventArgs e)
115 | {
116 | if (e.OldElement != null)
117 | {
118 | e.OldElement.PropertyChanged -= OnElementPropertyChanged;
119 | }
120 |
121 | if (e.NewElement != null)
122 | {
123 | e.NewElement.PropertyChanged += OnElementPropertyChanged;
124 | }
125 |
126 | UpdateInputTransparent();
127 | UpdateIsEnabled();
128 | }
129 |
130 | void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
131 | {
132 | if (e.PropertyName == VisualElement.InputTransparentProperty.PropertyName)
133 | UpdateInputTransparent();
134 | else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName)
135 | UpdateIsEnabled();
136 | }
137 |
138 | protected void Dispose(bool disposing)
139 | {
140 | if (_disposed)
141 | {
142 | return;
143 | }
144 |
145 | _disposed = true;
146 |
147 | if (disposing)
148 | {
149 | if (Element != null)
150 | {
151 | Element.PropertyChanged -= OnElementPropertyChanged;
152 | }
153 |
154 | _renderer = null;
155 | }
156 | }
157 |
158 | void UpdateInputTransparent()
159 | {
160 | if (Element == null)
161 | {
162 | return;
163 | }
164 |
165 | _inputTransparent = Element.InputTransparent;
166 | }
167 |
168 | void UpdateIsEnabled()
169 | {
170 | if (Element == null)
171 | {
172 | return;
173 | }
174 |
175 | _isEnabled = Element.IsEnabled;
176 | }
177 | }
178 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Forms.Internals/InnerScaleListener.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.Runtime;
3 | using Android.Views;
4 | using Xamarin.Forms;
5 |
6 | namespace Xfx.Controls.Droid.Forms.Internals
7 | {
8 | [Android.Runtime.Preserve (AllMembers = true)]
9 | internal class InnerScaleListener : ScaleGestureDetector.SimpleOnScaleGestureListener
10 | {
11 | Func _pinchDelegate;
12 | Action _pinchEndedDelegate;
13 | readonly Func _fromPixels;
14 | Func _pinchStartedDelegate;
15 |
16 | public InnerScaleListener(PinchGestureHandler pinchGestureHandler, Func fromPixels)
17 | {
18 | if (pinchGestureHandler == null)
19 | {
20 | throw new ArgumentNullException(nameof(pinchGestureHandler));
21 | }
22 |
23 | _pinchDelegate = pinchGestureHandler.OnPinch;
24 | _pinchStartedDelegate = pinchGestureHandler.OnPinchStarted;
25 | _pinchEndedDelegate = pinchGestureHandler.OnPinchEnded;
26 | _fromPixels = fromPixels;
27 | }
28 |
29 | // This is needed because GestureRecognizer callbacks can be delayed several hundred milliseconds
30 | // which can result in the need to resurect this object if it has already been disposed. We dispose
31 | // eagerly to allow easier garbage collection of the renderer
32 | internal InnerScaleListener(IntPtr handle, JniHandleOwnership ownership) : base(handle, ownership)
33 | {
34 | }
35 |
36 | public override bool OnScale(ScaleGestureDetector detector)
37 | {
38 | float cur = detector.CurrentSpan;
39 | float last = detector.PreviousSpan;
40 |
41 | if (Math.Abs(cur - last) < 10)
42 | return false;
43 |
44 | return _pinchDelegate(detector.ScaleFactor, new Point(_fromPixels(detector.FocusX), _fromPixels(detector.FocusY)));
45 | }
46 |
47 | public override bool OnScaleBegin(ScaleGestureDetector detector)
48 | {
49 | return _pinchStartedDelegate(new Point(_fromPixels(detector.FocusX), _fromPixels(detector.FocusY)));
50 | }
51 |
52 | public override void OnScaleEnd(ScaleGestureDetector detector)
53 | {
54 | _pinchEndedDelegate();
55 | }
56 |
57 | protected override void Dispose(bool disposing)
58 | {
59 | if (disposing)
60 | {
61 | _pinchDelegate = null;
62 | _pinchStartedDelegate = null;
63 | _pinchEndedDelegate = null;
64 | }
65 | base.Dispose(disposing);
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Forms.Internals/InstantAutoCompleteTextView.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using Android.Support.V7.Widget;
3 | using Android.Util;
4 | using Android.Widget;
5 |
6 | namespace Xfx.Controls.Droid.Forms.Internals
7 | {
8 |
9 | public class InstantAutoCompleteTextView : AppCompatAutoCompleteTextView
10 | {
11 | public bool ShowIfEmpty { get; set; }
12 |
13 | public InstantAutoCompleteTextView(Context context) : base(context)
14 | {
15 | }
16 |
17 | private void InstantAutoCompleteTextView_FocusChange(object sender, FocusChangeEventArgs e)
18 | {
19 | if (e.HasFocus)
20 | ShowDropDown();
21 | }
22 |
23 | public InstantAutoCompleteTextView(Context arg0, IAttributeSet arg1) : base(arg0, arg1) { }
24 |
25 | public InstantAutoCompleteTextView(Context arg0, IAttributeSet arg1, int arg2) : base(arg0, arg1, arg2) { }
26 |
27 | public void SetOpenOnFocus(bool openOnFocus)
28 | {
29 | if (openOnFocus) FocusChange += InstantAutoCompleteTextView_FocusChange;
30 | else FocusChange -= InstantAutoCompleteTextView_FocusChange;
31 | }
32 |
33 | public override bool EnoughToFilter()
34 | {
35 | return ShowIfEmpty || base.EnoughToFilter();
36 | }
37 |
38 | public void PerformFiltering()
39 | {
40 | PerformFiltering(Text, 0);
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Forms.Internals/PanGestureHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Internals;
5 |
6 | namespace Xfx.Controls.Droid.Forms.Internals
7 | {
8 | [Android.Runtime.Preserve (AllMembers = true)]
9 | internal class PanGestureHandler
10 | {
11 | readonly Func _pixelTranslation;
12 |
13 | public PanGestureHandler(Func getView, Func pixelTranslation)
14 | {
15 | _pixelTranslation = pixelTranslation;
16 | GetView = getView;
17 | }
18 |
19 | Func GetView { get; }
20 |
21 | public bool OnPan(float x, float y, int pointerCount)
22 | {
23 | View view = GetView();
24 |
25 | if (view == null)
26 | return false;
27 |
28 | var result = false;
29 | foreach (PanGestureRecognizer panGesture in
30 | view.GestureRecognizers.GetGesturesFor(g => g.TouchPoints == pointerCount))
31 | {
32 | ((IPanGestureController)panGesture).SendPan(view, _pixelTranslation(x), _pixelTranslation(y), Application.Current.PanGestureId);
33 | result = true;
34 | }
35 |
36 | return result;
37 | }
38 |
39 | public bool OnPanComplete()
40 | {
41 | View view = GetView();
42 |
43 | if (view == null)
44 | return false;
45 |
46 | var result = false;
47 | foreach (PanGestureRecognizer panGesture in view.GestureRecognizers.GetGesturesFor())
48 | {
49 | ((IPanGestureController)panGesture).SendPanCompleted(view, Application.Current.PanGestureId);
50 | result = true;
51 | }
52 | Application.Current.PanGestureId++;
53 | return result;
54 | }
55 |
56 | public bool OnPanStarted(int pointerCount)
57 | {
58 | View view = GetView();
59 |
60 | if (view == null)
61 | return false;
62 |
63 | var result = false;
64 | foreach (PanGestureRecognizer panGesture in
65 | view.GestureRecognizers.GetGesturesFor(g => g.TouchPoints == pointerCount))
66 | {
67 | ((IPanGestureController)panGesture).SendPanStarted(view, Application.Current.PanGestureId);
68 | result = true;
69 | }
70 | return result;
71 | }
72 |
73 | public bool HasAnyGestures()
74 | {
75 | var view = GetView();
76 | return view != null && view.GestureRecognizers.OfType().Any();
77 | }
78 | }
79 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Forms.Internals/PinchGestureHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Xamarin.Forms;
4 |
5 | namespace Xfx.Controls.Droid.Forms.Internals
6 | {
7 | [Android.Runtime.Preserve (AllMembers = true)]
8 | internal class PinchGestureHandler
9 | {
10 | double _pinchStartingScale = 1;
11 |
12 | public PinchGestureHandler(Func getView)
13 | {
14 | GetView = getView;
15 | }
16 |
17 | Func GetView { get; }
18 |
19 | // A View can have at most one pinch gesture, so we just need to look for one (or none)
20 | PinchGestureRecognizer PinchGesture => GetView()?.GestureRecognizers.OfType()
21 | .FirstOrDefault();
22 |
23 | public bool OnPinch(float scale, Point scalePoint)
24 | {
25 | View view = GetView();
26 |
27 | if (view == null)
28 | return false;
29 |
30 | PinchGestureRecognizer pinchGesture = PinchGesture;
31 | if (pinchGesture == null)
32 | return true;
33 |
34 | var scalePointTransformed = new Point(scalePoint.X / view.Width, scalePoint.Y / view.Height);
35 | pinchGesture.SendPinch(view, 1 + (scale - 1) * _pinchStartingScale, scalePointTransformed);
36 |
37 | return true;
38 | }
39 |
40 | public void OnPinchEnded()
41 | {
42 | View view = GetView();
43 |
44 | if (view == null)
45 | return;
46 |
47 | PinchGestureRecognizer pinchGesture = PinchGesture;
48 | pinchGesture?.SendPinchEnded(view);
49 | }
50 |
51 | public bool OnPinchStarted(Point scalePoint)
52 | {
53 | View view = GetView();
54 |
55 | if (view == null)
56 | return false;
57 |
58 | PinchGestureRecognizer pinchGesture = PinchGesture;
59 | if (pinchGesture == null)
60 | return false;
61 |
62 | _pinchStartingScale = view.Scale;
63 |
64 | var scalePointTransformed = new Point(scalePoint.X / view.Width, scalePoint.Y / view.Height);
65 |
66 | pinchGesture.SendPinchStarted(view, scalePointTransformed);
67 | return true;
68 | }
69 | }
70 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Forms.Internals/TapGestureHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Internals;
6 |
7 | namespace Xfx.Controls.Droid.Forms.Internals
8 | {
9 | [Android.Runtime.Preserve (AllMembers = true)]
10 | internal class TapGestureHandler
11 | {
12 | public TapGestureHandler(Func getView)
13 | {
14 | GetView = getView;
15 | }
16 |
17 | Func GetView { get; }
18 |
19 | public void OnSingleClick()
20 | {
21 | // only handle click if we don't have double tap registered
22 | if (TapGestureRecognizers(2).Any())
23 | return;
24 |
25 | OnTap(1);
26 | }
27 |
28 | public bool OnTap(int count)
29 | {
30 | View view = GetView();
31 |
32 | if (view == null)
33 | return false;
34 |
35 | IEnumerable gestureRecognizers = TapGestureRecognizers(count);
36 | var result = false;
37 | foreach (TapGestureRecognizer gestureRecognizer in gestureRecognizers)
38 | {
39 | gestureRecognizer.SendTapped(view);
40 | result = true;
41 | }
42 |
43 | return result;
44 | }
45 |
46 | public bool HasAnyGestures()
47 | {
48 | var view = GetView();
49 | return view != null && view.GestureRecognizers.OfType().Any();
50 | }
51 |
52 | public IEnumerable TapGestureRecognizers(int count)
53 | {
54 | View view = GetView();
55 | if (view == null)
56 | return Enumerable.Empty();
57 |
58 | return view.GestureRecognizers.GetGesturesFor(recognizer => recognizer.NumberOfTapsRequired == count);
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using Android;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Xfx.Controls.Droid")]
10 |
11 | [assembly: ComVisible(false)]
12 | [assembly: LinkerSafe]
13 |
14 |
15 | // Add some common permissions, these can be removed if not needed
16 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
17 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Renderers/XfxCardViewRendererDroid.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using Android.Support.V7.Widget;
4 | using Android.Views;
5 | using Xamarin.Forms;
6 | using Xamarin.Forms.Platform.Android;
7 | using Xfx;
8 | using Xfx.Controls.Droid.Renderers;
9 | using AContext = Android.Content.Context;
10 | using AView = Android.Views.View;
11 |
12 | [assembly: ExportRenderer(typeof(XfxCardView), typeof(XfxCardViewRendererDroid))]
13 |
14 | namespace Xfx.Controls.Droid.Renderers
15 | {
16 | [Android.Runtime.Preserve (AllMembers = true)]
17 | public class XfxCardViewRendererDroid : CardView, IVisualElementRenderer
18 | {
19 | private float _defaultElevation;
20 | private float _defaultCornerRadius;
21 | private XfxVisualElementManager _visualElementManager;
22 |
23 | public XfxCardViewRendererDroid(AContext context) : base(context)
24 | {
25 | }
26 |
27 | [Obsolete("ViewGroup is obsolete as of version 2.3.5. Please use View instead.")]
28 | public ViewGroup ViewGroup => this;
29 | public AView View => this;
30 | VisualElementTracker IVisualElementRenderer.Tracker => _visualElementManager.Tracker;
31 | public VisualElement Element { get; private set; }
32 | public event EventHandler ElementChanged;
33 | public event EventHandler ElementPropertyChanged;
34 | public void SetLabelFor(int? id) { }
35 | public void UpdateLayout() => _visualElementManager?.UpdateLayout();
36 | protected XfxCardView CardView => (XfxCardView)Element;
37 | protected virtual void OnElementChanged(object sender, VisualElementChangedEventArgs args) { }
38 | protected virtual void OnElementPropertyChanged(object sender, PropertyChangedEventArgs args) { }
39 | private void SetCardElevation() => CardElevation = CardView.Elevation < 0 ? _defaultElevation : CardView.Elevation;
40 | private void SetCardRadius() => Radius = CardView.CornerRadius < 0 ? _defaultCornerRadius : CardView.CornerRadius;
41 | private void SetCardBackgroundColor() => SetCardBackgroundColor(CardView.BackgroundColor.ToAndroid());
42 |
43 | void IVisualElementRenderer.SetElement(VisualElement element)
44 | {
45 | var oldElement = Element;
46 |
47 | if (oldElement != null)
48 | oldElement.PropertyChanged -= HandlePropertyChanged;
49 |
50 | Element = element;
51 | if (Element != null)
52 | Element.PropertyChanged += HandlePropertyChanged;
53 |
54 | //sizes to match the forms view
55 | //updates properties, handles visual element properties
56 | _visualElementManager = new XfxVisualElementManager();
57 | _visualElementManager.Init(this);
58 | UseCompatPadding = true;
59 |
60 | _defaultElevation = CardElevation;
61 | _defaultCornerRadius = Radius;
62 | SetContentPadding();
63 | SetCardRadius();
64 | SetCardBackgroundColor();
65 | SetCardElevation();
66 | RaiseElementChanged(new VisualElementChangedEventArgs(oldElement, Element));
67 | }
68 |
69 |
70 |
71 | public SizeRequest GetDesiredSize(int widthConstraint, int heightConstraint)
72 | {
73 | View.Measure(widthConstraint, heightConstraint);
74 | return new SizeRequest(new Size(View.MeasuredWidth, View.MeasuredHeight));
75 | }
76 |
77 | private void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
78 | {
79 | if (e.PropertyName == ContentView.ContentProperty.PropertyName)
80 | ((IVisualElementRenderer) this).Tracker.UpdateLayout();
81 | else if (e.PropertyName == Xamarin.Forms.Layout.PaddingProperty.PropertyName)
82 | SetContentPadding();
83 | else if (e.PropertyName == XfxCardView.CornerRadiusProperty.PropertyName)
84 | SetCardRadius();
85 | else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName)
86 | SetCardBackgroundColor();
87 | else if (e.PropertyName == XfxCardView.ElevationProperty.PropertyName)
88 | SetCardElevation();
89 | RaiseElementPropertyChanged(e);
90 | }
91 |
92 | private void SetContentPadding()
93 | {
94 | SetContentPadding((int)CardView.Padding.Left,
95 | (int)CardView.Padding.Top,
96 | (int)CardView.Padding.Right,
97 | (int)CardView.Padding.Bottom);
98 | }
99 |
100 | private void RaiseElementChanged(VisualElementChangedEventArgs args)
101 | {
102 | ElementChanged?.Invoke(this, args);
103 | OnElementChanged(this, args);
104 | }
105 |
106 | public override bool OnTouchEvent(MotionEvent e)
107 | {
108 | return _visualElementManager.OnTouchEvent(e) || base.OnTouchEvent(e);
109 | }
110 |
111 | private void RaiseElementPropertyChanged(PropertyChangedEventArgs args)
112 | {
113 | ElementPropertyChanged?.Invoke(this, args);
114 | OnElementPropertyChanged(this, args);
115 | }
116 |
117 | protected override void Dispose(bool disposing)
118 | {
119 | base.Dispose(disposing);
120 | _visualElementManager?.Dispose();
121 | }
122 | }
123 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Renderers/XfxComboBoxRendererDroid.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Specialized;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using Android.Content;
6 | using Android.Content.Res;
7 | using Android.Support.Design.Widget;
8 | using Android.Support.V7.Widget;
9 | using Android.Widget;
10 | using Xamarin.Forms;
11 | using Xamarin.Forms.Platform.Android;
12 | using Xfx;
13 | using Xfx.Controls.Droid.Forms.Internals;
14 | using Xfx.Controls.Droid.Renderers;
15 | using Xfx.Controls.Droid.XfxComboBox;
16 | using Resource = Android.Resource;
17 |
18 | [assembly: ExportRenderer(typeof(XfxComboBox), typeof(XfxComboBoxRendererDroid))]
19 |
20 | namespace Xfx.Controls.Droid.Renderers
21 | {
22 | [Android.Runtime.Preserve(AllMembers = true)]
23 | public class XfxComboBoxRendererDroid : XfxEntryRendererDroid
24 | {
25 | public XfxComboBoxRendererDroid(Context context) : base(context)
26 | {
27 | }
28 |
29 | private InstantAutoCompleteTextView AutoComplete => (InstantAutoCompleteTextView)Control?.EditText;
30 |
31 | protected override TextInputLayout CreateNativeControl()
32 | {
33 | var textInputLayout = new TextInputLayout(Context);
34 | var autoComplete = new InstantAutoCompleteTextView(Context)
35 | {
36 | SupportBackgroundTintList = ColorStateList.ValueOf(GetPlaceholderColor())
37 | };
38 | textInputLayout.AddView(autoComplete);
39 | return textInputLayout;
40 | }
41 |
42 | protected override void OnElementChanged(ElementChangedEventArgs e)
43 | {
44 | base.OnElementChanged(e);
45 |
46 | if (Element == null || Control == null || Control.Handle == IntPtr.Zero || EditText == null || EditText.Handle == IntPtr.Zero || AutoComplete == null || AutoComplete.Handle == IntPtr.Zero)
47 | return;
48 |
49 | if (e.OldElement != null)
50 | {
51 | // unsubscribe
52 | AutoComplete.ItemClick -= AutoCompleteOnItemSelected;
53 |
54 | if (e.OldElement is Xfx.XfxComboBox elm)
55 | elm.CollectionChanged -= ItemsSourceCollectionChanged;
56 | }
57 |
58 | if (e.NewElement != null)
59 | {
60 | // subscribe
61 | SetItemsSource();
62 | SetThreshold();
63 | KillPassword();
64 | AutoComplete.ItemClick += AutoCompleteOnItemSelected;
65 |
66 | if (e.NewElement is Xfx.XfxComboBox elm)
67 | {
68 | elm.CollectionChanged += ItemsSourceCollectionChanged;
69 | AutoComplete.SetOpenOnFocus(elm.OpenOnFocus);
70 | AutoComplete.ShowIfEmpty = elm.ShowIfEmpty;
71 | }
72 | }
73 | }
74 |
75 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
76 | {
77 | base.OnElementPropertyChanged(sender, e);
78 |
79 | if (Element == null || Control == null || Control.Handle == IntPtr.Zero || EditText == null || EditText.Handle == IntPtr.Zero || AutoComplete == null || AutoComplete.Handle == IntPtr.Zero)
80 | return;
81 |
82 | if (e.PropertyName == Entry.IsPasswordProperty.PropertyName)
83 | KillPassword();
84 | if (e.PropertyName == Xfx.XfxComboBox.ItemsSourceProperty.PropertyName)
85 | SetItemsSource();
86 | else if (e.PropertyName == Xfx.XfxComboBox.ThresholdProperty.PropertyName)
87 | SetThreshold();
88 | }
89 |
90 | private void AutoCompleteOnItemSelected(object sender, AdapterView.ItemClickEventArgs args)
91 | {
92 | // Method is called via event subscription which could result to a call to a disposed object.
93 | if (Element == null || Control == null || Control.Handle == IntPtr.Zero || EditText == null || EditText.Handle == IntPtr.Zero || AutoComplete == null || AutoComplete.Handle == IntPtr.Zero)
94 | return;
95 |
96 | var view = (AutoCompleteTextView)sender;
97 | var selectedItemArgs = new XfxSelectedItemChangedEventArgs(view.Text, args.Position);
98 | var element = (Xfx.XfxComboBox)Element;
99 | element.OnItemSelectedInternal(Element, selectedItemArgs);
100 | HideKeyboard();
101 | }
102 |
103 | private void ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
104 | {
105 | // Method is called via event subscription which could result to a call to a disposed object.
106 | if (Element == null || Control == null || Control.Handle == IntPtr.Zero || EditText == null || EditText.Handle == IntPtr.Zero || AutoComplete == null || AutoComplete.Handle == IntPtr.Zero)
107 | return;
108 |
109 | var element = (Xfx.XfxComboBox)Element;
110 | ResetAdapter(element);
111 | }
112 |
113 | private void KillPassword()
114 | {
115 | if (Element.IsPassword)
116 | throw new NotImplementedException("Cannot set IsPassword on a XfxComboBox");
117 | }
118 |
119 | private void ResetAdapter(Xfx.XfxComboBox element)
120 | {
121 | var adapter = new XfxComboBoxArrayAdapter(Context,
122 | Resource.Layout.SimpleDropDownItem1Line,
123 | element.ItemsSource.ToList(),
124 | element.SortingAlgorithm);
125 | AutoComplete.Adapter = adapter;
126 | adapter.NotifyDataSetChanged();
127 | }
128 |
129 | private void SetItemsSource()
130 | {
131 | var element = (Xfx.XfxComboBox)Element;
132 | if (element.ItemsSource == null) return;
133 |
134 | ResetAdapter(element);
135 | }
136 |
137 | private void SetThreshold()
138 | {
139 | var element = (Xfx.XfxComboBox)Element;
140 | AutoComplete.Threshold = element.Threshold;
141 | }
142 | }
143 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/Resources/Resource.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/src/Xfx.Controls.Droid/Resources/Resource.Designer.cs
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/XfxComboBox/XfxComboBoxArrayAdapter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Android.Content;
4 | using Android.Widget;
5 |
6 | namespace Xfx.Controls.Droid.XfxComboBox
7 | {
8 | [Android.Runtime.Preserve (AllMembers = true)]
9 | internal class XfxComboBoxArrayAdapter : ArrayAdapter
10 | {
11 | private readonly IList _objects;
12 | private readonly Func, ICollection> _sortingAlgorithm;
13 |
14 | public XfxComboBoxArrayAdapter(
15 | Context context,
16 | int textViewResourceId,
17 | List objects,
18 | Func, ICollection> sortingAlgorithm) : base(context, textViewResourceId, objects)
19 | {
20 | _objects = objects;
21 | _sortingAlgorithm = sortingAlgorithm;
22 | }
23 |
24 | public override Filter Filter
25 | {
26 | get
27 | {
28 | return new XfxComboBoxFilter(_sortingAlgorithm) { Adapter = this, Originals = _objects };
29 | }
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/XfxComboBox/XfxComboBoxFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Android.Widget;
5 | using Java.Lang;
6 | using Java.Util;
7 | using Xfx.Controls.Droid.Extensions;
8 |
9 | namespace Xfx.Controls.Droid.XfxComboBox
10 | {
11 | [Android.Runtime.Preserve (AllMembers = true)]
12 | internal class XfxComboBoxFilter : Filter
13 | {
14 | private readonly Func, ICollection> _sortingAlgorithm;
15 |
16 | public XfxComboBoxFilter(Func, ICollection> sortingAlgorithm)
17 | {
18 | _sortingAlgorithm = sortingAlgorithm;
19 | }
20 |
21 | public XfxComboBoxArrayAdapter Adapter { private get; set; }
22 | public IList Originals { get; set; }
23 |
24 | protected override FilterResults PerformFiltering(ICharSequence constraint)
25 | {
26 | var results = new FilterResults();
27 | if (constraint == null || constraint.Length() == 0)
28 | {
29 | results.Values = Originals.ToList().ToArrayList();
30 | results.Count = Originals.Count;
31 | }
32 | else
33 | {
34 | var values = new ArrayList();
35 | var sorted = _sortingAlgorithm(constraint.ToString(), Originals).ToList();
36 |
37 | for (var index = 0; index < sorted.Count; index++)
38 | {
39 | var item = sorted[index];
40 | values.Add(item);
41 | }
42 |
43 | results.Values = values;
44 | results.Count = sorted.Count;
45 | }
46 |
47 | return results;
48 | }
49 |
50 | protected override void PublishResults(ICharSequence constraint, FilterResults results)
51 | {
52 | if (results.Count == 0)
53 | Adapter.NotifyDataSetInvalidated();
54 | else
55 | {
56 | Adapter.Clear();
57 | var vals = (ArrayList)results.Values;
58 | foreach (var val in vals.ToArray())
59 | {
60 | Adapter.Add(val);
61 | }
62 | Adapter.NotifyDataSetChanged();
63 | }
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/XfxControls.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xfx
4 | {
5 | [Android.Runtime.Preserve (AllMembers = true)]
6 | public static class XfxControls
7 | {
8 | public static void Init() { }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/XfxVisualElementManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.Views;
3 | using Xamarin.Forms.Platform.Android;
4 | using Xfx.Controls.Droid.Forms.Internals;
5 |
6 | namespace Xfx.Controls.Droid
7 | {
8 | [Android.Runtime.Preserve (AllMembers = true)]
9 | public class XfxVisualElementManager : IDisposable
10 | {
11 | private VisualElementPackager _packager;
12 | private VisualElementRendererFlags _flags;
13 | private VisualElementTracker _tracker;
14 | private GestureManager _gestureManager;
15 |
16 | public bool AutoPackage => (_flags & VisualElementRendererFlags.AutoPackage) != 0;
17 |
18 | public bool AutoTrack => (_flags & VisualElementRendererFlags.AutoTrack) != 0;
19 |
20 | protected bool IsDisposed => _flags.HasFlag(VisualElementRendererFlags.Disposed);
21 | public VisualElementTracker Tracker => _tracker;
22 |
23 | public void Dispose()
24 | {
25 | Dispose(true);
26 | GC.SuppressFinalize(this);
27 | }
28 |
29 | protected virtual void Dispose(bool disposing)
30 | {
31 | if (IsDisposed || !disposing)
32 | {
33 | return;
34 | }
35 |
36 | _flags |= VisualElementRendererFlags.Disposed;
37 |
38 | if (_tracker != null)
39 | {
40 | _tracker.Dispose();
41 | _tracker = null;
42 | }
43 | if (_packager != null)
44 | {
45 | _packager.Dispose();
46 | _packager = null;
47 | }
48 | }
49 |
50 | public void Init(IVisualElementRenderer renderer, VisualElementRendererFlags flags = VisualElementRendererFlags.AutoPackage|VisualElementRendererFlags.AutoTrack)
51 | {
52 |
53 | _flags = flags;
54 | _packager = new VisualElementPackager(renderer);
55 | _tracker = new VisualElementTracker(renderer);
56 | _gestureManager = new GestureManager(renderer);
57 |
58 | if (AutoPackage)
59 | _packager?.Load();
60 | }
61 |
62 | public void UpdateLayout()
63 | {
64 | if(AutoTrack)
65 | _tracker?.UpdateLayout();
66 | }
67 |
68 | public bool OnTouchEvent(MotionEvent motionEvent) => _gestureManager.OnTouchEvent(motionEvent);
69 | }
70 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/Xfx.Controls.Shared/Extensions/XamarinFormsExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Xamarin.Forms;
3 |
4 | // ReSharper disable once CheckNamespace
5 | namespace Xfx.Extensions
6 | {
7 | public static class XamarinFormsExtensions
8 | {
9 | public static T GetInternalField(this BindableObject element, string propertyKeyName) where T:class
10 | {
11 | // reflection stinks, but hey, what can you do?
12 | var pi = element.GetType().GetField(propertyKeyName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.FlattenHierarchy);
13 | var key = (T) pi?.GetValue(element);
14 |
15 | return key;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.Shared/Xfx.Controls.Shared.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 4761dc06-7840-4af3-b663-28be3aaab996
7 |
8 |
9 | Xfx.Controls.Shared
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Xfx.Controls.Shared/Xfx.Controls.Shared.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4761dc06-7840-4af3-b663-28be3aaab996
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Controls/MbAutoComplete/MbAutoCompleteDefaultDataSource.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using Foundation;
4 | using UIKit;
5 |
6 | namespace MBAutoComplete
7 | {
8 | public class MbAutoCompleteDefaultDataSource : MbAutoCompleteViewSource
9 | {
10 | private const string _cellIdentifier = "DefaultIdentifier";
11 |
12 | public override void UpdateSuggestions(ICollection suggestions)
13 | {
14 | Suggestions = suggestions;
15 | }
16 |
17 | public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
18 | {
19 | var cell = tableView.DequeueReusableCell(_cellIdentifier);
20 | var item = Suggestions.ElementAt(indexPath.Row);
21 |
22 | if (cell == null)
23 | cell = new UITableViewCell(UITableViewCellStyle.Default, _cellIdentifier);
24 |
25 | cell.BackgroundColor = UIColor.Clear;
26 | cell.TextLabel.Text = item;
27 |
28 | return cell;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Controls/MbAutoComplete/MbAutoCompleteTableView.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace MBAutoComplete
4 | {
5 | internal class MbAutoCompleteTableView : UITableView
6 | {
7 | private readonly UIScrollView _parentScrollView;
8 |
9 | public MbAutoCompleteTableView(UIScrollView parentScrollView)
10 | {
11 | _parentScrollView = parentScrollView;
12 | }
13 |
14 | public override bool Hidden
15 | {
16 | get { return base.Hidden; }
17 | set
18 | {
19 | base.Hidden = value;
20 | if (_parentScrollView == null) return;
21 | _parentScrollView.DelaysContentTouches = !value;
22 | }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Controls/MbAutoComplete/MbAutoCompleteTextField.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using CoreAnimation;
5 | using CoreGraphics;
6 | using Foundation;
7 | using UIKit;
8 | using Xamarin.Forms;
9 | using Xamarin.Forms.Platform.iOS;
10 | using Xfx.Controls.iOS.Controls;
11 |
12 | namespace MBAutoComplete
13 | {
14 | [Register("MbAutoCompleteTextField")]
15 | public class MbAutoCompleteTextField : FloatLabeledTextField, IUITextFieldDelegate
16 | {
17 | private MbAutoCompleteViewSource _autoCompleteViewSource;
18 | private UIView _background;
19 | private CGRect _drawnFrame;
20 | private List _items;
21 | private UIViewController _parentViewController;
22 | private UIScrollView _scrollView;
23 |
24 | public Func, ICollection> SortingAlgorithm { get; set; } = (t, d) => d;
25 |
26 | public MbAutoCompleteViewSource AutoCompleteViewSource
27 | {
28 | get { return _autoCompleteViewSource; }
29 | set
30 | {
31 | _autoCompleteViewSource = value;
32 | _autoCompleteViewSource.AutoCompleteTextField = this;
33 | if (AutoCompleteTableView != null)
34 | {
35 | AutoCompleteTableView.Source = AutoCompleteViewSource;
36 | }
37 | }
38 | }
39 |
40 | public UITableView AutoCompleteTableView { get; private set; }
41 |
42 | public bool IsInitialized { get; private set; }
43 |
44 | public int Threshold { get; set; } = 2;
45 |
46 | public int AutocompleteTableViewHeight { get; set; } = 150;
47 |
48 | public void Draw(UIViewController viewController, CALayer layer, UIScrollView scrollView)
49 | {
50 | if (viewController == null)
51 | {
52 | throw new ArgumentNullException(nameof(viewController), @"View cannot be null");
53 | }
54 |
55 | _scrollView = scrollView;
56 | _drawnFrame = layer.Frame;
57 | _parentViewController = viewController;
58 |
59 |
60 | //Make new tableview and do some settings
61 | AutoCompleteTableView = new MbAutoCompleteTableView(_scrollView)
62 | {
63 | DelaysContentTouches = true,
64 | ClipsToBounds = true,
65 | ScrollEnabled = true,
66 | AllowsSelection = true,
67 | Bounces = false,
68 | Hidden = true,
69 | ContentInset = UIEdgeInsets.Zero,
70 | AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth,
71 | Source = AutoCompleteViewSource,
72 | TableFooterView = new UIView()
73 | };
74 |
75 | //Some textfield settings
76 | AutocorrectionType = UITextAutocorrectionType.No;
77 | ClearButtonMode = UITextFieldViewMode.Never;
78 |
79 | var scrollViewIsNull = _scrollView == null;
80 |
81 | CGRect frame;
82 | UIView view;
83 | if (scrollViewIsNull)
84 | {
85 | view = _parentViewController.View;
86 | frame = new CGRect(_drawnFrame.X, _drawnFrame.Bottom + _drawnFrame.Height, _drawnFrame.Width, AutocompleteTableViewHeight);
87 | }
88 | else
89 | {
90 | var e = (ScrollView)((ScrollViewRenderer)_scrollView).Element;
91 | var p = e.Padding;
92 | var m = e.Margin;
93 | frame = new CGRect(_drawnFrame.X + p.Left + m.Left,
94 | _drawnFrame.Y + _drawnFrame.Height - 5,
95 | _drawnFrame.Width,
96 | AutocompleteTableViewHeight);
97 | view = _scrollView;
98 | }
99 |
100 | AutoCompleteTableView.Layer.CornerRadius = 5;
101 |
102 | _background = new UIView(frame) { BackgroundColor = UIColor.White, Hidden = true };
103 | _background.Layer.CornerRadius = 5; //rounded corners
104 | _background.Layer.MasksToBounds = false;
105 | _background.Layer.ShadowColor = UIColor.Black.CGColor;
106 | _background.Layer.ShadowOffset = new CGSize(0.0f, 4.0f);
107 | _background.Layer.ShadowOpacity = 0.25f;
108 | _background.Layer.ShadowRadius = 8f;
109 | _background.Layer.BorderColor = UIColor.LightGray.CGColor;
110 | _background.Layer.BorderWidth = 0.1f;
111 |
112 | AutoCompleteTableView.Frame = frame;
113 | view.AddSubview(_background);
114 | view.AddSubview(AutoCompleteTableView);
115 |
116 | //listen to edit events
117 | EditingChanged += OnEditingChanged;
118 | EditingDidEnd += OnEditingDidEnd;
119 |
120 | UpdateTableViewData();
121 | IsInitialized = true;
122 | }
123 |
124 | private void OnEditingDidEnd(object sender, EventArgs eventArgs)
125 | {
126 | HideAutoCompleteView();
127 | }
128 |
129 | private void OnEditingChanged(object sender, EventArgs eventArgs)
130 | {
131 | if (Text.Length >= Threshold)
132 | {
133 | ShowAutoCompleteView();
134 | UpdateTableViewData();
135 | }
136 | else
137 | {
138 | HideAutoCompleteView();
139 | }
140 | }
141 |
142 | private void ShowAutoCompleteView()
143 | {
144 | _background.Hidden = false;
145 | AutoCompleteTableView.Hidden = false;
146 | if (_scrollView != null)
147 | {
148 | _scrollView.ScrollRectToVisible(AutoCompleteTableView.Frame, true);
149 | }
150 | }
151 |
152 | private void HideAutoCompleteView()
153 | {
154 | _background.Hidden = true;
155 | AutoCompleteTableView.Hidden = true;
156 | }
157 |
158 | public void UpdateTableViewData()
159 | {
160 | var sorted = SortingAlgorithm(Text, _items);
161 | if (!sorted.Any())
162 | {
163 | HideAutoCompleteView();
164 | return;
165 | }
166 | AutoCompleteViewSource.Suggestions = sorted;
167 | AutoCompleteTableView.ReloadData();
168 |
169 | var f = AutoCompleteTableView.Frame;
170 | var height = Math.Min(AutocompleteTableViewHeight, (int)AutoCompleteTableView.ContentSize.Height);
171 | var frame = new CGRect(f.X, f.Y, f.Width, height);
172 | AutoCompleteTableView.Frame = frame;
173 | _background.Frame = frame;
174 | }
175 |
176 | public void UpdateItems(List items)
177 | {
178 | _items = items;
179 | AutoCompleteViewSource.UpdateSuggestions(items);
180 | }
181 | }
182 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Controls/MbAutoComplete/MbAutoCompleteViewSource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Foundation;
5 | using UIKit;
6 | using Xamarin.Forms;
7 | using Xfx;
8 |
9 | namespace MBAutoComplete
10 | {
11 | public abstract class MbAutoCompleteViewSource : UITableViewSource
12 | {
13 | public ICollection Suggestions { get; set; } = new List();
14 |
15 | public MbAutoCompleteTextField AutoCompleteTextField { get; set; }
16 |
17 | public abstract void UpdateSuggestions(ICollection suggestions);
18 |
19 | public abstract override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath);
20 |
21 | public override nint RowsInSection(UITableView tableview, nint section)
22 | {
23 | return Suggestions.Count;
24 | }
25 |
26 | public event EventHandler Selected;
27 |
28 | public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
29 | {
30 | AutoCompleteTextField.Text = Suggestions.ElementAt(indexPath.Row);
31 | AutoCompleteTextField.AutoCompleteTableView.Hidden = true;
32 | AutoCompleteTextField.ResignFirstResponder();
33 |
34 | int index = (int)indexPath.Item;
35 | var item = Suggestions.ToList()[index];
36 |
37 | Selected?.Invoke(tableView, new XfxSelectedItemChangedEventArgs(item, index));
38 | // don't call base.RowSelected
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Controls/UICardView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using CoreGraphics;
4 | using UIKit;
5 |
6 | namespace Xfx.Controls.iOS.Controls
7 | {
8 | public class UICardView : UIView
9 | {
10 | private UIView _shadowLayer;
11 | private float _requestedElevation = -1f;
12 | public override void MovedToSuperview()
13 | {
14 | if (_shadowLayer != null) return;
15 |
16 | _shadowLayer = new UIView { BackgroundColor = UIColor.Red };
17 | _shadowLayer.Layer.ShadowColor = UIColor.DarkGray.CGColor;
18 | _shadowLayer.Layer.ShadowOffset = new CGSize(0.0f, 1f);
19 | _shadowLayer.Layer.ShadowOpacity = 1f;
20 | _shadowLayer.Layer.ShadowRadius = _requestedElevation < 0f ? 3f:_requestedElevation;
21 | _shadowLayer.Layer.MasksToBounds = false;
22 | _shadowLayer.Layer.ShouldRasterize = true;
23 | _shadowLayer.Layer.RasterizationScale = UIScreen.MainScreen.Scale;
24 | Superview.InsertSubviewBelow(_shadowLayer, this);
25 | }
26 |
27 | public void DrawBorder(CGRect rect, nfloat radius)
28 | {
29 | _shadowLayer.Frame = rect;
30 | _shadowLayer.Layer.CornerRadius = radius;
31 | //var bounds = _shadowLayer.Layer.Bounds;
32 | //_shadowLayer.Layer.ShadowPath = UIBezierPath.FromRoundedRect(bounds, radius).CGPath;
33 |
34 | //LayoutMargins = new UIEdgeInsets(20, 40, 40, 20);
35 | Frame = rect;
36 | Layer.BorderColor = UIColor.LightGray.CGColor;
37 | Layer.BorderWidth = 0.1f;
38 | Layer.MasksToBounds = true;
39 | Layer.CornerRadius = radius;
40 | Layer.ShouldRasterize = true;
41 | Layer.RasterizationScale = UIScreen.MainScreen.Scale;
42 | }
43 |
44 | public void SetElevation(float elevation)
45 | {
46 | _requestedElevation = elevation/2;
47 | if (_shadowLayer?.Layer?.ShadowRadius == null) return;
48 | _shadowLayer.Layer.ShadowRadius = elevation / 2;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Extensions/ColorExtensions.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace Xfx.Controls.iOS.Extensions
4 | {
5 | public static class ColorExtensions
6 | {
7 | public static readonly UIColor SeventyPercentGrey = new UIColor(0.7f, 0.7f, 0.7f, 1);
8 | }
9 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Extensions/KeyboardExtensions.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx.Controls.iOS.Extensions
5 | {
6 | public static class KeyboardExtensions
7 | {
8 | public static UIKeyboardType ToNative(this Keyboard input)
9 | {
10 | if (input == Keyboard.Chat)
11 | {
12 | return UIKeyboardType.Twitter;
13 | }
14 | if (input == Keyboard.Text)
15 | {
16 | return UIKeyboardType.ASCIICapable;
17 | }
18 | if (input == Keyboard.Numeric)
19 | {
20 | return UIKeyboardType.NumberPad;
21 | }
22 | if (input == Keyboard.Telephone)
23 | {
24 | return UIKeyboardType.PhonePad;
25 | }
26 | if (input == Keyboard.Url)
27 | {
28 | return UIKeyboardType.Url;
29 | }
30 | if (input == Keyboard.Email)
31 | {
32 | return UIKeyboardType.EmailAddress;
33 | }
34 | return UIKeyboardType.Default;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Extensions/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using UIKit;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Internals;
5 | using Xamarin.Forms.Platform.iOS;
6 |
7 | namespace Xfx.Controls.iOS.Extensions
8 | {
9 | // stolen from Xamarin.Forms codebase because theres is internal.
10 | public static class StringExtensions
11 | {
12 | public static NSAttributedString ToAttributed(this Span span, Font defaultFont, Color defaultForegroundColor)
13 | {
14 | if (span == null)
15 | return null;
16 |
17 | #pragma warning disable 0618 //retaining legacy call to obsolete code
18 | var font = span.Font != Font.Default ? span.Font : defaultFont;
19 | #pragma warning restore 0618
20 | var fgcolor = span.ForegroundColor;
21 | if (fgcolor.IsDefault)
22 | fgcolor = defaultForegroundColor;
23 | if (fgcolor.IsDefault)
24 | fgcolor = Color.Black; // as defined by apple docs
25 |
26 | return new NSAttributedString(span.Text, font == Font.Default ? null : font.ToUIFont(), fgcolor.ToUIColor(), span.BackgroundColor.ToUIColor());
27 |
28 | }
29 |
30 | public static NSAttributedString ToAttributed(this FormattedString formattedString, Font defaultFont,
31 | Color defaultForegroundColor)
32 | {
33 | if (formattedString == null)
34 | return null;
35 | var attributed = new NSMutableAttributedString();
36 | foreach (var span in formattedString.Spans)
37 | {
38 | if (span.Text == null)
39 | continue;
40 |
41 | attributed.Append(span.ToAttributed(defaultFont, defaultForegroundColor));
42 | }
43 |
44 | return attributed;
45 | }
46 |
47 | internal static NSAttributedString ToAttributed(this Span span, Element owner, Color defaultForegroundColor)
48 | {
49 | if (span == null)
50 | return null;
51 |
52 | UIFont targetFont;
53 | if (span.IsDefault())
54 | targetFont = ((IFontElement)owner).ToUIFont();
55 | else
56 | targetFont = span.ToUIFont();
57 |
58 | var fgcolor = span.ForegroundColor;
59 | if (fgcolor.IsDefault)
60 | fgcolor = defaultForegroundColor;
61 | if (fgcolor.IsDefault)
62 | fgcolor = Color.Black; // as defined by apple docs
63 |
64 | return new NSAttributedString(span.Text, targetFont, fgcolor.ToUIColor(), span.BackgroundColor.ToUIColor());
65 | }
66 |
67 | internal static NSAttributedString ToAttributed(this FormattedString formattedString, Element owner,Color defaultForegroundColor)
68 | {
69 | if (formattedString == null)
70 | return null;
71 | var attributed = new NSMutableAttributedString();
72 | foreach (var span in formattedString.Spans)
73 | {
74 | if (span.Text == null)
75 | continue;
76 |
77 | attributed.Append(span.ToAttributed(owner, defaultForegroundColor));
78 | }
79 |
80 | return attributed;
81 | }
82 | }
83 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Extensions/UIViewExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using UIKit;
4 |
5 | namespace Xfx.Controls.iOS.Extensions
6 | {
7 | public static class UIViewExtensions
8 | {
9 | // literally ripped this off from X.Forms source.
10 | public static T FindDescendantView(this UIView view) where T : UIView
11 | {
12 | var queue = new Queue();
13 | queue.Enqueue(view);
14 |
15 | while (queue.Count > 0)
16 | {
17 | var descendantView = queue.Dequeue();
18 |
19 | var result = descendantView as T;
20 | if (result != null)
21 | return result;
22 |
23 | for (var i = 0; i < descendantView.Subviews.Length; i++)
24 | queue.Enqueue(descendantView.Subviews[i]);
25 | }
26 |
27 | return null;
28 | }
29 | public static UIWindow GetTopWindow(this UIApplication app)
30 | {
31 | return app.Windows.Reverse().FirstOrDefault(x => x.WindowLevel == UIWindowLevel.Normal && !x.Hidden);
32 | }
33 |
34 | public static UIView GetTopView(this UIApplication app)
35 | {
36 | return app.GetTopWindow().Subviews.Last();
37 | }
38 |
39 | public static UIViewController GetTopViewController(this UIApplication app)
40 | {
41 | var viewController = app.KeyWindow.RootViewController;
42 | while (viewController.PresentedViewController != null)
43 | viewController = viewController.PresentedViewController;
44 |
45 | return viewController;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/InvalidRendererException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xfx.Controls.iOS
4 | {
5 | public class InvalidRendererException : Exception
6 | {
7 | public InvalidRendererException(string message):base(message)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("Xfx.Controls.iOS")]
8 |
9 | // Setting ComVisible to false makes the types in this assembly not visible
10 | // to COM components. If you need to access a type in this assembly from
11 | // COM, set the ComVisible attribute to true on that type.
12 | [assembly: ComVisible(false)]
13 |
14 | // The following GUID is for the ID of the typelib if this project is exposed to COM
15 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
16 |
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Renderers/XfxCardViewRendererTouch.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using CoreGraphics;
4 | using UIKit;
5 | using Xamarin.Forms;
6 | using Xamarin.Forms.Platform.iOS;
7 | using Xfx;
8 | using Xfx.Controls.iOS.Controls;
9 | using Xfx.Controls.iOS.Renderers;
10 |
11 | [assembly: ExportRenderer(typeof(XfxCardView), typeof(XfxCardViewRendererTouch))]
12 |
13 | namespace Xfx.Controls.iOS.Renderers
14 | {
15 | public class XfxCardViewRendererTouch : UICardView, IVisualElementRenderer
16 | {
17 | private XfxVisualElementManager _xfxVisualElementManager;
18 |
19 | protected XfxCardView CardView => (XfxCardView) Element;
20 |
21 | public event EventHandler ElementChanged;
22 | public event EventHandler ElementPropertyChanged;
23 |
24 | public VisualElement Element { get; private set; }
25 | public SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint) => NativeView.GetSizeRequest(widthConstraint, heightConstraint, 44.0, 44.0);
26 | public UIView NativeView => this;
27 | public void SetElementSize(Size size) => Element.Layout(new Rectangle(Element.X, Element.Y, size.Width, size.Height));
28 | public UIViewController ViewController => null;
29 |
30 | public void SetElement(VisualElement element)
31 | {
32 | var oldElement = Element;
33 |
34 | if (oldElement != null)
35 | oldElement.PropertyChanged -= HandlePropertyChanged;
36 |
37 | Element = element;
38 |
39 | if (Element != null)
40 | Element.PropertyChanged += HandlePropertyChanged;
41 |
42 | this.RemoveAllSubviews();
43 |
44 | _xfxVisualElementManager = new XfxVisualElementManager();
45 | _xfxVisualElementManager.Init(this);
46 |
47 | var view = Element as XfxCardView;
48 | if (view == null) return;
49 | SetCardBackgroundColor();
50 | SetElevation();
51 | RaiseElementChanged(new VisualElementChangedEventArgs(oldElement, Element));
52 | }
53 |
54 | protected virtual void OnElementChanged(object sender, VisualElementChangedEventArgs args){ }
55 |
56 | protected virtual void OnElementPropertyChanged(object sender, PropertyChangedEventArgs args){ }
57 |
58 | protected override void Dispose(bool disposing)
59 | {
60 | base.Dispose(disposing);
61 | _xfxVisualElementManager?.Dispose();
62 | }
63 |
64 | private void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
65 | {
66 | if (e.PropertyName == "Content")
67 | {
68 | //Tracker.UpdateLayout ();
69 | }
70 | else if (
71 | e.PropertyName == VisualElement.WidthProperty.PropertyName ||
72 | e.PropertyName == VisualElement.HeightProperty.PropertyName ||
73 | e.PropertyName == VisualElement.XProperty.PropertyName ||
74 | e.PropertyName == VisualElement.YProperty.PropertyName ||
75 | e.PropertyName == XfxCardView.CornerRadiusProperty.PropertyName ||
76 | e.PropertyName == XfxCardView.ElevationProperty.PropertyName)
77 | {
78 | Element.Layout(Element.Bounds);
79 |
80 | var radius = CardView.CornerRadius;
81 | var rect = new CGRect(Element.Bounds.X, Element.Bounds.Y, Element.Bounds.Width, Element.Bounds.Height);
82 | DrawBorder(rect, radius);
83 | }
84 | else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName)
85 | {
86 | SetCardBackgroundColor();
87 | }
88 | else if (e.PropertyName == XfxCardView.ElevationProperty.PropertyName)
89 | {
90 | SetElevation();
91 | }
92 | RaiseElementPropertyChanged(e);
93 | }
94 |
95 | private void RaiseElementChanged(VisualElementChangedEventArgs args)
96 | {
97 | ElementChanged?.Invoke(this, args);
98 | OnElementChanged(this, args);
99 | }
100 |
101 | private void RaiseElementPropertyChanged(PropertyChangedEventArgs args)
102 | {
103 | ElementPropertyChanged?.Invoke(this, args);
104 | OnElementPropertyChanged(this, args);
105 | }
106 |
107 | private void SetCardBackgroundColor() => BackgroundColor = CardView.BackgroundColor.ToUIColor();
108 |
109 | private void SetElevation() => SetElevation(CardView.Elevation);
110 | }
111 |
112 |
113 | internal static class Extensions
114 | {
115 | internal static void RemoveAllSubviews(this UIView super)
116 | {
117 | if (super == null)
118 | return;
119 | for (var i = 0; i < super.Subviews.Length; i++)
120 | {
121 | var subview = super.Subviews[i];
122 | subview.RemoveFromSuperview();
123 | }
124 | }
125 | }
126 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/Renderers/XfxComboBoxRendererTouch.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Specialized;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Linq;
6 | using CoreGraphics;
7 | using MBAutoComplete;
8 | using UIKit;
9 | using Xamarin.Forms;
10 | using Xamarin.Forms.Platform.iOS;
11 | using Xfx;
12 | using Xfx.Controls.iOS.Controls;
13 | using Xfx.Controls.iOS.Extensions;
14 | using Xfx.Controls.iOS.Renderers;
15 |
16 | [assembly: ExportRenderer(typeof(XfxComboBox), typeof(XfxComboBoxRendererTouch))]
17 |
18 | namespace Xfx.Controls.iOS.Renderers
19 | {
20 | public class XfxComboBoxRendererTouch : XfxEntryRendererTouch
21 | {
22 | private MbAutoCompleteTextField NativeControl => (MbAutoCompleteTextField)Control;
23 | private XfxComboBox ComboBox => (XfxComboBox)Element;
24 |
25 | public XfxComboBoxRendererTouch()
26 | {
27 | // ReSharper disable once VirtualMemberCallInContructor
28 | Frame = new RectangleF(0, 20, 320, 40);
29 | }
30 |
31 | protected override FloatLabeledTextField CreateNativeControl()
32 | {
33 | var element = (XfxComboBox)Element;
34 | var view = new MbAutoCompleteTextField
35 | {
36 | AutoCompleteViewSource = new MbAutoCompleteDefaultDataSource(),
37 | SortingAlgorithm = element.SortingAlgorithm
38 | };
39 | view.AutoCompleteViewSource.Selected += AutoCompleteViewSourceOnSelected;
40 | return view;
41 | }
42 |
43 | public override void Draw(CGRect rect)
44 | {
45 | base.Draw(rect);
46 | var scrollView = GetParentScrollView(Control);
47 | var ctrl = UIApplication.SharedApplication.GetTopViewController();
48 | NativeControl.Draw(ctrl, Layer, scrollView);
49 | }
50 |
51 | protected override void OnElementChanged(ElementChangedEventArgs e)
52 | {
53 | base.OnElementChanged(e);
54 | if (e.OldElement != null)
55 | {
56 | // unsubscribe
57 | NativeControl.AutoCompleteViewSource.Selected -= AutoCompleteViewSourceOnSelected;
58 | var elm = (XfxComboBox)e.OldElement;
59 | elm.CollectionChanged -= ItemsSourceCollectionChanged;
60 | }
61 |
62 | if (e.NewElement != null)
63 | {
64 | SetItemsSource();
65 | SetThreshold();
66 | KillPassword();
67 |
68 | var elm = (XfxComboBox)e.NewElement;
69 | elm.CollectionChanged += ItemsSourceCollectionChanged;
70 | }
71 | }
72 |
73 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
74 | {
75 | base.OnElementPropertyChanged(sender, e);
76 |
77 | if (e.PropertyName == Entry.IsPasswordProperty.PropertyName)
78 | KillPassword();
79 | if (e.PropertyName == XfxComboBox.ItemsSourceProperty.PropertyName)
80 | SetItemsSource();
81 | else if (e.PropertyName == XfxComboBox.ThresholdProperty.PropertyName)
82 | SetThreshold();
83 | }
84 |
85 | private void SetThreshold()
86 | {
87 | NativeControl.Threshold = ComboBox.Threshold;
88 | }
89 |
90 | private void SetItemsSource()
91 | {
92 | var items = ComboBox.ItemsSource.ToList();
93 | NativeControl.UpdateItems(items);
94 | }
95 |
96 | private void KillPassword()
97 | {
98 | if (Element.IsPassword)
99 | throw new NotImplementedException("Cannot set IsPassword on a XfxComboBox");
100 | }
101 |
102 | private void ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
103 | {
104 | SetItemsSource();
105 | }
106 |
107 | private static UIScrollView GetParentScrollView(UIView element)
108 | {
109 | if (element.Superview == null) return null;
110 | var scrollView = element.Superview as UIScrollView;
111 | return scrollView ?? GetParentScrollView(element.Superview);
112 | }
113 |
114 | private void AutoCompleteViewSourceOnSelected(object sender, XfxSelectedItemChangedEventArgs args)
115 | {
116 | ComboBox.OnItemSelectedInternal(Element, args);
117 | // TODO : Florell, Chase (Contractor) 02/15/17 SET FOCUS
118 | }
119 | }
120 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/XfxControls.cs:
--------------------------------------------------------------------------------
1 | namespace Xfx
2 | {
3 | public static class XfxControls
4 | {
5 | public static void Init() { }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/XfxVisualElementManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 | using Xamarin.Forms.Platform.iOS;
4 |
5 | namespace Xfx.Controls.iOS
6 | {
7 | ///
8 | /// Used to add Gesture Recognizers and other Forms features to a Renderer.
9 | ///
10 | public class XfxVisualElementManager : IDisposable
11 | {
12 | private EventTracker _events;
13 | private VisualElementRendererFlags _flags;
14 | private VisualElementPackager _packager;
15 | private VisualElementTracker _tracker;
16 |
17 | public bool AutoPackage => (_flags & VisualElementRendererFlags.AutoPackage) != 0;
18 |
19 | public bool AutoTrack => (_flags & VisualElementRendererFlags.AutoTrack) != 0;
20 |
21 | protected bool IsDisposed => _flags.HasFlag(VisualElementRendererFlags.Disposed);
22 |
23 | public void Dispose()
24 | {
25 | Dispose(true);
26 | GC.SuppressFinalize(this);
27 | }
28 |
29 | protected virtual void Dispose(bool disposing)
30 | {
31 | if (IsDisposed || !disposing)
32 | {
33 | return;
34 | }
35 |
36 | _flags |= VisualElementRendererFlags.Disposed;
37 |
38 | if (_events != null)
39 | {
40 | _events.Dispose();
41 | _events = null;
42 | }
43 | if (_tracker != null)
44 | {
45 | _tracker.Dispose();
46 | _tracker = null;
47 | }
48 | if (_packager != null)
49 | {
50 | _packager.Dispose();
51 | _packager = null;
52 | }
53 | }
54 |
55 | public void Init(IVisualElementRenderer renderer, VisualElementRendererFlags flags = VisualElementRendererFlags.AutoPackage | VisualElementRendererFlags.AutoTrack)
56 | {
57 | _flags = flags;
58 | _packager = new VisualElementPackager(renderer);
59 | _events = new EventTracker(renderer);
60 | _tracker = new VisualElementTracker(renderer);
61 | _tracker.NativeControlUpdated += OnNativeControlUpdated;
62 |
63 | if (AutoTrack)
64 | {
65 | if (renderer is UIView uiView)
66 | _events.LoadEvents(uiView);
67 | else
68 | throw new InvalidRendererException("IVisualElementRenderer must be of type 'UIView'");
69 | }
70 |
71 | if (AutoPackage)
72 | _packager?.Load();
73 | }
74 |
75 | protected virtual void UpdateNativeWidget()
76 | {
77 | }
78 |
79 | private void OnNativeControlUpdated(object sender, EventArgs e) => UpdateNativeWidget();
80 | }
81 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Xfx.Controls/Behaviors/BindableBehavior.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx.Behaviors
5 | {
6 | public class BindableBehavior : Behavior where T: BindableObject
7 | {
8 | protected override void OnAttachedTo(BindableObject bindable)
9 | {
10 | base.OnAttachedTo(bindable);
11 | bindable.BindingContextChanged += OnBindingContextChanged(bindable);
12 | }
13 |
14 | protected override void OnDetachingFrom(BindableObject bindable)
15 | {
16 | base.OnDetachingFrom(bindable);
17 | bindable.BindingContextChanged -= OnBindingContextChanged(bindable);
18 | }
19 |
20 | private EventHandler OnBindingContextChanged(BindableObject bindable)
21 | {
22 | return delegate { BindingContext = bindable.BindingContext; };
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls/Behaviors/ValidatesOnNotifyDataErrors.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Linq;
4 | using Xamarin.Forms;
5 |
6 | namespace Xfx.Behaviors
7 | {
8 | public class ValidatesOnNotifyDataErrors : BindableBehavior
9 | {
10 | private IXfxValidatableElement _element;
11 |
12 | ///
13 | /// Gets or sets the property name used for validation
14 | ///
15 | public string PropertyName { private get; set; }
16 |
17 | protected override void OnAttachedTo(BindableObject bindable)
18 | {
19 | base.OnAttachedTo(bindable);
20 | _element = (IXfxValidatableElement)bindable;
21 | bindable.BindingContextChanged += BindableOnBindingContextChanged;
22 | }
23 |
24 | protected override void OnDetachingFrom(BindableObject bindable)
25 | {
26 | base.OnDetachingFrom(bindable);
27 | var vm = bindable.BindingContext as INotifyDataErrorInfo;
28 | if (vm != null)
29 | {
30 | vm.ErrorsChanged -= ModelOnErrorsChanged;
31 | }
32 | bindable.BindingContextChanged -= BindableOnBindingContextChanged;
33 | _element = null;
34 | }
35 |
36 | private void BindableOnBindingContextChanged(object sender, EventArgs eventArgs)
37 | {
38 | var element = (BindableObject)sender;
39 | var vm = element.BindingContext as INotifyDataErrorInfo;
40 | if (vm != null)
41 | {
42 | vm.ErrorsChanged += ModelOnErrorsChanged;
43 | }
44 | }
45 |
46 | private void ModelOnErrorsChanged(object sender, DataErrorsChangedEventArgs args)
47 | {
48 | var model = (INotifyDataErrorInfo)sender;
49 | if(string.IsNullOrWhiteSpace(PropertyName)) throw new ArgumentNullException($"{nameof(PropertyName)} cannot be null");
50 | if (args.PropertyName != PropertyName) return;
51 |
52 | var error = model.GetErrors(args.PropertyName)?.Cast().First();
53 | _element.ErrorText = error;
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls/IXfxValidatableElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx
5 | {
6 | public interface IXfxValidatableElement
7 | {
8 | string ErrorText { get; set; }
9 | event EventHandler ErrorTextChanged;
10 | }
11 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 |
10 | [assembly: InternalsVisibleTo("Xfx.Controls.Droid")]
11 | [assembly: InternalsVisibleTo("Xfx.Controls.iOS")]
--------------------------------------------------------------------------------
/src/Xfx.Controls/Xfx.Controls.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard1.3
5 | Xfx
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Xfx.Controls/XfxBinding.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xfx.Behaviors;
4 |
5 | namespace Xfx
6 | {
7 | public class XfxBinding
8 | {
9 | public static readonly BindableProperty ValidatesOnDataErrorsProperty = BindableProperty.CreateAttached(
10 | "ValidatesOnDataErrors",
11 | typeof(bool),
12 | typeof(XfxEntry),
13 | false, propertyChanged: OnValidatesOnDataErrorsChanged);
14 |
15 | public static bool GetValidatesOnDataErrors(BindableObject view)
16 | {
17 | return (bool)view.GetValue(ValidatesOnDataErrorsProperty);
18 | }
19 |
20 | public static void SetValidatesOnDataErrors(BindableObject view, bool value)
21 | {
22 | view.SetValue(ValidatesOnDataErrorsProperty, value);
23 | }
24 |
25 | private static void OnValidatesOnDataErrorsChanged(BindableObject view, object oldvalue, object newvalue)
26 | {
27 | if (!Convert.ToBoolean(newvalue)||!(view is IXfxValidatableElement)) return;
28 |
29 | var binding = view.GetBinding(Entry.TextProperty);
30 | var boundPropertyName = binding.Path;
31 |
32 | ((VisualElement)view).Behaviors.Add(new ValidatesOnNotifyDataErrors{PropertyName = boundPropertyName});
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls/XfxBindingExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx
5 | {
6 | public static class XfxBindingExtensions
7 | {
8 | public static Binding GetBinding(this BindableObject self, BindableProperty property)
9 | {
10 | var methodInfo = typeof(BindableObject).GetTypeInfo().GetDeclaredMethod("GetContext");
11 | var context = methodInfo?.Invoke(self, new[] {property});
12 |
13 | var propertyInfo = context?.GetType().GetTypeInfo().GetDeclaredField("Binding");
14 | return propertyInfo?.GetValue(context) as Binding;
15 | }
16 |
17 | public static object GetBindingExpression(this Binding self)
18 | {
19 | var fieldInfo = self?.GetType().GetTypeInfo().GetDeclaredField("_expression");
20 | return fieldInfo?.GetValue(self);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls/XfxCardView.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace Xfx
4 | {
5 | public class XfxCardView : ContentView
6 | {
7 | public XfxCardView()
8 | {
9 | BackgroundColor = Color.White;
10 | Padding = 0;
11 | HorizontalOptions=LayoutOptions.Fill;
12 | VerticalOptions=LayoutOptions.Start;
13 | }
14 |
15 | public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius),
16 | typeof(float),
17 | typeof(XfxCardView),
18 | 3.0f);
19 |
20 | public static readonly BindableProperty ElevationProperty = BindableProperty.Create(nameof(Elevation),
21 | typeof(float),
22 | typeof(XfxCardView),
23 | -1f);
24 |
25 | ///
26 | /// Corner Radius. This is a bindable property. Default is 3.0f
27 | ///
28 | public float CornerRadius
29 | {
30 | get => (float)GetValue(CornerRadiusProperty);
31 | set => SetValue(CornerRadiusProperty, value);
32 | }
33 |
34 | ///
35 | /// Distance drop shadow will be from the CardView. This is a bindalbe property. Default is -1f
36 | ///
37 | /// The elevation.
38 | public float Elevation
39 | {
40 | get => (float)GetValue(ElevationProperty);
41 | set => SetValue(ElevationProperty, value);
42 | }
43 |
44 | protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
45 | {
46 | return Content == null ?
47 | new SizeRequest(new Size(100, 100)) :
48 | base.OnMeasure(widthConstraint, heightConstraint);
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls/XfxComboBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Collections.Specialized;
4 | using Xamarin.Forms;
5 |
6 | namespace Xfx
7 | {
8 | public class XfxComboBox : XfxEntry
9 | {
10 | private static readonly Func, ICollection> _defaultSortingAlgorithm = (t, d) => d;
11 |
12 | public static readonly BindableProperty SortingAlgorithmProperty = BindableProperty.Create(nameof(SortingAlgorithm),
13 | typeof(Func, ICollection>),
14 | typeof(XfxComboBox),
15 | _defaultSortingAlgorithm);
16 |
17 | public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create(nameof(ItemsSource),
18 | typeof(IEnumerable),
19 | typeof(XfxComboBox),
20 | default(IEnumerable), propertyChanged: OnItemsSourcePropertyChangedInternal);
21 |
22 | public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create(nameof(SelectedItem),
23 | typeof(object),
24 | typeof(XfxComboBox),
25 | default(object),
26 | BindingMode.OneWayToSource);
27 |
28 | public static readonly BindableProperty ThresholdProperty = BindableProperty.Create(nameof(Threshold),
29 | typeof(int),
30 | typeof(XfxComboBox),
31 | 2);
32 |
33 | public bool OpenOnFocus { get; set; }
34 | public bool ShowIfEmpty { get; set; }
35 |
36 | ///
37 | /// Sorting Algorithm for the drop down list. This is a bindable property.
38 | ///
39 | ///
40 | /// values
42 | /// .Where(t => t.StartsWith(text, StringComparison.CurrentCultureIgnoreCase))
43 | /// .OrderBy(x => x)
44 | /// .ToList();
45 | /// ]]>
46 | ///
47 | public Func, ICollection> SortingAlgorithm
48 | {
49 | get { return (Func, ICollection>)GetValue(SortingAlgorithmProperty); }
50 | set { SetValue(SortingAlgorithmProperty, value); }
51 | }
52 |
53 | ///
54 | /// The number of characters the user must type before the dropdown is shown. This is a bindable property.
55 | ///
56 | public int Threshold
57 | {
58 | get { return (int)GetValue(ThresholdProperty); }
59 | set { SetValue(ThresholdProperty, value); }
60 | }
61 |
62 | ///
63 | /// Item selected from the DropDown List. This is a bindable property.
64 | ///
65 | public object SelectedItem
66 | {
67 | get { return GetValue(SelectedItemProperty); }
68 | set { SetValue(SelectedItemProperty, value); }
69 | }
70 |
71 | ///
72 | /// Drop Down List Items Source. This is a bindable property.
73 | ///
74 | public IEnumerable ItemsSource
75 | {
76 | get { return (IEnumerable)GetValue(ItemsSourceProperty); }
77 | set { SetValue(ItemsSourceProperty, value); }
78 | }
79 |
80 | public event EventHandler ItemSelected;
81 |
82 | internal void OnItemSelectedInternal(object sender, XfxSelectedItemChangedEventArgs args)
83 | {
84 | SelectedItem = args.SelectedItem;
85 | ItemSelected?.Invoke(sender, args);
86 | OnItemSelected(args);
87 | }
88 | private static void OnItemsSourcePropertyChangedInternal(BindableObject bindable, object oldvalue, object newvalue)
89 | {
90 | var combo = (XfxComboBox)bindable;
91 | var observableOld = oldvalue as INotifyCollectionChanged;
92 | var observableNew = newvalue as INotifyCollectionChanged;
93 | combo.OnItemsSourcePropertyChanged(combo, oldvalue, newvalue);
94 |
95 | if (observableOld != null)
96 | {
97 | observableOld.CollectionChanged -= combo.OnCollectionChangedInternal;
98 | }
99 |
100 | if (observableNew != null)
101 | {
102 | observableNew.CollectionChanged += combo.OnCollectionChangedInternal;
103 | }
104 | }
105 |
106 | public event EventHandler CollectionChanged;
107 |
108 | private void OnCollectionChangedInternal(object sender, NotifyCollectionChangedEventArgs args)
109 | {
110 | CollectionChanged?.Invoke(sender, args);
111 | }
112 |
113 | protected virtual void OnItemsSourcePropertyChanged(XfxComboBox bindable, object oldvalue, object newvalue) { }
114 | protected virtual void OnItemSelected(XfxSelectedItemChangedEventArgs args) { }
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/src/Xfx.Controls/XfxEntry.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace Xfx
5 | {
6 | public class XfxEntry : Entry, IXfxValidatableElement
7 | {
8 | public static readonly BindableProperty ErrorTextProperty = BindableProperty.Create(nameof(ErrorText),
9 | typeof(string),
10 | typeof(XfxEntry),
11 | default(string), propertyChanged: OnErrorTextChangedInternal);
12 |
13 | public static readonly BindableProperty ActivePlaceholderColorProperty = BindableProperty.Create(nameof(ActivePlaceholderColor),
14 | typeof(Color),
15 | typeof(XfxEntry),
16 | Color.Accent);
17 |
18 | public static readonly BindableProperty FloatingHintEnabledProperty = BindableProperty.Create(nameof(FloatingHintEnabled),
19 | typeof(bool),
20 | typeof(XfxEntry),
21 | true);
22 |
23 | ///
24 | /// ActivePlaceholderColor summary. This is a bindable property.
25 | ///
26 | public Color ActivePlaceholderColor
27 | {
28 | get => (Color) GetValue(ActivePlaceholderColorProperty);
29 | set => SetValue(ActivePlaceholderColorProperty, value);
30 | }
31 |
32 | ///
33 | /// Gets or Sets whether or not the Error Style is 'Underline' or 'None'
34 | ///
35 | public ErrorDisplay ErrorDisplay { get; set; } = ErrorDisplay.Underline;
36 |
37 | ///
38 | /// true to float the hint into a label, otherwise false. This is a bindable property.
39 | ///
40 | public bool FloatingHintEnabled
41 | {
42 | get => (bool) GetValue(FloatingHintEnabledProperty);
43 | set => SetValue(FloatingHintEnabledProperty, value);
44 | }
45 |
46 | ///
47 | /// Error text for the entry. An empty string removes the error. This is a bindable property.
48 | ///
49 | public string ErrorText
50 | {
51 | get => (string) GetValue(ErrorTextProperty);
52 | set => SetValue(ErrorTextProperty, value);
53 | }
54 |
55 | ///
56 | /// Raised when the value of the error text changes
57 | ///
58 | public event EventHandler ErrorTextChanged;
59 |
60 | protected virtual void OnErrorTextChanged(BindableObject bindable, object oldvalue, object newvalue)
61 | {
62 | }
63 |
64 | private static void OnErrorTextChangedInternal(BindableObject bindable, object oldvalue, object newvalue)
65 | {
66 | var materialEntry = (XfxEntry) bindable;
67 | materialEntry.OnErrorTextChanged(bindable, oldvalue, newvalue);
68 | materialEntry.ErrorTextChanged?.Invoke(materialEntry, new TextChangedEventArgs((string) oldvalue, (string) newvalue));
69 | }
70 | }
71 |
72 | public enum ErrorDisplay
73 | {
74 | Underline,
75 | None
76 | }
77 | }
--------------------------------------------------------------------------------
/src/Xfx.Controls/XfxSelectedItemChangedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace Xfx
4 | {
5 | public class XfxSelectedItemChangedEventArgs : SelectedItemChangedEventArgs
6 | {
7 | public int SelectedItemIndex { get; private set; }
8 |
9 | public XfxSelectedItemChangedEventArgs(object selectedItem, int selectedIndex) : base(selectedItem)
10 | {
11 | SelectedItemIndex = selectedIndex;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tools/Cake/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/.signature.p7s
--------------------------------------------------------------------------------
/tools/Cake/Autofac.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Autofac.dll
--------------------------------------------------------------------------------
/tools/Cake/Cake.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Cake.Common.dll
--------------------------------------------------------------------------------
/tools/Cake/Cake.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Cake.Core.dll
--------------------------------------------------------------------------------
/tools/Cake/Cake.NuGet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Cake.NuGet.dll
--------------------------------------------------------------------------------
/tools/Cake/Cake.NuGet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Cake.NuGet
5 |
6 |
7 |
8 |
9 | The config key name for overriding the default nuget package source
10 |
11 |
12 |
13 |
14 | The config key name for using the in process client for installing packages
15 |
16 |
17 |
18 |
19 | The config key name for enabling loading of nuget package dependencies
20 |
21 |
22 |
23 |
24 | The config key name for overriding the default nuget config file
25 |
26 |
27 |
28 |
29 | Initializes a new instance of the class.
30 |
31 | The file system.
32 | The environment.
33 | The content resolver.
34 | The log.
35 | the configuration
36 |
37 |
38 |
39 | Represents a file locator for NuGet packages that returns relevant
40 | files for the current framework given the resource type.
41 |
42 |
43 |
44 |
45 | Gets the relevant files for a NuGet package
46 | given a path and a resource type.
47 |
48 | The path to search.
49 | The package.
50 | The resource type.
51 | A collection of files.
52 |
53 |
54 |
55 | Represents a NuGet package installer.
56 |
57 |
58 |
59 |
60 | The module responsible for registering
61 | default types in the Cake.NuGet assembly.
62 |
63 |
64 |
65 |
66 | Initializes a new instance of the class.
67 |
68 | The config.
69 |
70 |
71 |
72 | Performs custom registrations in the provided registrar.
73 |
74 | The container registrar.
75 |
76 |
77 |
78 | Installer for NuGet URI resources.
79 |
80 |
81 |
82 |
83 | Initializes a new instance of the class.
84 |
85 | The file system.
86 | The environment.
87 | The process runner.
88 | The NuGet tool resolver.
89 | The content resolver.
90 | The log.
91 | The configuration.
92 |
93 |
94 |
95 | Determines whether this instance can install the specified resource.
96 |
97 | The package reference.
98 | The package type.
99 |
100 | true if this installer can install the
101 | specified resource; otherwise false.
102 |
103 |
104 |
105 |
106 | Installs the specified resource at the given location.
107 |
108 | The package reference.
109 | The package type.
110 | The location where to install the package.
111 | The installed files.
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/tools/Cake/Cake.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Cake.exe
--------------------------------------------------------------------------------
/tools/Cake/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) .NET Foundation and Contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | 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, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/tools/Cake/Microsoft.CodeAnalysis.CSharp.Scripting.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Microsoft.CodeAnalysis.CSharp.Scripting.dll
--------------------------------------------------------------------------------
/tools/Cake/Microsoft.CodeAnalysis.CSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Microsoft.CodeAnalysis.CSharp.dll
--------------------------------------------------------------------------------
/tools/Cake/Microsoft.CodeAnalysis.Scripting.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Microsoft.CodeAnalysis.Scripting.dll
--------------------------------------------------------------------------------
/tools/Cake/Microsoft.CodeAnalysis.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Microsoft.CodeAnalysis.dll
--------------------------------------------------------------------------------
/tools/Cake/Microsoft.Web.XmlTransform.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Microsoft.Web.XmlTransform.dll
--------------------------------------------------------------------------------
/tools/Cake/Microsoft.Win32.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Microsoft.Win32.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Commands.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Commands.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Common.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Configuration.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Credentials.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Credentials.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.DependencyResolver.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.DependencyResolver.Core.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Frameworks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Frameworks.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.LibraryModel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.LibraryModel.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.PackageManagement.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.PackageManagement.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Packaging.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Packaging.Core.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Packaging.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Packaging.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.ProjectModel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.ProjectModel.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Protocol.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Protocol.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Resolver.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Resolver.dll
--------------------------------------------------------------------------------
/tools/Cake/NuGet.Versioning.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/NuGet.Versioning.dll
--------------------------------------------------------------------------------
/tools/Cake/System.AppContext.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.AppContext.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Collections.Concurrent.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Collections.Concurrent.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Collections.Immutable.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Collections.Immutable.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Collections.NonGeneric.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Collections.NonGeneric.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Collections.Specialized.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Collections.Specialized.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Collections.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Collections.dll
--------------------------------------------------------------------------------
/tools/Cake/System.ComponentModel.EventBasedAsync.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.ComponentModel.EventBasedAsync.dll
--------------------------------------------------------------------------------
/tools/Cake/System.ComponentModel.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.ComponentModel.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/System.ComponentModel.TypeConverter.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.ComponentModel.TypeConverter.dll
--------------------------------------------------------------------------------
/tools/Cake/System.ComponentModel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.ComponentModel.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Console.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Console.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Data.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Data.Common.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.Contracts.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.Contracts.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.Debug.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.Debug.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.FileVersionInfo.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.FileVersionInfo.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.Process.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.Process.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.StackTrace.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.StackTrace.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.TextWriterTraceListener.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.TextWriterTraceListener.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.Tools.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.Tools.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.TraceSource.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.TraceSource.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Diagnostics.Tracing.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Diagnostics.Tracing.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Drawing.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Drawing.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Dynamic.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Dynamic.Runtime.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Globalization.Calendars.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Globalization.Calendars.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Globalization.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Globalization.Extensions.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Globalization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Globalization.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.Compression.ZipFile.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.Compression.ZipFile.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.Compression.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.Compression.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.FileSystem.DriveInfo.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.FileSystem.DriveInfo.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.FileSystem.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.FileSystem.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.FileSystem.Watcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.FileSystem.Watcher.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.FileSystem.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.FileSystem.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.IsolatedStorage.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.IsolatedStorage.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.MemoryMappedFiles.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.MemoryMappedFiles.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.Pipes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.Pipes.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.UnmanagedMemoryStream.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.UnmanagedMemoryStream.dll
--------------------------------------------------------------------------------
/tools/Cake/System.IO.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.IO.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Linq.Expressions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Linq.Expressions.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Linq.Parallel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Linq.Parallel.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Linq.Queryable.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Linq.Queryable.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Linq.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Linq.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.Http.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.Http.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.NameResolution.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.NameResolution.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.NetworkInformation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.NetworkInformation.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.Ping.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.Ping.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.Requests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.Requests.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.Security.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.Security.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.Sockets.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.Sockets.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.WebHeaderCollection.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.WebHeaderCollection.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.WebSockets.Client.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.WebSockets.Client.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Net.WebSockets.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Net.WebSockets.dll
--------------------------------------------------------------------------------
/tools/Cake/System.ObjectModel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.ObjectModel.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Reflection.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Reflection.Extensions.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Reflection.Metadata.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Reflection.Metadata.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Reflection.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Reflection.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Reflection.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Reflection.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Resources.Reader.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Resources.Reader.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Resources.ResourceManager.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Resources.ResourceManager.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Resources.Writer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Resources.Writer.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.CompilerServices.VisualC.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.CompilerServices.VisualC.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.Extensions.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.Handles.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.Handles.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.InteropServices.RuntimeInformation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.InteropServices.RuntimeInformation.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.InteropServices.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.InteropServices.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.Numerics.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.Numerics.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.Serialization.Formatters.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.Serialization.Formatters.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.Serialization.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.Serialization.Json.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.Serialization.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.Serialization.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.Serialization.Xml.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.Serialization.Xml.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Runtime.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.Claims.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.Claims.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.Cryptography.Algorithms.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.Cryptography.Algorithms.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.Cryptography.Csp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.Cryptography.Csp.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.Cryptography.Encoding.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.Cryptography.Encoding.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.Cryptography.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.Cryptography.Primitives.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.Cryptography.X509Certificates.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.Cryptography.X509Certificates.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.Principal.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.Principal.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Security.SecureString.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Security.SecureString.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Text.Encoding.CodePages.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Text.Encoding.CodePages.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Text.Encoding.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Text.Encoding.Extensions.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Text.Encoding.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Text.Encoding.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Text.RegularExpressions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Text.RegularExpressions.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.Overlapped.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.Overlapped.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.Tasks.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.Tasks.Extensions.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.Tasks.Parallel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.Tasks.Parallel.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.Tasks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.Tasks.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.Thread.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.Thread.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.ThreadPool.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.ThreadPool.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.Timer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.Timer.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Threading.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Threading.dll
--------------------------------------------------------------------------------
/tools/Cake/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.ValueTuple.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Xml.ReaderWriter.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Xml.ReaderWriter.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Xml.XDocument.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Xml.XDocument.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Xml.XPath.XDocument.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Xml.XPath.XDocument.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Xml.XPath.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Xml.XPath.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Xml.XmlDocument.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Xml.XmlDocument.dll
--------------------------------------------------------------------------------
/tools/Cake/System.Xml.XmlSerializer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/System.Xml.XmlSerializer.dll
--------------------------------------------------------------------------------
/tools/Cake/netstandard.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/Cake/netstandard.dll
--------------------------------------------------------------------------------
/tools/nuget.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XamFormsExtended/Xfx.Controls/d62678df2962e816ce1c73cfdfc4d0578e6b0b32/tools/nuget.exe
--------------------------------------------------------------------------------
/tools/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/tools/packages.config.md5sum:
--------------------------------------------------------------------------------
1 | 626f6f851e8db246184a1e3429f5049f
2 |
--------------------------------------------------------------------------------