├── images ├── phoneshot.jpg ├── propexample.jpg ├── XFGlossIcon512.png ├── XFGlossIcon64.png ├── XFGlossIcon1024.png ├── prop_tint_color.jpg ├── prop_accessory_type.jpg ├── prop_on_tint_color.jpg ├── prop_background_color.jpg ├── prop_thumb_tint_color.jpg ├── prop_background_gradient.jpg ├── prop_thumb_on_tint_color.jpg ├── prop_max_track_tint_color.jpg ├── prop_min_track_tint_color.jpg └── android_api16_switchcompatcell.jpg ├── src ├── XFGlossSample.iOS │ ├── Assets.xcassets │ │ └── Contents.json │ ├── Resources │ │ ├── csharp.png │ │ ├── xfgloss.png │ │ ├── csharp@2x.png │ │ ├── csharp@3x.png │ │ ├── settings.png │ │ ├── xamlcode.png │ │ ├── infocircle.png │ │ ├── settings@2x.png │ │ ├── xamlcode@2x.png │ │ ├── xamlcode@3x.png │ │ ├── xfgloss@2x.png │ │ ├── infocircle@2x.png │ │ ├── infocircle@3x.png │ │ └── Media.xcassets │ │ │ └── AppIcon.appiconset │ │ │ ├── Icon-120.png │ │ │ ├── Icon-152.png │ │ │ ├── Icon-167.png │ │ │ ├── Icon-180.png │ │ │ ├── Icon-20.png │ │ │ ├── Icon-29.png │ │ │ ├── Icon-40.png │ │ │ ├── Icon-58.png │ │ │ ├── Icon-60.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-80.png │ │ │ ├── Icon-87.png │ │ │ ├── Icon-1024.png │ │ │ └── Contents.json │ ├── Entitlements.plist │ ├── packages.config │ ├── Main.cs │ ├── AppDelegate.cs │ ├── LaunchScreen.storyboard │ └── Info.plist ├── XFGlossSample.Droid │ ├── Resources │ │ ├── drawable │ │ │ ├── csharp.png │ │ │ ├── icon.png │ │ │ ├── settings.png │ │ │ ├── xamlcode.png │ │ │ ├── xfgloss.png │ │ │ └── infocircle.png │ │ ├── drawable-hdpi │ │ │ ├── csharp.png │ │ │ ├── icon.png │ │ │ ├── xamlcode.png │ │ │ └── infocircle.png │ │ ├── drawable-xhdpi │ │ │ ├── icon.png │ │ │ ├── csharp.png │ │ │ ├── infocircle.png │ │ │ └── xamlcode.png │ │ ├── drawable-xxhdpi │ │ │ ├── icon.png │ │ │ ├── csharp.png │ │ │ ├── xamlcode.png │ │ │ └── infocircle.png │ │ ├── layout │ │ │ ├── Toolbar.axml │ │ │ └── Tabbar.axml │ │ ├── values │ │ │ └── styles.xml │ │ └── AboutResources.txt │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Assets │ │ └── AboutAssets.txt │ ├── packages.config │ └── MainActivity.cs ├── XFGloss │ ├── Platforms │ │ ├── Android │ │ │ ├── Resources │ │ │ │ ├── values │ │ │ │ │ └── Strings.xml │ │ │ │ └── AboutResources.txt │ │ │ ├── Extensions │ │ │ │ └── XFGlossGradientExtensions.cs │ │ │ └── Renderers │ │ │ │ └── XFGlossSwitchRenderer.cs │ │ └── iOS │ │ │ ├── XFGlossInit.cs │ │ │ ├── Renderers │ │ │ ├── XFGlossSwitchRenderer.cs │ │ │ └── XFGlossSliderRenderer.cs │ │ │ └── Extensions │ │ │ └── XFGlossUISwitchExtensions.cs │ ├── Shared │ │ ├── Attributes │ │ │ └── PreserveAttribute.cs │ │ ├── Models │ │ │ ├── CellGlossAccessoryType.cs │ │ │ └── ObservableObject.cs │ │ ├── Interfaces │ │ │ ├── IGradientRenderer.cs │ │ │ ├── ISwitchGloss.cs │ │ │ └── IXFGlossRenderer.cs │ │ ├── Events │ │ │ └── EventUtilities.cs │ │ └── Gloss │ │ │ └── ContentPageGloss.cs │ └── XFGloss.csproj ├── XFGlossSample │ ├── App.xaml │ ├── XFGlossSample.csproj │ ├── Utils │ │ └── XFGlossDevices.cs │ ├── Examples │ │ ├── Views │ │ │ ├── InfoPage.xaml │ │ │ ├── Xaml │ │ │ │ ├── MinTrackTintColorPage.xaml │ │ │ │ ├── MaxTrackTintColorPage.xaml │ │ │ │ ├── TintColorPage.xaml.cs │ │ │ │ ├── OnTintColorPage.xaml.cs │ │ │ │ ├── AccessoryTypePage.xaml.cs │ │ │ │ ├── MinTrackTintColorPage.xaml.cs │ │ │ │ ├── BackgroundColorPage.xaml.cs │ │ │ │ ├── ThumbTintColorPage.xaml.cs │ │ │ │ ├── MaxTrackTintColorPage.xaml.cs │ │ │ │ ├── ThumbOnTintColorPage.xaml.cs │ │ │ │ ├── AccessoryTypePage.xaml │ │ │ │ ├── BackgroundGradientPage.xaml.cs │ │ │ │ ├── BackgroundColorPage.xaml │ │ │ │ ├── OnTintColorPage.xaml │ │ │ │ ├── ThumbOnTintColorPage.xaml │ │ │ │ ├── ThumbTintColorPage.xaml │ │ │ │ ├── TintColorPage.xaml │ │ │ │ └── BackgroundGradientPage.xaml │ │ │ ├── InfoPage.xaml.cs │ │ │ ├── CSharp │ │ │ │ ├── MaxTrackTintColorPage.cs │ │ │ │ ├── MinTrackTintColorPage.cs │ │ │ │ ├── BackgroundColorPage.cs │ │ │ │ ├── AccessoryTypePage.cs │ │ │ │ ├── OnTintColorPage.cs │ │ │ │ ├── ThumbOnTintColorPage.cs │ │ │ │ ├── ThumbTintColorPage.cs │ │ │ │ ├── TintColorPage.cs │ │ │ │ └── BackgroundGradientPage.cs │ │ │ └── XFGlossSampleViewFactory.cs │ │ └── ViewModels │ │ │ ├── IExamplesViewModel.cs │ │ │ ├── BackgroundColorViewModel.cs │ │ │ ├── OnTintColorViewModel.cs │ │ │ ├── ThumbOnTintColorViewModel.cs │ │ │ ├── ThumbTintColorViewModel.cs │ │ │ ├── MinTrackTintColorViewModel.cs │ │ │ ├── MaxTrackTintColorViewModel.cs │ │ │ ├── BackgroundGradientViewModel.cs │ │ │ ├── AccessoryTypeViewModel.cs │ │ │ └── TintColorViewModel.cs │ ├── PerfTests │ │ ├── Views │ │ │ ├── IPerfTestPage.cs │ │ │ ├── RecycleBackgroundColorPage.xaml.cs │ │ │ ├── RetainBackgroundGradientPage.xaml.cs │ │ │ ├── RetainBackgroundColorPage.xaml.cs │ │ │ ├── RecycleBackgroundGradientPage.xaml.cs │ │ │ ├── RetainBackgroundColorPage.xaml │ │ │ ├── RecycleBackgroundColorPage.xaml │ │ │ ├── RetainBackgroundGradientPage.xaml │ │ │ └── RecycleBackgroundGradientPage.xaml │ │ └── ViewModels │ │ │ └── PerfTestViewModel.cs │ ├── Views │ │ ├── AboutPage.xaml.cs │ │ ├── AboutPage.xaml │ │ ├── AppMenu.xaml │ │ └── AppMenu.xaml.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── App.xaml.cs │ └── ViewModels │ │ └── AppMenuViewModel.cs ├── XFGlossSample.Shared │ ├── XFGlossSample.Shared.projitems │ ├── XFGlossSample.Shared.shproj │ └── AssemblyInfoGlobal.cs ├── XFGloss.sln └── XFGlossSample.sln ├── .gitignore └── LICENSE.MD /images/phoneshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/phoneshot.jpg -------------------------------------------------------------------------------- /images/propexample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/propexample.jpg -------------------------------------------------------------------------------- /images/XFGlossIcon512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/XFGlossIcon512.png -------------------------------------------------------------------------------- /images/XFGlossIcon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/XFGlossIcon64.png -------------------------------------------------------------------------------- /images/XFGlossIcon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/XFGlossIcon1024.png -------------------------------------------------------------------------------- /images/prop_tint_color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_tint_color.jpg -------------------------------------------------------------------------------- /images/prop_accessory_type.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_accessory_type.jpg -------------------------------------------------------------------------------- /images/prop_on_tint_color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_on_tint_color.jpg -------------------------------------------------------------------------------- /images/prop_background_color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_background_color.jpg -------------------------------------------------------------------------------- /images/prop_thumb_tint_color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_thumb_tint_color.jpg -------------------------------------------------------------------------------- /images/prop_background_gradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_background_gradient.jpg -------------------------------------------------------------------------------- /images/prop_thumb_on_tint_color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_thumb_on_tint_color.jpg -------------------------------------------------------------------------------- /images/prop_max_track_tint_color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_max_track_tint_color.jpg -------------------------------------------------------------------------------- /images/prop_min_track_tint_color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/prop_min_track_tint_color.jpg -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /images/android_api16_switchcompatcell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/images/android_api16_switchcompatcell.jpg -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/csharp.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/xfgloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/xfgloss.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/csharp@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/csharp@2x.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/csharp@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/csharp@3x.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/settings.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/xamlcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/xamlcode.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/infocircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/infocircle.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/settings@2x.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/xamlcode@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/xamlcode@2x.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/xamlcode@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/xamlcode@3x.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/xfgloss@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/xfgloss@2x.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/infocircle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/infocircle@2x.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/infocircle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/infocircle@3x.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable/csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable/csharp.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable/settings.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable/xamlcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable/xamlcode.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable/xfgloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable/xfgloss.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-hdpi/csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-hdpi/csharp.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable/infocircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable/infocircle.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-hdpi/xamlcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-hdpi/xamlcode.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xhdpi/csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xhdpi/csharp.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xxhdpi/csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xxhdpi/csharp.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-hdpi/infocircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-hdpi/infocircle.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xhdpi/infocircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xhdpi/infocircle.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xhdpi/xamlcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xhdpi/xamlcode.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xxhdpi/xamlcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xxhdpi/xamlcode.png -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/drawable-xxhdpi/infocircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.Droid/Resources/drawable-xxhdpi/infocircle.png -------------------------------------------------------------------------------- /src/XFGloss/Platforms/Android/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | XFGloss.Droid 4 | 5 | -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-120.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-152.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-167.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-180.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-20.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-58.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-60.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-80.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-87.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tbaggett/xfgloss/HEAD/src/XFGlossSample.iOS/Resources/Media.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/XFGlossSample/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/XFGlossSample/XFGlossSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | false 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/XFGlossSample/Utils/XFGlossDevices.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace XFGlossSample.Utils 4 | { 5 | public static class XFGlossDevices 6 | { 7 | public static T OnPlatform(T iOS, T android) 8 | { 9 | if (Device.RuntimePlatform == Device.iOS) 10 | { 11 | return iOS; 12 | } 13 | else if (Device.RuntimePlatform == Device.Android) 14 | { 15 | return android; 16 | } 17 | 18 | return default(T); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Autosave files 2 | *~ 3 | 4 | #build 5 | [Oo]bj/ 6 | [Bb]in/ 7 | src/packages/ 8 | src/.vs/* 9 | TestResults/ 10 | 11 | # globs 12 | Makefile.in 13 | *.DS_Store 14 | *.sln.cache 15 | *.suo 16 | *.cache 17 | *.pidb 18 | *.userprefs 19 | *.usertasks 20 | config.log 21 | config.make 22 | config.status 23 | aclocal.m4 24 | install-sh 25 | autom4te.cache/ 26 | *.user 27 | *.tar.gz 28 | tarballs/ 29 | test-results/ 30 | Thumbs.db 31 | 32 | #Mac bundle stuff 33 | *.dmg 34 | *.app 35 | 36 | #resharper 37 | *_Resharper.* 38 | *.Resharper 39 | 40 | #dotCover 41 | *.dotCover 42 | -------------------------------------------------------------------------------- /src/XFGlossSample.Shared/XFGlossSample.Shared.projitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | 463e2613-f6da-4823-bdeb-66f9b7c0b2ae 7 | 8 | 9 | XFGlossSample.Shared 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/XFGlossSample.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 your 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 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/InfoPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/MinTrackTintColorPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/MaxTrackTintColorPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/IPerfTestPage.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | using System; 18 | using Xamarin.Forms; 19 | 20 | namespace XFGlossSample.PerfTests.Views 21 | { 22 | // Marker interface to identify perf test pages 23 | public interface IPerfTestPage 24 | { 25 | } 26 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Views/AboutPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Views 23 | { 24 | public partial class AboutPage : ContentPage 25 | { 26 | public AboutPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System.Reflection; 18 | 19 | // Information about this assembly is defined by the following attributes. 20 | // Change them to the values specific to your project. 21 | 22 | [assembly: AssemblyTitle("XFGlossSample")] 23 | [assembly: AssemblyProduct("XFGlossSample")] 24 | -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System.Reflection; 18 | 19 | // Information about this assembly is defined by the following attributes. 20 | // Change them to the values specific to your project. 21 | 22 | [assembly: AssemblyTitle("XFGlossSample.Droid")] 23 | [assembly: AssemblyProduct("XFGlossSample.Droid")] 24 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/TintColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class TintColorPage : ContentPage 25 | { 26 | public TintColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/OnTintColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class OnTintColorPage : ContentPage 25 | { 26 | public OnTintColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/AccessoryTypePage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class AccessoryTypePage : ContentPage 25 | { 26 | public AccessoryTypePage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/MinTrackTintColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class MinTrackTintColorPage : ContentPage 25 | { 26 | public MinTrackTintColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/BackgroundColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class BackgroundColorPage : ContentPage 25 | { 26 | public BackgroundColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/ThumbTintColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class ThumbTintColorPage : ContentPage 25 | { 26 | public ThumbTintColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/MaxTrackTintColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class MaxTrackTintColorPage : ContentPage 25 | { 26 | public MaxTrackTintColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/ThumbOnTintColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.Examples.Views.Xaml 23 | { 24 | public partial class ThumbOnTintColorPage : ContentPage 25 | { 26 | public ThumbOnTintColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RecycleBackgroundColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.PerfTests.Views 23 | { 24 | public partial class RecycleBackgroundColorPage : ContentPage, IPerfTestPage 25 | { 26 | public RecycleBackgroundColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RetainBackgroundGradientPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.PerfTests.Views 23 | { 24 | public partial class RetainBackgroundGradientPage : ContentPage, IPerfTestPage 25 | { 26 | public RetainBackgroundGradientPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RetainBackgroundColorPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.PerfTests.Views 23 | { 24 | public partial class RetainBackgroundColorPage : ContentPage, IPerfTestPage 25 | { 26 | public RetainBackgroundColorPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RecycleBackgroundGradientPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | 22 | namespace XFGlossSample.PerfTests.Views 23 | { 24 | public partial class RecycleBackgroundGradientPage : ContentPage, IPerfTestPage 25 | { 26 | public RecycleBackgroundGradientPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RetainBackgroundColorPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RecycleBackgroundColorPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/XFGlossSample.Shared/XFGlossSample.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 463e2613-f6da-4823-bdeb-66f9b7c0b2ae 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | 21 | using Foundation; 22 | using UIKit; 23 | 24 | namespace XFGlossSample.iOS 25 | { 26 | public class Application 27 | { 28 | // This is the main entry point of the application. 29 | static void Main(string[] args) 30 | { 31 | // if you want to use a different Application Delegate class from "AppDelegate" 32 | // you can specify it here. 33 | UIApplication.Main(args, null, "AppDelegate"); 34 | } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/IExamplesViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using XFGloss; 19 | 20 | namespace XFGlossSample.Examples.ViewModels 21 | { 22 | public interface IExamplesViewModel 23 | { 24 | // The name of the property's type 25 | string PropertyType { get; } 26 | // The property's default value 27 | string PropertyDefault { get; } 28 | // One or more paragraphs of descriptive text 29 | string[] PropertyDescription { get; } 30 | // Comma separated list of classes that the property can be applied to 31 | string TargetClasses { get; } 32 | } 33 | } -------------------------------------------------------------------------------- /src/XFGloss.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2036 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XFGloss", "XFGloss\XFGloss.csproj", "{8C7A76D0-5D59-4C16-AB40-A438CD7386B1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8C7A76D0-5D59-4C16-AB40-A438CD7386B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8C7A76D0-5D59-4C16-AB40-A438CD7386B1}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8C7A76D0-5D59-4C16-AB40-A438CD7386B1}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8C7A76D0-5D59-4C16-AB40-A438CD7386B1}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {61526BAE-509B-41DD-8398-9CB417CCB60E} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /src/XFGlossSample/App.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using Xamarin.Forms; 18 | using Xamarin.Forms.Xaml; 19 | 20 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)] 21 | namespace XFGlossSample 22 | { 23 | public partial class App : Application 24 | { 25 | public App() 26 | { 27 | InitializeComponent(); 28 | 29 | MainPage = new AppMenu(); 30 | } 31 | 32 | protected override void OnStart() 33 | { 34 | // Handle when your app starts 35 | } 36 | 37 | protected override void OnSleep() 38 | { 39 | // Handle when your app sleeps 40 | } 41 | 42 | protected override void OnResume() 43 | { 44 | // Handle when your app resumes 45 | } 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /LICENSE.MD: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2018 Ansuria Solutions LLC & Tommy Baggett: 4 | * http://github.com/tbaggett 5 | * http://twitter.com/tbaggett 6 | * http://tommyb.com 7 | * http://ansuria.com 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in all 17 | copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | 21 | using Foundation; 22 | using UIKit; 23 | 24 | namespace XFGlossSample.iOS 25 | { 26 | [Register("AppDelegate")] 27 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 28 | { 29 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 30 | { 31 | Xamarin.Forms.Forms.Init(); 32 | 33 | /********** ADD THIS CALL TO INITIALIZE XFGloss *********/ 34 | XFGloss.iOS.Library.Init(); 35 | 36 | LoadApplication(new App()); 37 | 38 | return base.FinishedLaunching(app, options); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/XFGloss/Shared/Attributes/PreserveAttribute.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016-2017 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | 18 | namespace XFGloss 19 | { 20 | /// 21 | /// Preserve attribute used to instruct Xamarin linkers to not exclude classes/methods 22 | /// 23 | public sealed class PreserveAttribute : System.Attribute 24 | { 25 | /// 26 | /// Specifies that all members should be preserved when attribute is applied to a class 27 | /// 28 | public bool AllMembers; 29 | /// 30 | /// Specifies that class/method that attribute is applied to should only be preserved if a containing class is preserved. 31 | /// 32 | public bool Conditional; 33 | } 34 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/BackgroundColorViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace XFGlossSample.Examples.ViewModels 18 | { 19 | public class BackgroundColorViewModel : IExamplesViewModel 20 | { 21 | public string PropertyDefault 22 | { 23 | get { return "Color.Default"; } 24 | } 25 | 26 | public string[] PropertyDescription 27 | { 28 | get 29 | { 30 | return new string[] 31 | { 32 | "Specifies a numeric or named XF.Color value to apply as the element's background color.", 33 | }; 34 | } 35 | } 36 | 37 | public string PropertyType 38 | { 39 | get { return "Xamarin.Forms.Color"; } 40 | } 41 | 42 | public string TargetClasses 43 | { 44 | get { return "EntryCell, ImageCell, SwitchCell, TextCell, ViewCell"; } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/OnTintColorViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace XFGlossSample.Examples.ViewModels 18 | { 19 | public class OnTintColorViewModel : IExamplesViewModel 20 | { 21 | public string PropertyDefault 22 | { 23 | get { return "Color.Default"; } 24 | } 25 | 26 | public string[] PropertyDescription 27 | { 28 | get 29 | { 30 | return new string[] 31 | { 32 | "Specifies a numeric or named XF.Color value to apply to the track/border portion of the Switch control when the control is in the \"On\" position.", 33 | }; 34 | } 35 | } 36 | 37 | public string PropertyType 38 | { 39 | get { return "Xamarin.Forms.Color"; } 40 | } 41 | 42 | public string TargetClasses 43 | { 44 | get { return "Switch, SwitchCell"; } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/ThumbOnTintColorViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace XFGlossSample.Examples.ViewModels 18 | { 19 | public class ThumbOnTintColorViewModel : IExamplesViewModel 20 | { 21 | public string PropertyDefault 22 | { 23 | get { return "Color.Default"; } 24 | } 25 | 26 | public string[] PropertyDescription 27 | { 28 | get 29 | { 30 | return new string[] 31 | { 32 | "Specifies a numeric or named XF.Color value to apply to the thumb portion of the Switch control when the control is in the \"On\" position.", 33 | }; 34 | } 35 | } 36 | 37 | public string PropertyType 38 | { 39 | get { return "Xamarin.Forms.Color"; } 40 | } 41 | 42 | public string TargetClasses 43 | { 44 | get { return "Switch, SwitchCell"; } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RetainBackgroundGradientPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/Views/RecycleBackgroundGradientPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/ThumbTintColorViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace XFGlossSample.Examples.ViewModels 18 | { 19 | public class ThumbTintColorViewModel : IExamplesViewModel 20 | { 21 | public string PropertyDefault 22 | { 23 | get { return "Color.Default"; } 24 | } 25 | 26 | public string[] PropertyDescription 27 | { 28 | get 29 | { 30 | return new string[] 31 | { 32 | "Specifies a numeric or named XF.Color value to apply to the thumb portion of the Slider control " + 33 | "as well as the Switch and SwitchCell controls when they are in the \"Off\" position.", 34 | }; 35 | } 36 | } 37 | 38 | public string PropertyType 39 | { 40 | get { return "Xamarin.Forms.Color"; } 41 | } 42 | 43 | public string TargetClasses 44 | { 45 | get { return "Slider, Switch, SwitchCell"; } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/MinTrackTintColorViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace XFGlossSample.Examples.ViewModels 18 | { 19 | public class MinTrackTintColorViewModel : IExamplesViewModel 20 | { 21 | public string PropertyDefault 22 | { 23 | get 24 | { 25 | return "Color.Default"; 26 | } 27 | } 28 | 29 | public string[] PropertyDescription 30 | { 31 | get 32 | { 33 | return new string[] 34 | { 35 | "Specifies a numeric or named XF.Color value to apply to the left side of the Slider control's " + 36 | "track, up to the thumb position.", 37 | }; 38 | } 39 | } 40 | 41 | public string PropertyType 42 | { 43 | get 44 | { 45 | return "Xamarin.Forms.Color"; 46 | } 47 | } 48 | 49 | public string TargetClasses 50 | { 51 | get 52 | { 53 | return "Slider"; 54 | } 55 | } 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/MaxTrackTintColorViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace XFGlossSample.Examples.ViewModels 18 | { 19 | public class MaxTrackTintColorViewModel : IExamplesViewModel 20 | { 21 | public string PropertyDefault 22 | { 23 | get 24 | { 25 | return "Color.Default"; 26 | } 27 | } 28 | 29 | public string[] PropertyDescription 30 | { 31 | get 32 | { 33 | return new string[] 34 | { 35 | "Specifies a numeric or named XF.Color value to apply to the right side of the Slider control's " + 36 | "track, beginning at the thumb position.", 37 | }; 38 | } 39 | } 40 | 41 | public string PropertyType 42 | { 43 | get 44 | { 45 | return "Xamarin.Forms.Color"; 46 | } 47 | } 48 | 49 | public string TargetClasses 50 | { 51 | get 52 | { 53 | return "Slider"; 54 | } 55 | } 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/InfoPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | using Xamarin.Forms; 21 | using XFGlossSample.Examples.ViewModels; 22 | 23 | namespace XFGlossSample.Examples.Views 24 | { 25 | public partial class InfoPage : ContentPage 26 | { 27 | public InfoPage() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | protected override void OnBindingContextChanged() 33 | { 34 | base.OnBindingContextChanged(); 35 | 36 | // Reset/add children to our PropertyDescription stack layout 37 | PropertyDescription.Children.Clear(); 38 | 39 | if (BindingContext is IExamplesViewModel) 40 | { 41 | foreach (string description in (BindingContext as IExamplesViewModel).PropertyDescription) 42 | { 43 | PropertyDescription.Children.Add(new Label() { Text = description }); 44 | } 45 | } 46 | } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/AccessoryTypePage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 16 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/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 | -------------------------------------------------------------------------------- /src/XFGloss/Platforms/iOS/XFGlossInit.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using XFGloss.iOS.Renderers; 19 | 20 | namespace XFGloss.iOS 21 | { 22 | /// 23 | /// Library class used to provide static initializer to be called from XFGloss iOS client projects to insure 24 | /// the XFGloss library is included in the client project's build. 25 | /// 26 | public class Library 27 | { 28 | /// 29 | /// Initializer to be called from XFGloss iOS client project to insure the XFGloss library is inclued in the 30 | /// client project's build. 31 | /// 32 | public static void Init() 33 | { 34 | // Have to instantiate one of the renderers to stop the Xamarin linker removing them 35 | // from release builds 36 | #pragma warning disable CS0219 // Variable is assigned but its value is never used 37 | XFGlossContentPageRenderer r = new XFGlossContentPageRenderer(); 38 | #pragma warning restore CS0219 // Variable is assigned but its value is never used 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/XFGlossSample.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | XFGlossSample 7 | CFBundleName 8 | XFGlossSample 9 | CFBundleIdentifier 10 | com.tommyb.xfglosssample 11 | CFBundleShortVersionString 12 | 1.0 13 | CFBundleVersion 14 | 1.0 15 | LSRequiresIPhoneOS 16 | 17 | MinimumOSVersion 18 | 8.0 19 | UIDeviceFamily 20 | 21 | 1 22 | 2 23 | 24 | UILaunchStoryboardName 25 | LaunchScreen 26 | UIRequiredDeviceCapabilities 27 | 28 | armv7 29 | 30 | UISupportedInterfaceOrientations 31 | 32 | UIInterfaceOrientationPortrait 33 | UIInterfaceOrientationLandscapeLeft 34 | UIInterfaceOrientationLandscapeRight 35 | 36 | UISupportedInterfaceOrientations~ipad 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationPortraitUpsideDown 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | XSAppIconAssets 44 | Resources/Media.xcassets/AppIcon.appiconset 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/BackgroundGradientViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace XFGlossSample.Examples.ViewModels 18 | { 19 | public class BackgroundGradientViewModel : IExamplesViewModel 20 | { 21 | public string PropertyDefault 22 | { 23 | get { return "null"; } 24 | } 25 | 26 | public string[] PropertyDescription 27 | { 28 | get 29 | { 30 | return new string[] 31 | { 32 | "Specifies a multi-color gradient to fill the background of the associated control instance with." + 33 | " You can specify as many colors as you like and control their distribution across the fill at " + 34 | "any angle. Convenience properties and constructors also make it easy to create two-color " + 35 | "horizontal or vertical fills." 36 | }; 37 | } 38 | } 39 | 40 | public string PropertyType 41 | { 42 | get { return "XFGloss.GlossGradient"; } 43 | } 44 | 45 | public string TargetClasses 46 | { 47 | get { return "ContentPage, EntryCell, ImageCell, SwitchCell, TextCell, ViewCell"; } 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/CSharp/MaxTrackTintColorPage.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using Xamarin.Forms; 18 | using XFGloss; 19 | 20 | namespace XFGlossSample.Examples.Views.CSharp 21 | { 22 | public class MaxTrackTintColorPage : ContentPage 23 | { 24 | public MaxTrackTintColorPage() 25 | { 26 | var stack = new StackLayout { Padding = 10 }; 27 | 28 | // Slider demo 29 | 30 | stack.Children.Add(new Label { Text = "Slider MaxTrackTintColor values set in C#:", Margin = new Thickness(10) }); 31 | stack.Children.Add(CreateMaxTrackTintColorSlider(25, Color.Red)); 32 | stack.Children.Add(CreateMaxTrackTintColorSlider(50, Color.Green)); 33 | stack.Children.Add(CreateMaxTrackTintColorSlider(75, Color.Blue)); 34 | 35 | Content = new ScrollView() { Content = stack }; 36 | } 37 | 38 | Slider CreateMaxTrackTintColorSlider(double value, Color colorValue) 39 | { 40 | var slider = new Slider { Minimum = 0, Maximum = 100, Value = value }; 41 | 42 | SliderGloss.SetMaxTrackTintColor(slider, colorValue); 43 | 44 | return slider; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/CSharp/MinTrackTintColorPage.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using Xamarin.Forms; 18 | using XFGloss; 19 | 20 | namespace XFGlossSample.Examples.Views.CSharp 21 | { 22 | public class MinTrackTintColorPage : ContentPage 23 | { 24 | public MinTrackTintColorPage() 25 | { 26 | var stack = new StackLayout { Padding = 10 }; 27 | 28 | // Slider demo 29 | 30 | stack.Children.Add(new Label { Text = "Slider MinTrackTintColor values set in C#:", Margin = new Thickness(10) }); 31 | stack.Children.Add(CreateMinTrackTintColorSlider(25, Color.Red)); 32 | stack.Children.Add(CreateMinTrackTintColorSlider(50, Color.Green)); 33 | stack.Children.Add(CreateMinTrackTintColorSlider(75, Color.Blue)); 34 | 35 | Content = new ScrollView() { Content = stack }; 36 | } 37 | 38 | Slider CreateMinTrackTintColorSlider(double value, Color colorValue) 39 | { 40 | var slider = new Slider { Minimum = 0, Maximum = 100, Value = value }; 41 | 42 | SliderGloss.SetMinTrackTintColor(slider, colorValue); 43 | 44 | return slider; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/XFGlossSample.Shared/AssemblyInfoGlobal.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System.Resources; 18 | using System.Reflection; 19 | 20 | // General Information about an assembly is controlled through the following 21 | // set of attributes. Change these attribute values to modify the information 22 | // associated with an assembly. 23 | [assembly: AssemblyDescription("XFGloss Sample App Component")] 24 | [assembly: AssemblyConfiguration("")] 25 | [assembly: AssemblyCompany("Ansuria Solutions LLC")] 26 | [assembly: AssemblyCopyright("(c) 2016 Ansuria Solutions LLC and Tommy Baggett")] 27 | [assembly: AssemblyTrademark("")] 28 | [assembly: AssemblyCulture("")] 29 | [assembly: NeutralResourcesLanguage("en")] 30 | 31 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 32 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 33 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 34 | 35 | //[assembly: AssemblyVersion("1.0.*")] 36 | [assembly: AssemblyVersion("1.0.0")] 37 | [assembly: AssemblyFileVersion("1.0.0")] 38 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/AccessoryTypeViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using Xamarin.Forms; 19 | using XFGloss; 20 | using XFGlossSample.ViewModels; 21 | 22 | namespace XFGlossSample.Examples.ViewModels 23 | { 24 | public class AccessoryTypeViewModel : IExamplesViewModel 25 | { 26 | public string PropertyDefault 27 | { 28 | get { return "CellGlossAccessoryType.None"; } 29 | } 30 | 31 | public string[] PropertyDescription 32 | { 33 | get 34 | { 35 | return new string[] 36 | { 37 | "Specifies an indicator type to display in the right side of a table or list view cell. See the " + 38 | "CellGlossAccessoryType enumeration for the available types.", 39 | "This property is only implemented on the iOS platform. iOS is the only " + 40 | "platform that natively supports an accessory view." 41 | }; 42 | } 43 | } 44 | 45 | public string PropertyType 46 | { 47 | get { return "CellGlossAccessoryType"; } 48 | } 49 | 50 | public string TargetClasses 51 | { 52 | get { return "EntryCell, ImageCell, TextCell, ViewCell"; } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/XFGlossSample/PerfTests/ViewModels/PerfTestViewModel.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | namespace XFGlossSample.PerfTests.ViewModels 21 | { 22 | public class PerfTestViewModel : List 23 | { 24 | public string Title { get; private set; } 25 | 26 | private PerfTestViewModel(string title) 27 | { 28 | Title = title; 29 | } 30 | 31 | public static IList ListItems { get; private set; } 32 | 33 | static PerfTestViewModel() 34 | { 35 | List listItems = new List(); 36 | for (int section = 0; section < 10; section++) 37 | { 38 | var sectionItem = new PerfTestViewModel($"Section {section}"); 39 | for (int item = 1; item < 10; item++) 40 | { 41 | sectionItem.Add(new SectionItem($"Item {item}")); 42 | } 43 | 44 | listItems.Add(sectionItem); 45 | } 46 | 47 | ListItems = listItems; 48 | } 49 | } 50 | 51 | public class SectionItem 52 | { 53 | public string Title { get; private set; } 54 | 55 | public SectionItem(string title) 56 | { 57 | Title = title; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/XFGlossSample.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.axml), 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/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /src/XFGloss/Platforms/Android/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.axml), 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/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/BackgroundGradientPage.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | using Xamarin.Forms; 19 | 20 | namespace XFGlossSample.Examples.Views.Xaml 21 | { 22 | public partial class BackgroundGradientPage : ContentPage 23 | { 24 | bool updateGradient; 25 | 26 | public BackgroundGradientPage() 27 | { 28 | InitializeComponent(); 29 | } 30 | 31 | protected override void OnAppearing() 32 | { 33 | base.OnAppearing(); 34 | 35 | updateGradient = true; 36 | 37 | Device.StartTimer(new TimeSpan(1000000), UpdateGradient); 38 | } 39 | 40 | protected override void OnDisappearing() 41 | { 42 | base.OnDisappearing(); 43 | 44 | updateGradient = false; 45 | } 46 | 47 | /****************************************** 48 | * 49 | * NOTE: This code is for gradient demonstration purposes only. I do NOT recommend you continuously update 50 | * a gradient fill in a cell or page! 51 | * 52 | ******************************************/ 53 | 54 | bool UpdateGradient() 55 | { 56 | Xamarin.Forms.Device.BeginInvokeOnMainThread(() => 57 | { 58 | if (rotatingGradient.Rotation >= 355) 59 | { 60 | rotatingGradient.Rotation = 0; 61 | } 62 | else 63 | { 64 | rotatingGradient.Rotation += 5; 65 | } 66 | }); 67 | 68 | return updateGradient; 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /src/XFGlossSample.Droid/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/XFGloss/Shared/Models/CellGlossAccessoryType.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using System; 18 | 19 | namespace XFGloss 20 | { 21 | // Supported on iOS only currently 22 | 23 | // 24 | // 25 | // 26 | 27 | /// 28 | /// An enumeration that specifies the accessory view type for a on the iOS 29 | /// platform. The enumeration values are based on the available accessory view types on the iOS platform's 30 | /// class, however the DetailDisclosureButton and DetailButton are disabled 31 | /// until we can access the detail button tapped method in the table view source for both the 32 | /// (currently not possible) and 33 | /// (currently possible) classes. This enumeration is not used on the Android platform. 34 | /// 35 | public enum CellGlossAccessoryType 36 | { 37 | /// 38 | /// Specifies no accessory type should be displayed 39 | /// 40 | None, 41 | /// 42 | /// Specifies the disclosure indicator type should be displayed 43 | /// 44 | DisclosureIndicator, 45 | //DetailDisclosureButton, 46 | /// 47 | /// Specifies the checkmark indicator type should be displayed 48 | /// 49 | Checkmark, 50 | //DetailButton, 51 | /// 52 | /// Specifies the edit indicator type should be displayed 53 | /// 54 | EditIndicator 55 | } 56 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Views/AboutPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/ViewModels/TintColorViewModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | * http://github.com/tbaggett 4 | * http://twitter.com/tbaggett 5 | * http://tommyb.com 6 | * http://ansuria.com 7 | * 8 | * The MIT License (MIT) see GitHub For more information 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | using Xamarin.Forms; 18 | 19 | namespace XFGlossSample.Examples.ViewModels 20 | { 21 | public class TintColorViewModel : IExamplesViewModel 22 | { 23 | public string PropertyDefault 24 | { 25 | get { return "Color.Default"; } 26 | } 27 | 28 | public string[] PropertyDescription 29 | { 30 | get 31 | { 32 | string result; 33 | 34 | if (Device.RuntimePlatform == Device.iOS) 35 | { 36 | result = "Specifies a numeric or named XF.Color value to apply to the cell's accessory view or " + 37 | "the track/border portion of the Switch control when the control is in the \"Off\" " + 38 | "position."; 39 | } 40 | else 41 | { 42 | result = "Specifies a numeric or named XF.Color value to apply to the track/border portion of " + 43 | "the Switch control when the control is in the \"Off\" position."; 44 | } 45 | 46 | return new string[] { result }; 47 | } 48 | } 49 | 50 | public string PropertyType 51 | { 52 | get { return "Xamarin.Forms.Color"; } 53 | } 54 | 55 | public string TargetClasses 56 | { 57 | get 58 | { 59 | if (Device.RuntimePlatform == Device.iOS) 60 | { 61 | return "EntryCell, ImageCell, Switch, SwitchCell, TextCell, ViewCell"; 62 | } 63 | else 64 | { 65 | return "Switch, SwitchCell"; 66 | } 67 | } 68 | } 69 | 70 | public bool isRunningiOS 71 | { 72 | get { return Device.RuntimePlatform == Device.iOS; } 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Examples/Views/Xaml/BackgroundColorPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/XFGloss/Shared/Interfaces/IGradientRenderer.cs: -------------------------------------------------------------------------------- 1 | // /* 2 | // * Copyright (C) 2016 Ansuria Solutions LLC & Tommy Baggett: 3 | // * http://github.com/tbaggett 4 | // * http://twitter.com/tbaggett 5 | // * http://tommyb.com 6 | // * http://ansuria.com 7 | // * 8 | // * The MIT License (MIT) see GitHub For more information 9 | // * 10 | // * Unless required by applicable law or agreed to in writing, software 11 | // * distributed under the License is distributed on an "AS IS" BASIS, 12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // * See the License for the specific language governing permissions and 14 | // * limitations under the License. 15 | // */ 16 | // 17 | 18 | namespace XFGloss 19 | { 20 | /// 21 | /// -based interface that defines methods for updating the 22 | /// class's rotation and steps properties on a platform-specific basis. 23 | /// 24 | public interface IGradientRenderer : IXFGlossRenderer 25 | { 26 | /// 27 | /// Updates the rotation value, an integer number between 0 and 359. The property name specifies the attached 28 | /// bindable property that is being updated, such as the BackgroundGradient property. 29 | /// 30 | /// The name of the attached bindable property that is being updated. 31 | /// The rotation value, an integer number between 0 and 359. 32 | void UpdateRotation(string propertyName, int rotation); 33 | 34 | /// 35 | /// Updates the gradient steps. The property name specifies the attached bindable property that is being 36 | /// updated, such as the BackgroundGradient property. 37 | /// 38 | /// The name of the attached bindable property that is being updated. 39 | /// A of 40 | /// instances that specify the value and fill percentage (a double value 41 | /// between 0, which indicates the beginning of the fill, and 1, which indicates the end of the fill). 42 | void UpdateSteps(string propertyName, GradientStepCollection steps); 43 | } 44 | } -------------------------------------------------------------------------------- /src/XFGlossSample/Views/AppMenu.xaml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 |