├── .gitignore ├── LICENSE ├── NControl.Controls.sln ├── NControl.Controls ├── NControl.Controls.Droid │ ├── BlurImageViewRenderer.cs │ ├── CardPageHelper.cs │ ├── CardPageRenderer.cs │ ├── ExtendedEntryRenderer.cs │ ├── FontAwareButtonRenderer.cs │ ├── FontAwareLabelRenderer.cs │ ├── NControl.Controls.Droid.csproj │ ├── NControls.cs │ ├── Resources │ │ └── values │ │ │ └── styles.xml │ ├── RoundCornerViewRenderer.cs │ └── packages.config ├── NControl.Controls.WP80 │ ├── BlurViewRenderer.cs │ ├── CardPageHelper.cs │ ├── ExtendedEntryRenderer.cs │ ├── FontAwareButtonRenderer.cs │ ├── FontAwareLabelRenderer.cs │ ├── NControl.Controls.WP80.csproj │ ├── NControls.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README_FIRST.txt │ ├── RoundCornerViewRenderer.cs │ ├── Toolkit.Content │ │ ├── ApplicationBar.Add.png │ │ ├── ApplicationBar.Cancel.png │ │ ├── ApplicationBar.Check.png │ │ ├── ApplicationBar.Delete.png │ │ └── ApplicationBar.Select.png │ └── packages.config ├── NControl.Controls.WP81 │ ├── BlurViewRenderer.cs │ ├── CardPageHelper.cs │ ├── ExtendedEntryRenderer.cs │ ├── FontAwareButtonRenderer.cs │ ├── FontAwareLabelRenderer.cs │ ├── NControl.Controls.WP81.csproj │ ├── NControls.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README_FIRST.txt │ ├── RoundCornerViewRenderer.cs │ ├── Toolkit.Content │ │ ├── ApplicationBar.Add.png │ │ ├── ApplicationBar.Cancel.png │ │ ├── ApplicationBar.Check.png │ │ ├── ApplicationBar.Delete.png │ │ └── ApplicationBar.Select.png │ └── packages.config ├── NControl.Controls.iOS │ ├── BlurViewRenderer.cs │ ├── CardPageHelper.cs │ ├── CardPageRenderer.cs │ ├── ExtendedEntryRenderer.cs │ ├── NControl.Controls.iOS.csproj │ ├── NControls.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RoundCornerViewRenderer.cs │ ├── TouchFixedScrollViewRenderer.cs │ └── packages.config ├── NControl.Controls.nuspec └── NControl.Controls │ ├── ActionButton.cs │ ├── BlurImageView.cs │ ├── CalendardView.cs │ ├── CardPage.cs │ ├── ExpandableActionButton.cs │ ├── ExtendedEntry.cs │ ├── FloatingLabelControl.cs │ ├── FontAwesomeLabel.cs │ ├── FontLoader.cs │ ├── FontMaterialDesignLabel.cs │ ├── Fonts │ ├── BaseFont.cs │ ├── OTFFont.cs │ └── TTFFont.cs │ ├── GalleryView.cs │ ├── ICardPageHelper.cs │ ├── MaterialDesignRippleButton.cs │ ├── NControl.Controls.csproj │ ├── NGraphicsExtensions.cs │ ├── PagingView.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── RepeaterControl.cs │ ├── Resources │ └── Fonts │ │ ├── Material-Design-Iconic-Font.ttf │ │ └── fontawesome.ttf │ ├── RippleButton.cs │ ├── RoundCornerView.cs │ ├── SvgImage.cs │ ├── TabStripControl.cs │ ├── ToggleActionButton.cs │ ├── WizardLayout.cs │ └── packages.config ├── NControl.ControlsDemo ├── Droid │ ├── MainActivity.cs │ ├── NControl.Controls.Demo.FormsApp.Droid.csproj │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── drawable-hdpi │ │ │ └── icon.png │ │ ├── drawable-xhdpi │ │ │ └── icon.png │ │ ├── drawable-xxhdpi │ │ │ └── icon.png │ │ ├── drawable │ │ │ └── icon.png │ │ ├── layout │ │ │ ├── tabs.axml │ │ │ └── toolbar.axml │ │ ├── values-v21 │ │ │ └── style.xml │ │ └── values │ │ │ ├── colors.xml │ │ │ └── style.xml │ └── packages.config ├── NControl.Controls.Demo.FormsApp │ ├── ActionButtonPage.cs │ ├── BlurViewPage.cs │ ├── CalendarPage.cs │ ├── CardPageDemo.cs │ ├── CustomFontPage.cs │ ├── FloatingLabelPage.cs │ ├── FontAwesomeLabelPage.cs │ ├── GalleryPage.cs │ ├── MaterialDesignIconsPage.cs │ ├── MyApp.cs │ ├── NControl.Controls.Demo.FormsApp.csproj │ ├── PagingViewPage.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RepeaterPage.cs │ ├── Resources │ │ ├── Fonts │ │ │ ├── ClinkClank.ttf │ │ │ └── NeoTechStd-Regular.otf │ │ ├── Images │ │ │ └── kaffe.jpg │ │ └── Svg │ │ │ ├── Arrows.svg │ │ │ ├── Demo.svg │ │ │ ├── Smile.svg │ │ │ └── SpaceShips.svg │ ├── RippleButtonPage.cs │ ├── RoundCornerViewPage.cs │ ├── SvgImagePage.cs │ ├── TabStripPage.cs │ ├── WizardPage.cs │ ├── WizardPageXaml.xaml │ ├── WizardPageXaml.xaml.cs │ └── packages.config ├── WP80 │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── AlignmentGrid.png │ │ ├── ApplicationIcon.png │ │ └── Tiles │ │ │ ├── FlipCycleTileLarge.png │ │ │ ├── FlipCycleTileMedium.png │ │ │ ├── FlipCycleTileSmall.png │ │ │ ├── IconicTileMediumLarge.png │ │ │ └── IconicTileSmall.png │ ├── LocalizedStrings.cs │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── NControl.Controls.Demo.FormsApp.WP80.csproj │ ├── Properties │ │ ├── AppManifest.xml │ │ ├── AssemblyInfo.cs │ │ └── WMAppManifest.xml │ ├── Resources │ │ ├── AppResources.Designer.cs │ │ └── AppResources.resx │ ├── Toolkit.Content │ │ ├── ApplicationBar.Add.png │ │ ├── ApplicationBar.Cancel.png │ │ ├── ApplicationBar.Check.png │ │ ├── ApplicationBar.Delete.png │ │ └── ApplicationBar.Select.png │ └── packages.config ├── WP81 │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── AlignmentGrid.png │ │ ├── ApplicationIcon.png │ │ ├── BadgeLogo.png │ │ ├── Logo.png │ │ ├── SplashScreen.png │ │ ├── SquareTile150x150.png │ │ ├── SquareTile71x71.png │ │ ├── StoreLogo.png │ │ ├── Tiles │ │ │ ├── FlipCycleTileLarge.png │ │ │ ├── FlipCycleTileMedium.png │ │ │ ├── FlipCycleTileSmall.png │ │ │ ├── IconicTileMediumLarge.png │ │ │ └── IconicTileSmall.png │ │ └── WideLogo.png │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── NControl.Controls.Demo.FormsApp.WP81.csproj │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AppManifest.xml │ │ ├── AssemblyInfo.cs │ │ └── WMAppManifest.xml │ ├── Resources │ │ ├── AppResources.Designer.cs │ │ └── AppResources.resx │ ├── Toolkit.Content │ │ ├── ApplicationBar.Add.png │ │ ├── ApplicationBar.Cancel.png │ │ ├── ApplicationBar.Check.png │ │ ├── ApplicationBar.Delete.png │ │ └── ApplicationBar.Select.png │ └── packages.config └── iOS │ ├── AppDelegate.cs │ ├── Entitlements.plist │ ├── ITunesArtwork │ ├── ITunesArtwork@2x │ ├── Info.plist │ ├── Main.cs │ ├── NControl.Controls.Demo.FormsApp.iOS.csproj │ ├── Resources │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── Icon-60@2x.png │ ├── Icon-60@3x.png │ ├── Icon-76.png │ ├── Icon-76@2x.png │ ├── Icon-Small-40.png │ ├── Icon-Small-40@2x.png │ ├── Icon-Small-40@3x.png │ ├── Icon-Small.png │ ├── Icon-Small@2x.png │ ├── Icon-Small@3x.png │ └── LaunchScreen.storyboard │ └── packages.config └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.pidb 2 | *.userprefs 3 | *.swp 4 | *.DS_Store 5 | *.nib 6 | *.suo 7 | *.user 8 | *.pfx 9 | 10 | */bin/* 11 | */obj/* 12 | */*/bin/* 13 | */*/obj/* 14 | */*/*/bin/* 15 | */*/*/obj/* 16 | *_ReSharper.*/ 17 | packages/ 18 | Components/ 19 | 20 | */*/Resource.designer.cs 21 | */*/*/Resource.designer.cs 22 | */*/*/*/Resource.designer.cs -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Christian Falch 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/BlurImageViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NControl.Controls.Droid; 3 | using NControl.Controls; 4 | using Xamarin.Forms; 5 | using NControl.Droid; 6 | using Xamarin.Forms.Platform.Android; 7 | using Android.Views; 8 | using Android.Graphics.Drawables; 9 | using Android.Graphics; 10 | using Android.Renderscripts; 11 | using Android.Widget; 12 | using Android.Content; 13 | using System.ComponentModel; 14 | using System.Threading.Tasks; 15 | using System.IO; 16 | using System.Threading; 17 | using System.Reflection; 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | 21 | [assembly: ExportRenderer (typeof (BlurImageView), typeof (BlurImageViewRenderer))] 22 | namespace NControl.Controls.Droid 23 | { 24 | /// 25 | /// Blur image view renderer. 26 | /// 27 | public class BlurImageViewRenderer: ImageRenderer 28 | { 29 | /// 30 | /// Raises the element changed event. 31 | /// 32 | /// E. 33 | protected override void OnElementChanged (ElementChangedEventArgs e) 34 | { 35 | base.OnElementChanged (e); 36 | 37 | // Update bitmap 38 | //UpdateBitmap(); 39 | 40 | if (e.OldElement != null) 41 | e.OldElement.MeasureInvalidated -= HandleUpdateBitmap; 42 | 43 | if(e.NewElement != null) 44 | e.NewElement.MeasureInvalidated += HandleUpdateBitmap; 45 | } 46 | 47 | /// 48 | /// Raises the element property changed event. 49 | /// 50 | /// Sender. 51 | /// E. 52 | protected override void OnElementPropertyChanged (object sender, PropertyChangedEventArgs e) 53 | { 54 | base.OnElementPropertyChanged (sender, e); 55 | if (e.PropertyName == Image.SourceProperty.PropertyName) { 56 | // Update bitmap 57 | HandleUpdateBitmap(this, EventArgs.Empty); 58 | return; 59 | } 60 | } 61 | 62 | /// 63 | /// Updates the bitmap. 64 | /// 65 | private void HandleUpdateBitmap(object sender, EventArgs e) 66 | { 67 | if (Control == null) 68 | return; 69 | 70 | // Get bitmap from control 71 | var d = Control.Drawable; 72 | if (d != null) { 73 | if (d is BitmapDrawable) { 74 | var bmp = (d as BitmapDrawable).Bitmap; 75 | if (bmp == null) 76 | return; 77 | 78 | this.Control.SetImageBitmap(CreateBlurredImage(25, bmp)); 79 | this.Control.Invalidate (); 80 | } 81 | } 82 | 83 | } 84 | 85 | /// 86 | /// Creates the blurred image. 87 | /// 88 | /// The blurred image. 89 | /// Radius. 90 | /// Original bitmap. 91 | private Bitmap CreateBlurredImage (int radius, Bitmap originalBitmap) 92 | { 93 | // Create another bitmap that will hold the results of the filter. 94 | Bitmap blurredBitmap; 95 | blurredBitmap = Bitmap.CreateBitmap (originalBitmap); 96 | 97 | // Create the Renderscript instance that will do the work. 98 | var rs = RenderScript.Create (Forms.Context); 99 | 100 | // Allocate memory for Renderscript to work with 101 | var input = Allocation.CreateFromBitmap (rs, originalBitmap, Allocation.MipmapControl.MipmapFull, AllocationUsage.Script); 102 | var output = Allocation.CreateTyped (rs, input.Type); 103 | 104 | // Load up an instance of the specific script that we want to use. 105 | var script = ScriptIntrinsicBlur.Create (rs, Android.Renderscripts.Element.U8_4 (rs)); 106 | script.SetInput (input); 107 | 108 | // Set the blur radius 109 | script.SetRadius (radius); 110 | 111 | // Start the ScriptIntrinisicBlur 112 | script.ForEach (output); 113 | 114 | // Copy the output to the blurred bitmap 115 | output.CopyTo (blurredBitmap); 116 | 117 | return blurredBitmap; 118 | } 119 | } 120 | } 121 | 122 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/CardPageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Linq; 4 | using Xamarin.Forms.Platform.Android; 5 | using Xamarin.Forms; 6 | using NControl.Controls; 7 | using NControl.Controls.Droid; 8 | using System.Threading.Tasks; 9 | using System.Collections.Generic; 10 | using Android.App; 11 | using Android.Views; 12 | using Android.Content; 13 | 14 | [assembly: Xamarin.Forms.Dependency (typeof (CardPageHelper))] 15 | namespace NControl.Controls.Droid 16 | { 17 | /// 18 | /// Card page renderer. 19 | /// 20 | public class CardPageHelper: ICardPageHelper 21 | { 22 | #region ICardPageHelper implementation 23 | 24 | /// 25 | /// Gets the size of the screen. 26 | /// 27 | /// The screen size. 28 | public Size GetScreenSize () 29 | { 30 | var metrics = Forms.Context.Resources.DisplayMetrics; 31 | var widthInDp = ConvertPixelsToDp(metrics.WidthPixels); 32 | var heightInDp = ConvertPixelsToDp(metrics.HeightPixels); 33 | 34 | return new Size (widthInDp, heightInDp); 35 | } 36 | 37 | /// 38 | /// Shows the card async. 39 | /// 40 | /// The async. 41 | /// Page. 42 | public Task ShowAsync (CardPage page) 43 | { 44 | return Xamarin.Forms.Application.Current.MainPage.Navigation.PushModalAsync (page, false); 45 | } 46 | 47 | /// 48 | /// Closes the card async 49 | /// 50 | /// The aync. 51 | /// Page. 52 | public Task CloseAsync (CardPage page) 53 | { 54 | return Xamarin.Forms.Application.Current.MainPage.Navigation.PopModalAsync (false); 55 | } 56 | 57 | /// 58 | /// Gets a value indicating whether this control animates itself. 59 | /// 60 | /// true if control animates itself; otherwise, false. 61 | public bool ControlAnimatesItself { 62 | get { 63 | return true; 64 | } 65 | } 66 | #endregion 67 | 68 | #region Private Members 69 | 70 | /// 71 | /// Converts the pixels to dp. 72 | /// 73 | /// The pixels to dp. 74 | /// Pixel value. 75 | private int ConvertPixelsToDp(float pixelValue) 76 | { 77 | var dp = (int) ((pixelValue)/Forms.Context.Resources.DisplayMetrics.Density); 78 | return dp; 79 | } 80 | 81 | #endregion 82 | } 83 | 84 | /// 85 | /// Droid card page navigation page. 86 | /// 87 | public class DroidCardPageNavigationPage : NavigationPage 88 | { 89 | /// 90 | /// Initializes a new instance of the class. 91 | /// 92 | public DroidCardPageNavigationPage () 93 | { 94 | 95 | } 96 | 97 | /// 98 | /// Initializes a new instance of the class. 99 | /// 100 | /// Root page. 101 | public DroidCardPageNavigationPage (Page rootPage): base(rootPage) 102 | { 103 | 104 | } 105 | } 106 | } 107 | 108 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/CardPageRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.Android; 3 | using Xamarin.Forms; 4 | using NControl.Controls; 5 | using NControl.Controls.Droid; 6 | using Xamarin.Forms.Platform.Android.AppCompat; 7 | using Android.Views; 8 | using System.Threading.Tasks; 9 | 10 | [assembly: ExportRenderer(typeof(CardPage), typeof(CardPageRenderer))] 11 | namespace NControl.Controls.Droid 12 | { 13 | /// 14 | /// Card page renderer. 15 | /// 16 | public class CardPageRenderer: PageRenderer 17 | { 18 | /// 19 | /// Initializes a new instance of the class. 20 | /// 21 | public CardPageRenderer() 22 | { 23 | 24 | } 25 | 26 | /// This is called when the view is attached to a window. 27 | /// 28 | /// Raises the attached to window event. 29 | /// 30 | protected override void OnAttachedToWindow () 31 | { 32 | base.OnAttachedToWindow (); 33 | 34 | Background = null; 35 | SetBackgroundColor (Android.Graphics.Color.Transparent); 36 | 37 | var parent = (Parent as Android.Views.ViewGroup); 38 | if (parent != null) { 39 | for (var i = 0; i < parent.ChildCount; i++) 40 | parent.GetChildAt (i).SetBackgroundColor (Android.Graphics.Color.Transparent); 41 | } 42 | } 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/ExtendedEntryRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.Android; 3 | using NControl.Controls; 4 | using Xamarin.Forms; 5 | using NControl.Controls.Droid; 6 | using Android.Views; 7 | 8 | [assembly: ExportRenderer(typeof(ExtendedEntry), typeof(ExtendedEntryRenderer))] 9 | namespace NControl.Controls.Droid 10 | { 11 | public class ExtendedEntryRenderer: EntryRenderer 12 | { 13 | protected override void OnElementChanged (ElementChangedEventArgs e) 14 | { 15 | base.OnElementChanged (e); 16 | 17 | Control.SetBackgroundColor (Android.Graphics.Color.Transparent); 18 | Control.SetPadding (10, 0, 0, 0); 19 | 20 | UpdateGravity (); 21 | } 22 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e) 23 | { 24 | base.OnElementPropertyChanged (sender, e); 25 | if (e.PropertyName == Entry.HorizontalTextAlignmentProperty.PropertyName) 26 | UpdateGravity (); 27 | else if (e.PropertyName == Entry.FontFamilyProperty.PropertyName) 28 | UpdateFont (); 29 | } 30 | 31 | /// 32 | /// Updates the font. 33 | /// 34 | private void UpdateFont () 35 | { 36 | 37 | } 38 | 39 | /// 40 | /// Updates the text alignment. 41 | /// 42 | private void UpdateGravity () 43 | { 44 | var element = (ExtendedEntry)Element; 45 | 46 | GravityFlags gravityFlags = GravityFlags.AxisSpecified; 47 | if (element.HorizontalTextAlignment == Xamarin.Forms.TextAlignment.Start) { 48 | gravityFlags = GravityFlags.Left; 49 | } 50 | else { 51 | if (element.HorizontalTextAlignment == Xamarin.Forms.TextAlignment.End) { 52 | gravityFlags = GravityFlags.Right; 53 | } 54 | } 55 | 56 | Control.Gravity = (gravityFlags); 57 | } 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/FontAwareButtonRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.Android; 3 | using Xamarin.Forms; 4 | using NControl.Controls; 5 | using NControl.Controls.Droid; 6 | using Android.Graphics; 7 | using System.IO; 8 | 9 | [assembly: ExportRenderer (typeof (Button), typeof (FontAwareButtonRenderer))] 10 | namespace NControl.Controls.Droid 11 | { 12 | /// 13 | /// Custom font label renderer. 14 | /// 15 | public class FontAwareButtonRenderer: ButtonRenderer 16 | { 17 | /// 18 | /// Raises the element changed event. 19 | /// 20 | /// E. 21 | protected override void OnElementChanged (ElementChangedEventArgs e) 22 | { 23 | base.OnElementChanged (e); 24 | 25 | if (e.NewElement != null) 26 | UpdateFont(); 27 | 28 | if (Control != null) { 29 | Control.SetPadding (0, 0, 0, 0); 30 | } 31 | } 32 | 33 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e) 34 | { 35 | base.OnElementPropertyChanged (sender, e); 36 | 37 | if(e.PropertyName == Button.FontFamilyProperty.PropertyName || 38 | e.PropertyName == Button.FontSizeProperty.PropertyName || 39 | e.PropertyName == Button.FontAttributesProperty.PropertyName || 40 | e.PropertyName == Button.TextProperty.PropertyName) 41 | UpdateFont(); 42 | } 43 | 44 | private void UpdateFont() 45 | { 46 | var fontName = Element.FontFamily; 47 | if (string.IsNullOrWhiteSpace (fontName)) 48 | return; 49 | 50 | fontName = fontName.ToLowerInvariant (); 51 | if(NControls.Typefaces.ContainsKey(fontName)) 52 | Control.SetTypeface(NControls.Typefaces[fontName], TypefaceStyle.Normal); 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/FontAwareLabelRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.Android; 3 | using Xamarin.Forms; 4 | using NControl.Controls; 5 | using NControl.Controls.Droid; 6 | using Android.Graphics; 7 | using System.IO; 8 | 9 | [assembly: ExportRenderer (typeof (Label), typeof (FontAwareLabelRenderer))] 10 | namespace NControl.Controls.Droid 11 | { 12 | /// 13 | /// Custom font label renderer. 14 | /// 15 | public class FontAwareLabelRenderer: LabelRenderer 16 | { 17 | /// 18 | /// Raises the element changed event. 19 | /// 20 | /// E. 21 | protected override void OnElementChanged (ElementChangedEventArgs e) 22 | { 23 | base.OnElementChanged (e); 24 | 25 | if (e.NewElement != null) 26 | UpdateFont(); 27 | } 28 | 29 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e) 30 | { 31 | base.OnElementPropertyChanged (sender, e); 32 | 33 | if(e.PropertyName == Label.FontFamilyProperty.PropertyName || 34 | e.PropertyName == Label.FontSizeProperty.PropertyName || 35 | e.PropertyName == Label.FontAttributesProperty.PropertyName || 36 | e.PropertyName == Label.TextProperty.PropertyName) 37 | UpdateFont(); 38 | } 39 | 40 | private void UpdateFont() 41 | { 42 | var fontName = Element.FontFamily; 43 | if (string.IsNullOrWhiteSpace (fontName)) 44 | return; 45 | 46 | fontName = fontName.ToLowerInvariant (); 47 | if(NControls.Typefaces.ContainsKey(fontName)) 48 | Control.SetTypeface(NControls.Typefaces[fontName], TypefaceStyle.Normal); 49 | } 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/NControls.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Collections.Generic; 4 | using Android.Graphics; 5 | 6 | namespace NControl.Controls.Droid 7 | { 8 | /// 9 | /// NControls. 10 | /// 11 | public static class NControls 12 | { 13 | /// 14 | /// The typefaces. 15 | /// 16 | public static readonly Dictionary Typefaces = new Dictionary(); 17 | 18 | /// 19 | /// Init this instance 20 | /// 21 | public static void Init() 22 | { 23 | NControl.Controls.FontLoader.LoadFonts (AppDomain.CurrentDomain.GetAssemblies(), (fontName, s) => { 24 | 25 | fontName = fontName.ToLowerInvariant(); 26 | 27 | // Copy stream 28 | var fontFilename = System.IO.Path.Combine (System.Environment.GetFolderPath ( 29 | Environment.SpecialFolder.Personal), fontName); 30 | 31 | if (!File.Exists (fontFilename)) 32 | { 33 | using (var fs = new FileStream (fontFilename, FileMode.CreateNew)) 34 | { 35 | s.CopyTo(fs); 36 | } 37 | } 38 | 39 | Typefaces[fontName] = Typeface.CreateFromFile(fontFilename); 40 | }); 41 | } 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.Droid/RoundCornerViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using NControl.Controls; 4 | using NControl.Controls.Droid; 5 | using Xamarin.Forms.Platform.Android; 6 | using Android.Graphics; 7 | using NControl.Droid; 8 | 9 | [assembly: ExportRenderer (typeof (RoundCornerView), typeof (RoundCornerViewRenderer))] 10 | namespace NControl.Controls.Droid 11 | { 12 | public class RoundCornerViewRenderer: NControlViewRenderer 13 | { 14 | /// 15 | /// Raises the element property changed event. 16 | /// 17 | /// Sender. 18 | /// E. 19 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e) 20 | { 21 | base.OnElementPropertyChanged (sender, e); 22 | 23 | if (e.PropertyName == RoundCornerView.BackgroundColorProperty.PropertyName || 24 | e.PropertyName == RoundCornerView.BorderColorProperty.PropertyName || 25 | e.PropertyName == RoundCornerView.CornerRadiusProperty.PropertyName || 26 | e.PropertyName == RoundCornerView.BorderWidthProperty.PropertyName) 27 | Invalidate (); 28 | } 29 | 30 | /// The Canvas to which the View is rendered. 31 | /// 32 | /// Draw the specified canvas. 33 | /// 34 | /// Canvas. 35 | public override void Draw (Canvas canvas) 36 | { 37 | try 38 | { 39 | var element = Element as RoundCornerView; 40 | var cornerRadius = (float)element.CornerRadius*Resources.DisplayMetrics.Density; 41 | 42 | // Paint rounded rect itself 43 | canvas.Save(); 44 | var paint = new Paint(); 45 | paint.AntiAlias = true; 46 | var strokeWidth = (((float)element.BorderWidth)*Resources.DisplayMetrics.Density); 47 | paint.StrokeWidth = strokeWidth; 48 | 49 | if(element.BackgroundColor != Xamarin.Forms.Color.Transparent) 50 | { 51 | paint.SetStyle(Paint.Style.Fill); 52 | paint.Color = element.BackgroundColor.ToAndroid(); 53 | canvas.DrawRoundRect(new RectF(0, 0, Width, Height), cornerRadius, cornerRadius, paint); 54 | } 55 | 56 | if(element.BorderColor != Xamarin.Forms.Color.Transparent) 57 | { 58 | paint.SetStyle(Paint.Style.Stroke); 59 | paint.Color = element.BorderColor.ToAndroid(); 60 | canvas.DrawRoundRect(new RectF(0, 0, Width, Height), cornerRadius, cornerRadius, paint); 61 | } 62 | 63 | //Properly dispose 64 | paint.Dispose(); 65 | canvas.Restore(); 66 | 67 | // Create clip path 68 | var path = new Path(); 69 | path.AddRoundRect(new RectF(0.0f + (strokeWidth/2), 0.0f + (strokeWidth/2), 70 | Width - (strokeWidth/2), Height - (strokeWidth/2)), cornerRadius, cornerRadius, Path.Direction.Cw); 71 | 72 | canvas.Save(); 73 | canvas.ClipPath(path); 74 | 75 | // Do base drawing 76 | for(var i=0; i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/CardPageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Controls.Primitives; 9 | using System.Windows.Media; 10 | using System.Windows.Shapes; 11 | using Microsoft.Phone.Controls; 12 | using NControl.Controls.WP80; 13 | using NGraphics; 14 | using Xamarin.Forms; 15 | using Xamarin.Forms.Platform.WinPhone; 16 | using Application = System.Windows.Application; 17 | using Colors = System.Windows.Media.Colors; 18 | using Grid = System.Windows.Controls.Grid; 19 | using Rectangle = System.Windows.Shapes.Rectangle; 20 | using Coding4Fun.Toolkit.Controls; 21 | using NControl.Win; 22 | 23 | [assembly: Dependency(typeof(CardPageHelper))] 24 | namespace NControl.Controls.WP80 25 | { 26 | /// 27 | /// CardPage helper implementation 28 | /// 29 | public class CardPageHelper : ICardPageHelper, IPopupInformationProvider 30 | { 31 | /// 32 | /// List of presented wrappers 33 | /// 34 | private static Stack _presentationContext = new Stack(); 35 | 36 | /// 37 | /// Returns the screen size 38 | /// 39 | /// 40 | public Xamarin.Forms.Size GetScreenSize() 41 | { 42 | return new Xamarin.Forms.Size(Application.Current.Host.Content.ActualWidth, 43 | Application.Current.Host.Content.ActualHeight); 44 | } 45 | 46 | public Task ShowAsync(CardPage card) 47 | { 48 | var cardPageWrapper = new CardPageWrapperPopup(card) 49 | { 50 | Title = card.Title, 51 | }; 52 | 53 | _presentationContext.Push(cardPageWrapper); 54 | cardPageWrapper.Show(); 55 | 56 | return Task.FromResult(true); 57 | } 58 | 59 | /// 60 | /// Hides the async. 61 | /// 62 | /// The async. 63 | /// Card. 64 | public Task CloseAsync(CardPage card) 65 | { 66 | var currentCardPageWrapper = _presentationContext.Pop(); 67 | currentCardPageWrapper.Hide(); 68 | return Task.FromResult(true); 69 | } 70 | 71 | public FrameworkElement GetPopupParent() 72 | { 73 | if (!_presentationContext.Any()) 74 | return null; 75 | 76 | return _presentationContext.Peek().GetVisualParent(); 77 | } 78 | 79 | public bool ControlAnimatesItself 80 | { 81 | get { return false; } 82 | } 83 | } 84 | 85 | /// 86 | /// Class for wrapping xamarin forms page in a popup on Windows Phone 87 | /// 88 | public class CardPageWrapperPopup : MessagePrompt 89 | { 90 | private CardPage _card; 91 | 92 | public CardPageWrapperPopup(CardPage card) 93 | { 94 | _card = card; 95 | 96 | // Remove the standard circular button 97 | ActionPopUpButtons.RemoveAll(new Predicate( 98 | delegate (System.Windows.Controls.Button arg) { return true; })); 99 | 100 | // Do any further initialization. e.g. loading some elements into the popup 101 | // This is our great hack. Without having the Platform property set, sizing isnt working 102 | // See the VisualElement.OnSizeRequest method. 103 | var pi = _card.GetType().GetProperty("Platform", System.Reflection.BindingFlags.Public | 104 | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); 105 | 106 | var val = pi.GetValue(Xamarin.Forms.Application.Current.MainPage); 107 | pi.SetValue(_card, val); 108 | 109 | // Set renderer 110 | if (Xamarin.Forms.Platform.WinPhone.Platform.GetRenderer(_card) == null) 111 | Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(_card); 112 | 113 | // Layout 114 | _card.Layout(new Xamarin.Forms.Rectangle(0.0, 0.0, Application.Current.Host.Content.ActualWidth - 45, 115 | _card.RequestedHeight)); 116 | 117 | var el = (UIElement)Xamarin.Forms.Platform.WinPhone.Platform.GetRenderer(_card); 118 | 119 | this.Body = new Border 120 | { 121 | Width = Application.Current.Host.Content.ActualWidth - 45, 122 | Height = _card.RequestedHeight, 123 | Background = new SolidColorBrush(Colors.Blue), 124 | Child = el 125 | }; 126 | } 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/ExtendedEntryRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | using System.Windows.Media; 7 | using Microsoft.Phone.Controls; 8 | using NGraphics; 9 | using Xamarin.Forms.Platform.WinPhone; 10 | using NControl.Controls; 11 | using Xamarin.Forms; 12 | using NControl.Controls.WP80; 13 | using Application = System.Windows.Application; 14 | using Color = System.Windows.Media.Color; 15 | using Colors = System.Windows.Media.Colors; 16 | using Grid = System.Windows.Controls.Grid; 17 | using Setter = System.Windows.Setter; 18 | using Style = System.Windows.Style; 19 | using Thickness = System.Windows.Thickness; 20 | 21 | [assembly: ExportRenderer(typeof(ExtendedEntry), typeof(ExtendedEntryRenderer))] 22 | 23 | namespace NControl.Controls.WP80 24 | { 25 | public class ExtendedEntryRenderer : EntryRenderer 26 | { 27 | protected override void OnElementChanged(ElementChangedEventArgs e) 28 | { 29 | base.OnElementChanged(e); 30 | 31 | if (e.NewElement == null) 32 | return; 33 | 34 | var textBox = (FormsPhoneTextBox)Control; 35 | 36 | var foregroundColor = Colors.Black; 37 | var hintColor = Colors.DarkGray; 38 | 39 | var darkBackgroundVisibility = (Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"]; 40 | if (darkBackgroundVisibility == Visibility.Visible) 41 | { 42 | foregroundColor = Colors.White; 43 | hintColor = Colors.DarkGray; 44 | } 45 | 46 | // remove borders and backgrounds in regular mode 47 | textBox.BorderThickness = new Thickness(0); 48 | textBox.BorderBrush = new SolidColorBrush(Colors.Transparent); 49 | textBox.Background = new SolidColorBrush(Colors.Transparent); 50 | 51 | // Foregrounds 52 | textBox.Foreground = new SolidColorBrush(foregroundColor); 53 | textBox.SelectionForeground = new SolidColorBrush(foregroundColor); 54 | 55 | // Focus handling 56 | textBox.GotFocus += (sender, evt) => 57 | { 58 | textBox.Background = new SolidColorBrush(Colors.Transparent); 59 | textBox.CaretBrush = new SolidColorBrush(foregroundColor); 60 | 61 | textBox.ActualHintVisibility = string.IsNullOrWhiteSpace(textBox.Text) 62 | ? Visibility.Visible 63 | : Visibility.Collapsed; 64 | }; 65 | 66 | textBox.TextChanged += (sender, evt) => 67 | { 68 | textBox.ActualHintVisibility = string.IsNullOrWhiteSpace(textBox.Text) 69 | ? Visibility.Visible 70 | : Visibility.Collapsed; 71 | }; 72 | 73 | // Update hint 74 | var style = new Style { TargetType = typeof(ContentControl) }; 75 | style.Setters.Add(new Setter(System.Windows.Controls.Control.ForegroundProperty, new SolidColorBrush(hintColor))); 76 | textBox.HintStyle = style; 77 | } 78 | } 79 | } 80 | 81 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/FontAwareButtonRenderer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using NControl.Controls.WP80; 3 | using Xamarin.Forms; 4 | using Xamarin.Forms.Platform.WinPhone; 5 | 6 | [assembly: ExportRenderer(typeof(Button), typeof(FontAwareButtonRenderer))] 7 | namespace NControl.Controls.WP80 8 | { 9 | /// 10 | /// Custom font label renderer. 11 | /// 12 | public class FontAwareButtonRenderer : ButtonRenderer 13 | { 14 | /// 15 | /// Raises the element changed event. 16 | /// 17 | /// E. 18 | protected override void OnElementChanged(ElementChangedEventArgs e) 19 | { 20 | base.OnElementChanged(e); 21 | 22 | if (e.NewElement != null) 23 | UpdateFont(); 24 | } 25 | 26 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 27 | { 28 | base.OnElementPropertyChanged(sender, e); 29 | 30 | if (e.PropertyName == Label.FontFamilyProperty.PropertyName) 31 | UpdateFont(); 32 | } 33 | 34 | private void UpdateFont() 35 | { 36 | var fontName = Element.FontFamily; 37 | if (string.IsNullOrWhiteSpace(fontName)) 38 | return; 39 | 40 | fontName = fontName.ToLowerInvariant(); 41 | // TODO: Fix 42 | //if (NControls.Typefaces.ContainsKey(fontName)) 43 | // Control.ApplyFont(NControls.Typefaces[fontName]); 44 | } 45 | 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/FontAwareLabelRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using NControl.Controls.WP80; 4 | using Xamarin.Forms; 5 | using Xamarin.Forms.Platform.WinPhone; 6 | 7 | [assembly: ExportRenderer(typeof(Label), typeof(FontAwareLabelRenderer))] 8 | namespace NControl.Controls.WP80 9 | { 10 | /// 11 | /// Custom font label renderer. 12 | /// 13 | public class FontAwareLabelRenderer : LabelRenderer 14 | { 15 | /// 16 | /// Raises the element changed event. 17 | /// 18 | /// E. 19 | protected override void OnElementChanged(ElementChangedEventArgs e) 20 | { 21 | base.OnElementChanged(e); 22 | 23 | if (e.NewElement != null) 24 | UpdateFont(); 25 | } 26 | 27 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 28 | { 29 | base.OnElementPropertyChanged(sender, e); 30 | 31 | if (e.PropertyName == Label.FontFamilyProperty.PropertyName) 32 | UpdateFont(); 33 | } 34 | 35 | private void UpdateFont() 36 | { 37 | var fontName = Element.FontFamily; 38 | if (string.IsNullOrWhiteSpace(fontName)) 39 | return; 40 | 41 | fontName = fontName.ToLowerInvariant(); 42 | if (NControls.Typefaces.ContainsKey(fontName)) 43 | Control.FontSource = NControls.Typefaces[fontName]; 44 | } 45 | 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/NControls.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Windows.Documents; 5 | 6 | namespace NControl.Controls.WP80 7 | { 8 | /// 9 | /// NControls. 10 | /// 11 | public static class NControls 12 | { 13 | /// 14 | /// The typefaces. 15 | /// 16 | public static readonly Dictionary Typefaces = new Dictionary(); 17 | 18 | /// 19 | /// Init this instance to 20 | /// 21 | public static void Init() 22 | { 23 | var assemblies = AppDomain.CurrentDomain.GetAssemblies(); 24 | FontLoader.LoadFonts(assemblies, (fontName, s) => 25 | { 26 | fontName = fontName.ToLowerInvariant(); 27 | var copyStream = new MemoryStream(); 28 | s.CopyTo(copyStream); 29 | Typefaces[fontName] = new FontSource(copyStream); 30 | }); 31 | } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Resources; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("NControl.Controls.WP80")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("NControl.Controls.WP80")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | [assembly: Guid("74169b27-d403-4cc6-a143-b6daf7bcf36c")] 25 | 26 | // Version information for an assembly consists of the following four values: 27 | // 28 | // Major Version 29 | // Minor Version 30 | // Build Number 31 | // Revision 32 | // 33 | // You can specify all the values or you can default the Revision and Build Numbers 34 | // by using the '*' as shown below: 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | [assembly: NeutralResourcesLanguageAttribute("en-US")] 38 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/README_FIRST.txt: -------------------------------------------------------------------------------- 1 | For the Windows Phone toolkit make sure that you have 2 | marked the icons in the "Toolkit.Content" folder as content. That way they 3 | can be used as the icons for the ApplicationBar control. -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/RoundCornerViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Media; 8 | using NControl.Abstractions; 9 | using NControl.Controls; 10 | using NControl.Controls.WP80; 11 | using NControl.WP80; 12 | using Xamarin.Forms; 13 | using Xamarin.Forms.Platform.WinPhone; 14 | 15 | [assembly: ExportRenderer(typeof(RoundCornerView), typeof(RoundCornerViewRenderer))] 16 | namespace NControl.Controls.WP80 17 | { 18 | public class RoundCornerViewRenderer : NControlViewRenderer 19 | { 20 | protected override void OnElementChanged(ElementChangedEventArgs e) 21 | { 22 | base.OnElementChanged(e); 23 | 24 | if (e.NewElement != null) 25 | { 26 | var element = (e.NewElement as RoundCornerView); 27 | UpdateElement(element); 28 | } 29 | } 30 | 31 | /// 32 | /// Raises the element property changed event. 33 | /// 34 | /// Sender. 35 | /// E. 36 | protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) 37 | { 38 | base.OnElementPropertyChanged(sender, e); 39 | 40 | if (e.PropertyName == RoundCornerView.BackgroundColorProperty.PropertyName || 41 | e.PropertyName == RoundCornerView.BorderColorProperty.PropertyName || 42 | e.PropertyName == RoundCornerView.CornerRadiusProperty.PropertyName || 43 | e.PropertyName == RoundCornerView.BorderWidthProperty.PropertyName) 44 | UpdateElement(Element as RoundCornerView); 45 | } 46 | 47 | /// 48 | /// Updates the clip rectangle 49 | /// 50 | protected override void UpdateClip() 51 | { 52 | base.UpdateClip(); 53 | 54 | if (Control.ActualWidth == 0 || Control.ActualHeight == 0) 55 | return; 56 | 57 | if (Element.IsClippedToBounds) 58 | { 59 | var width = Control.ActualWidth - ((Element as RoundCornerView).BorderWidth * 4); 60 | var height = Control.ActualHeight - ((Element as RoundCornerView).BorderWidth * 4); 61 | if (width > 0 && height > 0) { 62 | 63 | Clip = new RectangleGeometry 64 | { 65 | Rect = new Rect(0, 0, Control.ActualWidth, Control.ActualHeight), 66 | RadiusX = (Element as RoundCornerView).CornerRadius, 67 | RadiusY = (Element as RoundCornerView).CornerRadius, 68 | 69 | }; 70 | 71 | if (Control.Child != null) 72 | { 73 | var el = Element as RoundCornerView; 74 | 75 | Control.Child.Clip = new RectangleGeometry 76 | { 77 | Rect = new Rect((Element as RoundCornerView).BorderWidth, 78 | (Element as RoundCornerView).BorderWidth, width, height), 79 | RadiusX = (Element as RoundCornerView).CornerRadius, 80 | RadiusY = (Element as RoundCornerView).CornerRadius, 81 | }; 82 | } 83 | } 84 | } 85 | else 86 | { 87 | if (Control.Child != null) 88 | Control.Child.Clip = null; 89 | 90 | Clip = null; 91 | } 92 | } 93 | 94 | /// 95 | /// Updates the element. 96 | /// 97 | /// Element. 98 | private void UpdateElement(RoundCornerView element) 99 | { 100 | var colorConverter = new ColorConverter(); 101 | 102 | Control.Background = (Brush)colorConverter.Convert(element.BackgroundColor, null, null, null); 103 | Control.BorderBrush = (Brush)colorConverter.Convert(element.BorderColor, null, null, null); 104 | Control.BorderThickness = new System.Windows.Thickness(element.BorderWidth); 105 | Control.CornerRadius = new CornerRadius(element.CornerRadius); 106 | 107 | UpdateClip(); 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Add.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Cancel.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Check.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Delete.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP80/Toolkit.Content/ApplicationBar.Select.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP80/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/ExtendedEntryRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | using System.Windows.Media; 7 | using Microsoft.Phone.Controls; 8 | using NGraphics; 9 | using Xamarin.Forms.Platform.WinPhone; 10 | using NControl.Controls; 11 | using Xamarin.Forms; 12 | using NControl.Controls.WP81; 13 | using Application = System.Windows.Application; 14 | using Color = System.Windows.Media.Color; 15 | using Colors = System.Windows.Media.Colors; 16 | using Grid = System.Windows.Controls.Grid; 17 | using Setter = System.Windows.Setter; 18 | using Style = System.Windows.Style; 19 | using Thickness = System.Windows.Thickness; 20 | 21 | [assembly: ExportRenderer(typeof(ExtendedEntry), typeof(ExtendedEntryRenderer))] 22 | 23 | namespace NControl.Controls.WP81 24 | { 25 | public class ExtendedEntryRenderer : EntryRenderer 26 | { 27 | protected override void OnElementChanged(ElementChangedEventArgs e) 28 | { 29 | base.OnElementChanged(e); 30 | 31 | if (e.NewElement == null) 32 | return; 33 | 34 | var textBox = (FormsPhoneTextBox)Control; 35 | 36 | var foregroundColor = Colors.Black; 37 | var hintColor = Colors.DarkGray; 38 | 39 | var darkBackgroundVisibility = (Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"]; 40 | if (darkBackgroundVisibility == Visibility.Visible) 41 | { 42 | foregroundColor = Colors.White; 43 | hintColor = Colors.DarkGray; 44 | } 45 | 46 | // remove borders and backgrounds in regular mode 47 | textBox.BorderThickness = new Thickness(0); 48 | textBox.BorderBrush = new SolidColorBrush(Colors.Transparent); 49 | textBox.Background = new SolidColorBrush(Colors.Transparent); 50 | 51 | // Foregrounds 52 | textBox.Foreground = new SolidColorBrush(foregroundColor); 53 | textBox.SelectionForeground = new SolidColorBrush(foregroundColor); 54 | 55 | // Focus handling 56 | textBox.GotFocus += (sender, evt) => 57 | { 58 | textBox.Background = new SolidColorBrush(Colors.Transparent); 59 | textBox.CaretBrush = new SolidColorBrush(foregroundColor); 60 | 61 | textBox.ActualHintVisibility = string.IsNullOrWhiteSpace(textBox.Text) 62 | ? Visibility.Visible 63 | : Visibility.Collapsed; 64 | }; 65 | 66 | textBox.TextChanged += (sender, evt) => 67 | { 68 | textBox.ActualHintVisibility = string.IsNullOrWhiteSpace(textBox.Text) 69 | ? Visibility.Visible 70 | : Visibility.Collapsed; 71 | }; 72 | 73 | // Update hint 74 | var style = new Style {TargetType = typeof (ContentControl)}; 75 | style.Setters.Add(new Setter(System.Windows.Controls.Control.ForegroundProperty, new SolidColorBrush(hintColor))); 76 | textBox.HintStyle = style; 77 | } 78 | } 79 | } 80 | 81 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/FontAwareButtonRenderer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using NControl.Controls.WP81; 3 | using Xamarin.Forms; 4 | using Xamarin.Forms.Platform.WinPhone; 5 | 6 | [assembly: ExportRenderer(typeof(Button), typeof(FontAwareButtonRenderer))] 7 | namespace NControl.Controls.WP81 8 | { 9 | /// 10 | /// Custom font label renderer. 11 | /// 12 | public class FontAwareButonRenderer : ButtonRenderer 13 | { 14 | /// 15 | /// Raises the element changed event. 16 | /// 17 | /// E. 18 | protected override void OnElementChanged(ElementChangedEventArgs e) 19 | { 20 | base.OnElementChanged(e); 21 | 22 | if (e.NewElement != null) 23 | UpdateFont(); 24 | } 25 | 26 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 27 | { 28 | base.OnElementPropertyChanged(sender, e); 29 | 30 | if (e.PropertyName == Label.FontFamilyProperty.PropertyName) 31 | UpdateFont(); 32 | } 33 | 34 | private void UpdateFont() 35 | { 36 | var fontName = Element.FontFamily; 37 | if (string.IsNullOrWhiteSpace(fontName)) 38 | return; 39 | 40 | fontName = fontName.ToLowerInvariant(); 41 | if (NControls.Typefaces.ContainsKey(fontName)) 42 | Control.FontSource = NControls.Typefaces[fontName]; 43 | } 44 | 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/FontAwareLabelRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using NControl.Controls.WP81; 4 | using Xamarin.Forms; 5 | using Xamarin.Forms.Platform.WinPhone; 6 | 7 | [assembly: ExportRenderer(typeof(Label), typeof(FontAwareLabelRenderer))] 8 | namespace NControl.Controls.WP81 9 | { 10 | /// 11 | /// Custom font label renderer. 12 | /// 13 | public class FontAwareLabelRenderer : LabelRenderer 14 | { 15 | /// 16 | /// Raises the element changed event. 17 | /// 18 | /// E. 19 | protected override void OnElementChanged(ElementChangedEventArgs e) 20 | { 21 | base.OnElementChanged(e); 22 | 23 | if (e.NewElement != null) 24 | UpdateFont(); 25 | } 26 | 27 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 28 | { 29 | base.OnElementPropertyChanged(sender, e); 30 | 31 | if(e.PropertyName == Label.FontFamilyProperty.PropertyName) 32 | UpdateFont(); 33 | } 34 | 35 | private void UpdateFont() 36 | { 37 | var fontName = Element.FontFamily; 38 | if (string.IsNullOrWhiteSpace(fontName)) 39 | return; 40 | 41 | fontName = fontName.ToLowerInvariant(); 42 | if (NControls.Typefaces.ContainsKey(fontName)) 43 | Control.FontSource = NControls.Typefaces[fontName]; 44 | } 45 | 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/NControls.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Windows.Documents; 5 | 6 | namespace NControl.Controls.WP81 7 | { 8 | /// 9 | /// NControls. 10 | /// 11 | public static class NControls 12 | { 13 | /// 14 | /// The typefaces. 15 | /// 16 | public static readonly Dictionary Typefaces = new Dictionary(); 17 | 18 | /// 19 | /// Init this instance to 20 | /// 21 | public static void Init() 22 | { 23 | var assemblies = AppDomain.CurrentDomain.GetAssemblies(); 24 | FontLoader.LoadFonts (assemblies, (fontName, s) => { 25 | 26 | fontName = fontName.ToLowerInvariant(); 27 | var copyStream = new MemoryStream(); 28 | s.CopyTo(copyStream); 29 | Typefaces[fontName] = new FontSource(copyStream); 30 | }); 31 | } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Resources; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("NControl.Controls.WP81")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("NControl.Controls.WP81")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | [assembly: Guid("f8a2bb2f-ba3f-4fad-b0c2-e004f8580717")] 25 | 26 | // Version information for an assembly consists of the following four values: 27 | // 28 | // Major Version 29 | // Minor Version 30 | // Build Number 31 | // Revision 32 | // 33 | // You can specify all the values or you can default the Revision and Build Numbers 34 | // by using the '*' as shown below: 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | [assembly: NeutralResourcesLanguageAttribute("en-US")] 38 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/README_FIRST.txt: -------------------------------------------------------------------------------- 1 | For the Windows Phone toolkit make sure that you have 2 | marked the icons in the "Toolkit.Content" folder as content. That way they 3 | can be used as the icons for the ApplicationBar control. -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/RoundCornerViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Media; 9 | using NControl.Abstractions; 10 | using NControl.Controls; 11 | using NControl.Controls.WP81; 12 | using NControl.WP81; 13 | using Xamarin.Forms; 14 | using Xamarin.Forms.Platform.WinPhone; 15 | using Color = System.Windows.Media.Color; 16 | using Thickness = Xamarin.Forms.Thickness; 17 | 18 | [assembly: ExportRenderer(typeof(RoundCornerView), typeof(RoundCornerViewRenderer))] 19 | namespace NControl.Controls.WP81 20 | { 21 | public class RoundCornerViewRenderer : NControlViewRenderer 22 | { 23 | protected override void OnElementChanged(ElementChangedEventArgs e) 24 | { 25 | base.OnElementChanged(e); 26 | 27 | if (e.NewElement != null) 28 | { 29 | var element = (e.NewElement as RoundCornerView); 30 | UpdateElement(element); 31 | } 32 | } 33 | 34 | /// 35 | /// Raises the element property changed event. 36 | /// 37 | /// Sender. 38 | /// E. 39 | protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) 40 | { 41 | base.OnElementPropertyChanged(sender, e); 42 | 43 | if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || 44 | e.PropertyName == RoundCornerView.BorderColorProperty.PropertyName || 45 | e.PropertyName == RoundCornerView.CornerRadiusProperty.PropertyName || 46 | e.PropertyName == RoundCornerView.BorderWidthProperty.PropertyName) 47 | UpdateElement(Element as RoundCornerView); 48 | } 49 | 50 | /// 51 | /// Updates the clip rectangle 52 | /// 53 | protected override void UpdateClip() 54 | { 55 | base.UpdateClip(); 56 | 57 | if (Control.ActualWidth == 0 || Control.ActualHeight == 0) 58 | return; 59 | 60 | if (Element.IsClippedToBounds) 61 | { 62 | var width = Control.ActualWidth - ((Element as RoundCornerView).BorderWidth * 4); 63 | var height = Control.ActualHeight - ((Element as RoundCornerView).BorderWidth * 4); 64 | if (width > 0 && height > 0) 65 | { 66 | 67 | Clip = new RectangleGeometry 68 | { 69 | Rect = new Rect(0, 0, Control.ActualWidth, Control.ActualHeight), 70 | RadiusX = (Element as RoundCornerView).CornerRadius, 71 | RadiusY = (Element as RoundCornerView).CornerRadius, 72 | 73 | }; 74 | 75 | if (Control.Child != null) 76 | { 77 | var el = Element as RoundCornerView; 78 | 79 | Control.Child.Clip = new RectangleGeometry 80 | { 81 | Rect = new Rect((Element as RoundCornerView).BorderWidth, 82 | (Element as RoundCornerView).BorderWidth, width, height), 83 | RadiusX = (Element as RoundCornerView).CornerRadius, 84 | RadiusY = (Element as RoundCornerView).CornerRadius, 85 | }; 86 | } 87 | } 88 | } 89 | else 90 | { 91 | if (Control.Child != null) 92 | Control.Child.Clip = null; 93 | 94 | Clip = null; 95 | } 96 | } 97 | 98 | /// 99 | /// Updates the element. 100 | /// 101 | /// Element. 102 | private void UpdateElement(RoundCornerView element) 103 | { 104 | var colorConverter = new ColorConverter(); 105 | 106 | Control.Background = (Brush)colorConverter.Convert(element.BackgroundColor, null, null, null); 107 | Control.BorderBrush = (Brush)colorConverter.Convert(element.BorderColor, null, null, null); 108 | Control.BorderThickness = new System.Windows.Thickness(element.BorderWidth); 109 | Control.CornerRadius = new CornerRadius(element.CornerRadius); 110 | 111 | UpdateClip(); 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Add.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Cancel.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Check.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Delete.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls.WP81/Toolkit.Content/ApplicationBar.Select.png -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.WP81/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/BlurViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NControl.Controls.iOS; 3 | using NControl.Controls; 4 | using Xamarin.Forms; 5 | using NControl.iOS; 6 | using Xamarin.Forms.Platform.iOS; 7 | using UIKit; 8 | 9 | [assembly: ExportRenderer (typeof (BlurImageView), typeof (BlurViewRenderer))] 10 | namespace NControl.Controls.iOS 11 | { 12 | public class BlurViewRenderer: ImageRenderer 13 | { 14 | protected override void OnElementChanged (ElementChangedEventArgs e) 15 | { 16 | base.OnElementChanged (e); 17 | 18 | if (Control != null) { 19 | 20 | var blurOverlay = new UIVisualEffectView (UIBlurEffect.FromStyle (UIBlurEffectStyle.Light)); 21 | blurOverlay.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth; 22 | Control.AddSubview(blurOverlay); 23 | } 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/CardPageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using NControl.Controls.iOS; 4 | using UIKit; 5 | using System.Threading.Tasks; 6 | using CoreGraphics; 7 | using System.Collections.Generic; 8 | using System.Reflection; 9 | using Xamarin.Forms.Platform.iOS; 10 | using Foundation; 11 | 12 | [assembly: Dependency (typeof (CardPageHelper))] 13 | namespace NControl.Controls.iOS 14 | { 15 | /// 16 | /// Card page renderer. 17 | /// 18 | public class CardPageHelper: ICardPageHelper 19 | { 20 | #region ICardPageHelper implementation 21 | 22 | /// 23 | /// Shows the async. 24 | /// 25 | /// The async. 26 | /// Card. 27 | public Task ShowAsync (CardPage card) 28 | { 29 | return Application.Current.MainPage.Navigation.PushModalAsync (card, false); 30 | } 31 | 32 | /// 33 | /// Hides the async. 34 | /// 35 | /// The async. 36 | /// Card. 37 | public Task CloseAsync (CardPage card) 38 | { 39 | return Application.Current.MainPage.Navigation.PopModalAsync (); 40 | } 41 | 42 | /// 43 | /// Gets the size of the screen. 44 | /// 45 | /// The screen size. 46 | public Size GetScreenSize () 47 | { 48 | return new Size (UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height); 49 | } 50 | 51 | /// 52 | /// Gets a value indicating whether this control animates itself. 53 | /// 54 | /// true if control animates itself; otherwise, false. 55 | public bool ControlAnimatesItself { get { return true; } } 56 | 57 | #endregion 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/CardPageRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using NControl.Controls.iOS; 4 | using Xamarin.Forms.Platform.iOS; 5 | using System.Threading.Tasks; 6 | using UIKit; 7 | using NControl.Controls; 8 | 9 | [assembly: ExportRenderer(typeof(CardPage), typeof(CardPageRenderer))] 10 | namespace NControl.Controls.iOS 11 | { 12 | /// 13 | /// Renders a card page - ie a view with transparent background 14 | /// 15 | public class CardPageRenderer: PageRenderer 16 | { 17 | /// 18 | /// The parent. 19 | /// 20 | private UIViewController _parentModalViewController; 21 | 22 | /// 23 | /// Dids the move to parent view controller. 24 | /// 25 | /// Parent. 26 | public override void DidMoveToParentViewController (UIViewController parent) 27 | { 28 | base.DidMoveToParentViewController (parent); 29 | 30 | // Save modal wrapper from Xamarin.Forms 31 | _parentModalViewController = parent; 32 | 33 | // Set custom to be able to set clear background! 34 | parent.ModalPresentationStyle = UIModalPresentationStyle.Custom; 35 | } 36 | 37 | /// 38 | /// Views the will appear. 39 | /// 40 | /// If set to true animated. 41 | public override void ViewWillAppear(bool animated) 42 | { 43 | base.ViewWillAppear(false); 44 | 45 | // Clear background on parent modal wrapper!! 46 | _parentModalViewController.View.BackgroundColor = UIColor.Clear; 47 | View.BackgroundColor = UIColor.Clear; 48 | } 49 | 50 | /// 51 | /// Views the did appear. 52 | /// 53 | /// If set to true animated. 54 | public override void ViewDidAppear (bool animated) 55 | { 56 | base.ViewDidAppear (false); 57 | 58 | // Clear background on parent modal wrapper!! 59 | _parentModalViewController.View.BackgroundColor = UIColor.Clear; 60 | View.BackgroundColor = UIColor.Clear; 61 | } 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/ExtendedEntryRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.iOS; 3 | using UIKit; 4 | using Xamarin.Forms; 5 | using NControl.Controls; 6 | using NControl.Controls.iOS; 7 | 8 | [assembly: ExportRenderer (typeof (ExtendedEntry), typeof (ExtendedEntryRenderer))] 9 | namespace NControl.Controls.iOS 10 | { 11 | public class ExtendedEntryRenderer: EntryRenderer 12 | { 13 | /// 14 | /// Raises the element changed event. 15 | /// 16 | /// E. 17 | protected override void OnElementChanged (ElementChangedEventArgs e) 18 | { 19 | base.OnElementChanged (e); 20 | 21 | if (Control != null && e.NewElement != null) 22 | { 23 | var textfield = Control as UITextField; 24 | textfield.BorderStyle = UITextBorderStyle.None; 25 | UpdateFont(e.NewElement as ExtendedEntry); 26 | } 27 | 28 | if (e.NewElement != null) 29 | UpdateTextAlignment (); 30 | } 31 | 32 | /// 33 | /// Raises the element property changed event. 34 | /// 35 | /// Sender. 36 | /// E. 37 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e) 38 | { 39 | base.OnElementPropertyChanged (sender, e); 40 | 41 | if (e.PropertyName == Entry.HorizontalTextAlignmentProperty.PropertyName) 42 | UpdateTextAlignment (); 43 | else if (e.PropertyName == Entry.FontFamilyProperty.PropertyName) 44 | UpdateFont (Element as ExtendedEntry); 45 | } 46 | 47 | /// 48 | /// Updates the font. 49 | /// 50 | private void UpdateFont (ExtendedEntry element) 51 | { 52 | if (string.IsNullOrEmpty(element.FontFamily)) 53 | return; 54 | 55 | (Control as UITextField).Font = UIFont.FromName (element.FontFamily, 56 | (Control as UITextField).Font.PointSize); 57 | } 58 | 59 | /// 60 | /// Updates the text alignment. 61 | /// 62 | private void UpdateTextAlignment() 63 | { 64 | if (Control == null) 65 | return; 66 | 67 | if ((Element as ExtendedEntry).HorizontalTextAlignment == TextAlignment.Start) 68 | (Control as UITextField).TextAlignment = UITextAlignment.Left; 69 | else if ((Element as ExtendedEntry).HorizontalTextAlignment == TextAlignment.Center) 70 | (Control as UITextField).TextAlignment = UITextAlignment.Center; 71 | else if ((Element as ExtendedEntry).HorizontalTextAlignment == TextAlignment.End) 72 | (Control as UITextField).TextAlignment = UITextAlignment.Right; 73 | } 74 | } 75 | } 76 | 77 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/NControl.Controls.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {CF27E017-266D-4AFE-9D47-4E15AC78C049} 8 | Library 9 | NControl.Controls.iOS 10 | Resources 11 | NControl.Controls.iOS 12 | ..\..\ 13 | true 14 | 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug 22 | DEBUG; 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | full 29 | true 30 | bin\Release 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | ..\..\packages\NGraphics.0.4.0\lib\Xamarin.iOS10\NGraphics.dll 42 | 43 | 44 | ..\..\packages\NGraphics.0.4.0\lib\Xamarin.iOS10\NGraphics.iOS.dll 45 | 46 | 47 | ..\..\packages\NControl.0.9.1.0\lib\Xamarin.iOS10\NControl.dll 48 | 49 | 50 | ..\..\packages\NControl.0.9.1.0\lib\Xamarin.iOS10\NControl.iOS.dll 51 | 52 | 53 | ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll 54 | 55 | 56 | ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll 57 | 58 | 59 | ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll 60 | 61 | 62 | ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | {239D7367-336F-4372-93A1-5CC4BD2414FE} 81 | NControl.Controls 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/NControls.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using Foundation; 4 | using CoreGraphics; 5 | using CoreText; 6 | using System.IO; 7 | using UIKit; 8 | using System.Collections.Generic; 9 | 10 | namespace NControl.Controls.iOS 11 | { 12 | /// 13 | /// NControls. 14 | /// 15 | public static class NControls 16 | { 17 | /// 18 | /// Init this instance to 19 | /// 20 | public static void Init() 21 | { 22 | NControl.Controls.FontLoader.LoadFonts (AppDomain.CurrentDomain.GetAssemblies(), (fontName, s) => { 23 | 24 | var data = new byte[s.Length]; 25 | s.Read (data, 0, data.Length); 26 | 27 | var dataProvider = new CGDataProvider (data, 0, data.Length); 28 | var familyNames = UIFont.FamilyNames; //fixes app freeze in some cases: https://alpha.app.net/jaredsinclair/post/18555292 29 | var cgFont = CGFont.CreateFromProvider (dataProvider); 30 | NSError error; 31 | 32 | var registered = CTFontManager.RegisterGraphicsFont(cgFont, out error); 33 | if (!registered) 34 | { 35 | // If the error code is 105 then the font we are trying to register is already registered 36 | // We will not report this as an error. 37 | if (error.Code != 105) 38 | throw new ArgumentException("Error registering: " + fontName + 39 | " (" + error.LocalizedDescription + ")"); 40 | } 41 | }); 42 | } 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("NControl.Controls.iOS")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("christianfalch")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/RoundCornerViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using NControl.Controls; 4 | using NControl.Controls.iOS; 5 | using Xamarin.Forms.Platform.iOS; 6 | using NControl.iOS; 7 | 8 | [assembly: ExportRenderer (typeof (RoundCornerView), typeof (RoundCornerViewRenderer))] 9 | namespace NControl.Controls.iOS 10 | { 11 | public class RoundCornerViewRenderer: NControlViewRenderer 12 | { 13 | protected override void OnElementChanged (ElementChangedEventArgs e) 14 | { 15 | base.OnElementChanged (e); 16 | 17 | if (e.NewElement != null) { 18 | 19 | Layer.MasksToBounds = true; 20 | var element = (e.NewElement as RoundCornerView); 21 | 22 | UpdateElement (element); 23 | } 24 | } 25 | 26 | /// 27 | /// Raises the element property changed event. 28 | /// 29 | /// Sender. 30 | /// E. 31 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e) 32 | { 33 | base.OnElementPropertyChanged (sender, e); 34 | 35 | if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || 36 | e.PropertyName == RoundCornerView.BorderColorProperty.PropertyName || 37 | e.PropertyName == RoundCornerView.BorderWidthProperty.PropertyName || 38 | e.PropertyName == RoundCornerView.CornerRadiusProperty.PropertyName ) 39 | UpdateElement ( Element as RoundCornerView); 40 | } 41 | 42 | /// 43 | /// Updates the element. 44 | /// 45 | /// Element. 46 | private void UpdateElement(RoundCornerView element) 47 | { 48 | if (element.BackgroundColor == Xamarin.Forms.Color.Transparent) 49 | BackgroundColor = UIKit.UIColor.Clear; 50 | else 51 | BackgroundColor = element.BackgroundColor.ToUIColor (); 52 | 53 | Layer.CornerRadius = element.CornerRadius; 54 | Layer.BorderColor = element.BorderColor.ToUIColor ().CGColor; 55 | Layer.BorderWidth = (nfloat)element.BorderWidth; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/TouchFixedScrollViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.iOS; 3 | using Xamarin.Forms; 4 | using NControl.Controls.iOS; 5 | using UIKit; 6 | 7 | [assembly: ExportRenderer (typeof (ScrollView), typeof (TouchFixedScrollViewRenderer))] 8 | namespace NControl.Controls.iOS 9 | { 10 | /// 11 | /// Touch fixed scroll view renderer. 12 | /// 13 | public class TouchFixedScrollViewRenderer: ScrollViewRenderer 14 | { 15 | protected override void OnElementChanged (VisualElementChangedEventArgs e) 16 | { 17 | base.OnElementChanged (e); 18 | 19 | // if (e.OldElement == null) 20 | // ((UIScrollView)NativeView).DelaysContentTouches = false; 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NControl.Controls 5 | 0.9.4.1 6 | Christian Falch 7 | Christian Falch 8 | https://github.com/chrfalch/NControl.Controls/blob/master/LICENSE.md 9 | https://github.com/chrfalch/NControl.Controls/ 10 | false 11 | 12 | NControl.Controls is a collection of Xamarin.Forms controls using the 13 | NControl library to enable the creation of advanced custom controls in a true 14 | cross-platform way. 15 | 16 | Released for iOS, Android and Windows Phone Silverlight 8.1. 17 | Copyright 2015 18 | xamarin, pcl, xam.pcl, android, xamarin.forms, ios 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/BlurImageView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NControl.Abstractions; 3 | using Xamarin.Forms; 4 | 5 | namespace NControl.Controls 6 | { 7 | /// 8 | /// Blur view. 9 | /// 10 | public class BlurImageView: Image 11 | { 12 | 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/ExtendedEntry.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * 3 | * The MIT License (MIT) 4 | * 5 | * Copyright (c) 2025 - Christian Falch 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining 8 | * a copy of this software and associated documentation files (the 9 | * "Software"), to deal in the Software without restriction, including 10 | * without limitation the rights to use, copy, modify, merge, publish, 11 | * distribute, sublicense, and/or sell copies of the Software, and to 12 | * permit persons to whom the Software is furnished to do so, subject 13 | * to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | ************************************************************************/ 27 | 28 | using System; 29 | using Xamarin.Forms; 30 | 31 | namespace NControl.Controls 32 | { 33 | /// 34 | /// Entry without borders 35 | /// 36 | public class ExtendedEntry: Entry 37 | { 38 | /// 39 | /// Initializes a new instance of the class. 40 | /// 41 | public ExtendedEntry () 42 | { 43 | } 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/FontLoader.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * 3 | * The MIT License (MIT) 4 | * 5 | * Copyright (c) 2025 - Christian Falch 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining 8 | * a copy of this software and associated documentation files (the 9 | * "Software"), to deal in the Software without restriction, including 10 | * without limitation the rights to use, copy, modify, merge, publish, 11 | * distribute, sublicense, and/or sell copies of the Software, and to 12 | * permit persons to whom the Software is furnished to do so, subject 13 | * to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | ************************************************************************/ 27 | 28 | using System; 29 | using System.Reflection; 30 | using System.Collections.Generic; 31 | using System.Linq; 32 | using System.IO; 33 | using System.Runtime.InteropServices; 34 | using NControl.Controls.Fonts; 35 | 36 | namespace NControl.Controls 37 | { 38 | /// 39 | /// Implements a simple cross-platform font loader with callbacks that can be used by platform implementations 40 | /// to register fonts on the device. Pass a list of assemblies to the LoadFonts method where fonts are embedded 41 | /// as resources and a callback for registering fonts. 42 | /// 43 | public static class FontLoader 44 | { 45 | /// 46 | /// The initialized flag 47 | /// 48 | private static bool _initialized = false; 49 | 50 | /// 51 | /// initializes 52 | /// 53 | public static void LoadFonts (IEnumerable assemblies, Action registerFont) 54 | { 55 | if (_initialized) 56 | return; 57 | 58 | _initialized = true; 59 | 60 | foreach (var assembly in assemblies) { 61 | 62 | if (assembly.IsDynamic) 63 | continue; 64 | 65 | // Find all resources ending with ttf 66 | foreach (var name in assembly.GetManifestResourceNames()) { 67 | 68 | if (name.ToLowerInvariant ().EndsWith (".ttf")) 69 | { 70 | using (var s = assembly.GetManifestResourceStream (name)) { 71 | var fontName = TTFFont.GetName (s); 72 | s.Position = 0; 73 | registerFont (Path.GetFileName (fontName), s); 74 | } 75 | } 76 | } 77 | } 78 | } 79 | } 80 | } 81 | 82 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/Fonts/BaseFont.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NControl.Controls 4 | { 5 | /// 6 | /// Base font. 7 | /// 8 | public class BaseFont 9 | { 10 | 11 | /// 12 | /// Swaps the word. 13 | /// 14 | /// The word. 15 | /// Value. 16 | protected static UInt16 SwapWord(UInt16 value) 17 | { 18 | return (UInt16)((value & 0xFFU) << 8 | (value & 0xFF00U) >> 8); 19 | } 20 | 21 | /// 22 | /// Swaps bytes in a long. 23 | /// 24 | /// The word. 25 | /// Value. 26 | protected static UInt32 SwapLong(UInt32 value) 27 | { 28 | return (value & 0x000000FFU) << 24 | (value & 0x0000FF00U) << 8 | 29 | (value & 0x00FF0000U) >> 8 | (value & 0xFF000000U) >> 24; 30 | } 31 | 32 | /// 33 | /// Reverses the bytes. 34 | /// 35 | /// The bytes. 36 | /// Value. 37 | private static UInt64 ReverseBytes(UInt64 value) 38 | { 39 | return (value & 0x00000000000000FFUL) << 56 | (value & 0x000000000000FF00UL) << 40 | 40 | (value & 0x0000000000FF0000UL) << 24 | (value & 0x00000000FF000000UL) << 8 | 41 | (value & 0x000000FF00000000UL) >> 8 | (value & 0x0000FF0000000000UL) >> 24 | 42 | (value & 0x00FF000000000000UL) >> 40 | (value & 0xFF00000000000000UL) >> 56; 43 | } 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/Fonts/OTFFont.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Runtime.InteropServices; 4 | 5 | namespace NControl.Controls.Fonts 6 | { 7 | /// 8 | /// OTF font. 9 | /// 10 | public class OTFFont: BaseFont 11 | { 12 | /// 13 | /// Gets the name. 14 | /// 15 | /// The name. 16 | /// S. 17 | public static string GetName(Stream s) 18 | { 19 | TTCHeader ttcHeader; 20 | 21 | var br = new BinaryReader (s); 22 | ttcHeader.versiona = (br.ReadUInt16 ()); 23 | ttcHeader.versionb = (br.ReadUInt16 ()); 24 | ttcHeader.numTables = SwapWord (br.ReadUInt16 ()); 25 | ttcHeader.searchRange = SwapWord (br.ReadUInt16 ()); 26 | ttcHeader.entrySelector = SwapWord (br.ReadUInt16 ()); 27 | ttcHeader.rangeShift = SwapWord (br.ReadUInt16 ()); 28 | 29 | //check is this is a valid version 30 | if(ttcHeader.versiona != 0x0001 && ttcHeader.versionb != 0x0000) 31 | return null; 32 | 33 | return null; 34 | } 35 | } 36 | 37 | /// 38 | /// Name record 39 | /// 40 | [StructLayout(LayoutKind.Sequential, Pack = 0x1)] 41 | struct TTCHeader 42 | { 43 | public ushort versiona; 44 | public ushort versionb; 45 | public ushort numTables; 46 | public ushort searchRange; 47 | public ushort entrySelector; 48 | public ushort rangeShift; 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/ICardPageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Xamarin.Forms; 4 | 5 | namespace NControl.Controls 6 | { 7 | /// 8 | /// I card page helper. 9 | /// 10 | public interface ICardPageHelper 11 | { 12 | /// 13 | /// Gets the size of the screen. 14 | /// 15 | /// The screen size. 16 | Size GetScreenSize(); 17 | 18 | /// 19 | /// Shows the card async. 20 | /// 21 | /// The async. 22 | Task ShowAsync(CardPage page); 23 | 24 | /// 25 | /// Closes the card async 26 | /// 27 | /// The aync. 28 | Task CloseAsync (CardPage page); 29 | 30 | /// 31 | /// Gets a value indicating whether this control animates itself. 32 | /// 33 | /// true if control animates itself; otherwise, false. 34 | bool ControlAnimatesItself { get; } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/MaterialDesignRippleButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NControl.Controls 4 | { 5 | /// 6 | /// Material design ripple button. 7 | /// 8 | public class MaterialDesignRippleButton: RippleButton 9 | { 10 | public MaterialDesignRippleButton () 11 | { 12 | IconFontFamily = FontMaterialDesignLabel.FontName; 13 | } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/NGraphicsExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls 5 | { 6 | /// 7 | /// NGraphics extensions. 8 | /// 9 | public static class NGraphicsExtensions 10 | { 11 | /// 12 | /// Converts the Xamarin.Forms Color to an NGraphics Color 13 | /// 14 | /// The N color. 15 | /// Color. 16 | public static NGraphics.Color ToNColor (this Color color) 17 | { 18 | return new NGraphics.Color (color.R, color.G, color.B, color.A); 19 | } 20 | 21 | /// 22 | /// Converts a Xamarin Rectangle to an NGraphics rectangle 23 | /// 24 | /// The N rect. 25 | /// Rect. 26 | public static NGraphics.Rect ToNRect(this Rectangle rect) 27 | { 28 | return new NGraphics.Rect (rect.X, rect.Y, rect.Width, rect.Height); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/PagingView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NControl.Abstractions; 3 | using Xamarin.Forms; 4 | 5 | namespace NControl.Controls 6 | { 7 | /// 8 | /// Paging view. 9 | /// 10 | public class PagingView: NControlView 11 | { 12 | /// 13 | /// Initializes a new instance of the class. 14 | /// 15 | public PagingView() 16 | { 17 | HeightRequest = 22; 18 | } 19 | 20 | /// 21 | /// Draw the specified canvas and rect. 22 | /// 23 | /// Canvas. 24 | /// Rect. 25 | public override void Draw (NGraphics.ICanvas canvas, NGraphics.Rect rect) 26 | { 27 | base.Draw (canvas, rect); 28 | 29 | if (PageCount <= 0) 30 | return; 31 | 32 | var dotWidth = rect.Height - 16; 33 | var spacing = dotWidth; 34 | var totalWidthNeeded = (PageCount * (dotWidth + spacing)) - dotWidth; 35 | 36 | // Draw dots 37 | double midx = rect.Width / 2; 38 | double midy = rect.Height / 2; 39 | 40 | var x = midx - (totalWidthNeeded / 2); 41 | var pen = new NGraphics.Pen (IndicatorColor.ToNColor (), 0.5); 42 | var brush = new NGraphics.SolidBrush (IndicatorColor.ToNColor ()); 43 | for (int i = 0; i < PageCount; i++) { 44 | 45 | canvas.DrawEllipse (new NGraphics.Rect (x, midy - (dotWidth / 2), 46 | dotWidth, dotWidth), pen, i==Page ? brush : null); 47 | 48 | x += dotWidth + spacing; 49 | } 50 | 51 | } 52 | 53 | /// 54 | /// The PageCount property. 55 | /// 56 | public static BindableProperty PageCountProperty = 57 | BindableProperty.Create(nameof(PageCount), typeof(int), typeof(PagingView), 0, 58 | propertyChanged: (bindable, oldValue, newValue) => { 59 | var ctrl = (PagingView)bindable; 60 | ctrl.PageCount = (int)newValue; 61 | }); 62 | 63 | /// 64 | /// Gets or sets the PageCount of the PagingView instance. 65 | /// 66 | /// The color of the buton. 67 | public int PageCount { 68 | get{ return (int)GetValue (PageCountProperty); } 69 | set { 70 | SetValue (PageCountProperty, value); 71 | Invalidate (); 72 | } 73 | } 74 | 75 | /// 76 | /// The Page property. 77 | /// 78 | public static BindableProperty PageProperty = 79 | BindableProperty.Create(nameof(Page), typeof(int), typeof(PagingView), 0, BindingMode.TwoWay, 80 | propertyChanged: (bindable, oldValue, newValue) => { 81 | var ctrl = (PagingView)bindable; 82 | ctrl.Page = (int)newValue; 83 | }); 84 | 85 | /// 86 | /// Gets or sets the Page of the PagingView instance. 87 | /// 88 | /// The color of the buton. 89 | public int Page { 90 | get{ return (int)GetValue (PageProperty); } 91 | set { 92 | SetValue (PageProperty, value); 93 | Invalidate (); 94 | } 95 | } 96 | 97 | /// 98 | /// The IndicatorColor property. 99 | /// 100 | public static BindableProperty IndicatorColorProperty = 101 | BindableProperty.Create(nameof(IndicatorColor), typeof(Color), typeof(PagingView), Color.Gray, 102 | propertyChanged: (bindable, oldValue, newValue) => { 103 | var ctrl = (PagingView)bindable; 104 | ctrl.IndicatorColor = (Color)newValue; 105 | }); 106 | 107 | /// 108 | /// Gets or sets the IndicatorColor of the PagingView instance. 109 | /// 110 | /// The color of the buton. 111 | public Color IndicatorColor { 112 | get{ return (Color)GetValue (IndicatorColorProperty); } 113 | set { 114 | SetValue (IndicatorColorProperty, value); 115 | Invalidate (); 116 | } 117 | } 118 | } 119 | } 120 | 121 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("NControl.Controls.Abstractions")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("christianfalch")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/RepeaterControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using System.Collections.ObjectModel; 4 | 5 | namespace NControl.Controls 6 | { 7 | /// 8 | /// Implements a layout that uses item templates like a listview 9 | /// to build repeating controls. Inspired by: 10 | /// http://www.ericgrover.com/#!/post/1027 11 | /// 12 | public class RepeaterControl: StackLayout where T : class 13 | { 14 | #region Constructors 15 | 16 | /// 17 | /// Initializes a new instance of the class. 18 | /// 19 | public RepeaterControl() 20 | { 21 | this.Spacing = 0; 22 | } 23 | 24 | #endregion 25 | 26 | #region Properties 27 | 28 | /// 29 | /// The items source property. 30 | /// 31 | public static readonly BindableProperty ItemsSourceProperty = 32 | BindableProperty.Create(nameof(RepeaterControl.ItemsSource), typeof(ObservableCollection), 33 | typeof(RepeaterControl), new ObservableCollection(), BindingMode.OneWay, 34 | propertyChanged:(bindable, oldValue, newValue) => { 35 | 36 | var control = bindable as RepeaterControl; 37 | control.ItemsSource = newValue as ObservableCollection; 38 | }); 39 | 40 | /// 41 | /// Gets or sets the items source. 42 | /// 43 | /// The items source. 44 | public ObservableCollection ItemsSource 45 | { 46 | get { return (ObservableCollection)GetValue(ItemsSourceProperty); } 47 | set 48 | { 49 | if (ItemsSource != null) 50 | ItemsSource.CollectionChanged -= ItemsSource_CollectionChanged; 51 | 52 | SetValue(ItemsSourceProperty, value); 53 | 54 | if (ItemsSource != null) 55 | ItemsSource.CollectionChanged += ItemsSource_CollectionChanged; 56 | 57 | UpdateItems(); 58 | } 59 | } 60 | 61 | /// 62 | /// The item template property. 63 | /// 64 | public static readonly BindableProperty ItemTemplateProperty = 65 | BindableProperty.Create(nameof(RepeaterControl.ItemsSourceProperty), typeof(DataTemplate), 66 | typeof(RepeaterControl), default(DataTemplate)); 67 | 68 | /// 69 | /// Gets or sets the item template. 70 | /// 71 | /// The item template. 72 | public DataTemplate ItemTemplate 73 | { 74 | get { return (DataTemplate)GetValue(ItemTemplateProperty); } 75 | set 76 | { 77 | SetValue(ItemTemplateProperty, value); 78 | UpdateItems (); 79 | } 80 | } 81 | 82 | #endregion 83 | 84 | #region Private Members 85 | 86 | /// 87 | /// Updates the items. 88 | /// 89 | private void UpdateItems() 90 | { 91 | Children.Clear(); 92 | 93 | if(ItemsSource != null && this.ItemTemplate != null) 94 | { 95 | foreach (T item in ItemsSource) 96 | { 97 | var view = this.ItemTemplate.CreateContent() as View; 98 | if (view == null) 99 | throw new InvalidOperationException("DataTemplates needs to inherit from the View class"); 100 | 101 | view.BindingContext = item; 102 | this.Children.Insert(ItemsSource.IndexOf(item), view); 103 | } 104 | 105 | this.UpdateChildrenLayout(); 106 | this.InvalidateLayout(); 107 | } 108 | } 109 | #endregion 110 | 111 | #region Event Handlers 112 | 113 | /// 114 | /// Itemses the source collection changed. 115 | /// 116 | /// Sender. 117 | /// E. 118 | void ItemsSource_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) 119 | { 120 | UpdateItems(); 121 | } 122 | 123 | #endregion 124 | } 125 | } 126 | 127 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/Resources/Fonts/Material-Design-Iconic-Font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls/Resources/Fonts/Material-Design-Iconic-Font.ttf -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/Resources/Fonts/fontawesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.Controls/NControl.Controls/Resources/Fonts/fontawesome.ttf -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/RoundCornerView.cs: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * 3 | * The MIT License (MIT) 4 | * 5 | * Copyright (c) 2025 - Christian Falch 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining 8 | * a copy of this software and associated documentation files (the 9 | * "Software"), to deal in the Software without restriction, including 10 | * without limitation the rights to use, copy, modify, merge, publish, 11 | * distribute, sublicense, and/or sell copies of the Software, and to 12 | * permit persons to whom the Software is furnished to do so, subject 13 | * to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | ************************************************************************/ 27 | 28 | using System; 29 | using Xamarin.Forms; 30 | using NControl.Abstractions; 31 | using NGraphics; 32 | 33 | namespace NControl.Controls 34 | { 35 | /// 36 | /// Rounded border control. 37 | /// 38 | public class RoundCornerView: NControlView 39 | { 40 | /// 41 | /// Initializes a new instance of the class. 42 | /// 43 | public RoundCornerView() 44 | { 45 | IsClippedToBounds = true; 46 | } 47 | 48 | protected override void LayoutChildren (double x, double y, double width, double height) 49 | { 50 | base.LayoutChildren (x, y, width, height); 51 | } 52 | 53 | #region Properties 54 | 55 | /// 56 | /// The border width property. 57 | /// 58 | public static BindableProperty BorderWidthProperty = 59 | BindableProperty.Create(nameof(BorderWidth), typeof(double), typeof(RoundCornerView), 0.0, 60 | propertyChanged: (bindable, oldValue, newValue) => { 61 | var ctrl = (RoundCornerView)bindable; 62 | ctrl.BorderWidth = (double)newValue; 63 | }); 64 | 65 | /// 66 | /// Gets or sets the border width 67 | /// 68 | /// The corner radius. 69 | public double BorderWidth 70 | { 71 | get { return (double)GetValue(BorderWidthProperty); } 72 | set 73 | { 74 | SetValue(BorderWidthProperty, value); 75 | Invalidate (); 76 | } 77 | } 78 | 79 | /// 80 | /// The border color property. 81 | /// 82 | public static BindableProperty BorderColorProperty = 83 | BindableProperty.Create(nameof(BorderColor), typeof(Xamarin.Forms.Color), typeof(RoundCornerView), 84 | Xamarin.Forms.Color.Transparent, 85 | propertyChanged: (bindable, oldValue, newValue) => { 86 | var ctrl = (RoundCornerView)bindable; 87 | ctrl.BorderColor = (Xamarin.Forms.Color)newValue; 88 | }); 89 | 90 | /// 91 | /// Gets or sets the border width 92 | /// 93 | /// The corner radius. 94 | public Xamarin.Forms.Color BorderColor 95 | { 96 | get { return (Xamarin.Forms.Color)GetValue(BorderColorProperty); } 97 | set 98 | { 99 | SetValue(BorderColorProperty, value); 100 | Invalidate (); 101 | } 102 | } 103 | 104 | /// 105 | /// The corner radius property. 106 | /// 107 | public static BindableProperty CornerRadiusProperty = 108 | BindableProperty.Create(nameof(CornerRadius), typeof(int), typeof(RoundCornerView), 4, 109 | propertyChanged: (bindable, oldValue, newValue) => { 110 | var ctrl = (RoundCornerView)bindable; 111 | ctrl.CornerRadius = (int)newValue; 112 | }); 113 | 114 | /// 115 | /// Gets or sets the corner radius. 116 | /// 117 | /// The corner radius. 118 | public int CornerRadius 119 | { 120 | get { return (int)GetValue(CornerRadiusProperty); } 121 | set 122 | { 123 | SetValue(CornerRadiusProperty, value); 124 | Invalidate (); 125 | } 126 | } 127 | 128 | #endregion 129 | 130 | } 131 | } 132 | 133 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/ToggleActionButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using System.Threading.Tasks; 4 | 5 | namespace NControl.Controls 6 | { 7 | /// 8 | /// Toggle action button. 9 | /// 10 | public class ToggleActionButton: ActionButton 11 | { 12 | #region Private Members 13 | 14 | /// 15 | /// The org icon. 16 | /// 17 | private string _orgIcon; 18 | 19 | /// 20 | /// The in toggle. 21 | /// 22 | private bool _inToggle; 23 | 24 | #endregion 25 | 26 | /// 27 | /// Initializes a new instance of the class. 28 | /// 29 | public ToggleActionButton () 30 | { 31 | 32 | } 33 | 34 | #region Properties 35 | 36 | /// 37 | /// The toggled property. 38 | /// 39 | public static BindableProperty IsToggledProperty = 40 | BindableProperty.Create(nameof(IsToggled), typeof(bool), typeof(ToggleActionButton), false, 41 | BindingMode.Default, null, (bindable, oldValue, newValue) => { 42 | var ctrl = (ToggleActionButton)bindable; 43 | ctrl.IsToggled = (bool)newValue; 44 | }); 45 | 46 | /// 47 | /// Gets or sets the Toggled state of the buton. 48 | /// 49 | /// The color of the buton. 50 | public bool IsToggled 51 | { 52 | get { return (bool)GetValue (IsToggledProperty);} 53 | set { 54 | 55 | if (_inToggle) 56 | return; 57 | 58 | _inToggle = true; 59 | 60 | SetValue (IsToggledProperty, value); 61 | 62 | //Task.Run (() => 63 | 64 | // Device.BeginInvokeOnMainThread(async () => { 65 | System.Diagnostics.Debug.WriteLine("Toggle " + value); 66 | 67 | if (!value) { 68 | ButtonIcon = _orgIcon; 69 | ButtonIconLabel.RotateTo (0, 140, Easing.CubicInOut); 70 | } 71 | else 72 | { 73 | _orgIcon = ButtonIcon; 74 | ButtonIcon = FontAwesomeLabel.FAPlus; 75 | ButtonIconLabel.RotateTo (585, 140, Easing.CubicInOut); 76 | } 77 | 78 | _inToggle = false; 79 | // }) 80 | //); 81 | } 82 | } 83 | 84 | #endregion 85 | 86 | #region Touches 87 | 88 | /// 89 | /// Toucheses the began. 90 | /// 91 | /// Points. 92 | public override bool TouchesBegan (System.Collections.Generic.IEnumerable points) 93 | { 94 | base.TouchesBegan (points); 95 | 96 | System.Diagnostics.Debug.WriteLine("TouchesBegan"); 97 | 98 | if (!IsEnabled) 99 | return false; 100 | 101 | IsToggled = !IsToggled; 102 | 103 | return true; 104 | } 105 | 106 | #endregion 107 | } 108 | } 109 | 110 | -------------------------------------------------------------------------------- /NControl.Controls/NControl.Controls/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content; 5 | using Android.Content.PM; 6 | using Android.Runtime; 7 | using Android.Views; 8 | using Android.Widget; 9 | using Android.OS; 10 | using NControl.Controls.Droid; 11 | using Xamarin.Forms; 12 | using Xamarin.Forms.Platform.Android; 13 | 14 | namespace NControl.Controls.Demo.FormsApp.Droid 15 | { 16 | [Activity (Label = "NControl.Controls Demo", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 17 | public class MainActivity : FormsAppCompatActivity 18 | { 19 | protected override void OnCreate (Bundle bundle) 20 | { 21 | FormsAppCompatActivity.ToolbarResource = Resource.Layout.toolbar; 22 | FormsAppCompatActivity.TabLayoutResource = Resource.Layout.tabs; 23 | 24 | base.OnCreate (bundle); 25 | 26 | global::Xamarin.Forms.Forms.Init (this, bundle); 27 | NControls.Init (); 28 | 29 | LoadApplication (new MyApp ()); 30 | } 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle ("NControl.Controls.Demo.FormsApp.Droid")] 9 | [assembly: AssemblyDescription ("")] 10 | [assembly: AssemblyConfiguration ("")] 11 | [assembly: AssemblyCompany ("")] 12 | [assembly: AssemblyProduct ("")] 13 | [assembly: AssemblyCopyright ("christianfalch")] 14 | [assembly: AssemblyTrademark ("")] 15 | [assembly: AssemblyCulture ("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion ("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | 29 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/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 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/layout/tabs.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/layout/toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/values-v21/style.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 |  2 | #2196F3 3 | #1976D2 4 | #FFC107 5 | #F5F5F5 6 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/Resources/values/style.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | 11 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/ActionButtonPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class ActionButtonPage: ContentPage 7 | { 8 | private Command _command; 9 | 10 | public ActionButtonPage () 11 | { 12 | Title = "ActionButton"; 13 | BackgroundColor = Color.White; 14 | } 15 | 16 | protected override void OnAppearing () 17 | { 18 | base.OnAppearing (); 19 | 20 | var layout = new RelativeLayout (); 21 | Content = layout; 22 | 23 | var ab = new ActionButton { 24 | ButtonColor = Color.FromHex("#E91E63"), 25 | ButtonIcon = FontAwesomeLabel.FAThumbsUp, 26 | }; 27 | layout.Children.Add(ab, () => new Rectangle((layout.Width/4)-(56/2), (layout.Height/2)-(56/2), 56, 56)); 28 | 29 | var abtgl = new ToggleActionButton { 30 | ButtonColor = Color.FromHex("#FF5722"), 31 | ButtonIcon = FontAwesomeLabel.FAPlus, 32 | }; 33 | abtgl.SetBinding (IsToggledProperty, "IsToggled"); 34 | layout.Children.Add(abtgl, () => new Rectangle((layout.Width/2)-(56/2), (layout.Height/2)-(56/2), 56, 56)); 35 | 36 | _command = new Command ((obj) => {}, (obj) => abtgl.IsToggled); 37 | 38 | var playButton = new ActionButton{ 39 | ButtonColor = Color.FromHex ("#2196F3"), 40 | ButtonIcon = FontAwesomeLabel.FAPlay, 41 | Command = _command, 42 | }; 43 | 44 | var abex = new ExpandableActionButton { 45 | ButtonColor = Color.FromHex("#FF9800"), 46 | Buttons = { 47 | playButton, 48 | new ActionButton{ ButtonColor = Color.FromHex("#009688"), ButtonIcon = FontAwesomeLabel.FATag}, 49 | new ActionButton{ ButtonColor = Color.FromHex("#CDDC39"), ButtonIcon = FontAwesomeLabel.FARoad}, 50 | } 51 | }; 52 | layout.Children.Add(abex, () => new Rectangle(((layout.Width/4)*3)-(56/2), (layout.Height/2)-(200), 56, 250)); 53 | } 54 | 55 | /// 56 | /// The IsToggled property. 57 | /// 58 | public static BindableProperty IsToggledProperty = 59 | BindableProperty.Create(nameof(IsToggled), typeof(bool), typeof(ActionButtonPage), false, 60 | propertyChanged: (bindable, oldValue, newValue) => { 61 | var ctrl = (ActionButtonPage)bindable; 62 | ctrl.IsToggled = (bool)newValue; 63 | }); 64 | 65 | /// 66 | /// Gets or sets the IsToggled of the ActionButtonPage instance. 67 | /// 68 | /// The color of the buton. 69 | public bool IsToggled { 70 | get{ return (bool)GetValue (IsToggledProperty); } 71 | set { 72 | SetValue (IsToggledProperty, value); 73 | _command.ChangeCanExecute (); 74 | } 75 | } 76 | 77 | } 78 | } 79 | 80 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/BlurViewPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using Xamarin.Forms; 4 | using System.Threading.Tasks; 5 | 6 | namespace NControl.Controls.Demo.FormsApp 7 | { 8 | public class BlurViewPage: ContentPage 9 | { 10 | public BlurViewPage () 11 | { 12 | Title = "BlurView"; 13 | } 14 | 15 | protected override void OnAppearing () 16 | { 17 | base.OnAppearing (); 18 | 19 | var layout = new RelativeLayout (); 20 | Content = layout; 21 | 22 | // Add image 23 | var blurredImage = new BlurImageView { 24 | Aspect = Aspect.AspectFill, 25 | Source = ImageSource.FromStream(() => 26 | this.GetType().GetTypeInfo().Assembly.GetManifestResourceStream( 27 | "NControl.Controls.Demo.FormsApp.Resources.Images.kaffe.jpg"))}; 28 | 29 | var normalImage = new Image() 30 | { 31 | Aspect = Aspect.AspectFill, 32 | Source = ImageSource.FromStream(() => 33 | this.GetType().GetTypeInfo().Assembly.GetManifestResourceStream( 34 | "NControl.Controls.Demo.FormsApp.Resources.Images.kaffe.jpg")) 35 | }; 36 | 37 | layout.Children.Add(normalImage, () => new Rectangle(150, 240, 130, 100)); 38 | layout.Children.Add(blurredImage, () => new Rectangle(150, 100, 130, 100)); 39 | 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/CalendarPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Xamarin.Forms; 7 | 8 | namespace NControl.Controls.Demo.FormsApp 9 | { 10 | class CalendarPage : ContentPage 11 | { 12 | public CalendarPage() 13 | { 14 | Title = "Calendar"; 15 | } 16 | 17 | protected override void OnAppearing() 18 | { 19 | base.OnAppearing(); 20 | 21 | var calendar = new CalendarView { 22 | HeightRequest = 350, 23 | }; 24 | 25 | Content = new ScrollView 26 | { 27 | Content = new StackLayout 28 | { 29 | Padding = 10, 30 | HorizontalOptions = LayoutOptions.CenterAndExpand, 31 | VerticalOptions = LayoutOptions.StartAndExpand, 32 | Orientation = StackOrientation.Vertical, 33 | Children = { 34 | calendar 35 | } 36 | } 37 | }; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/CustomFontPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class CustomFontPage: ContentPage 7 | { 8 | public CustomFontPage () 9 | { 10 | Title = "Custom Font"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | Content = new StackLayout { 18 | Children = { 19 | new Label () { 20 | HeightRequest = 155, 21 | Text = "Custom Font", 22 | FontFamily = "Clink Clank", 23 | BackgroundColor = Xamarin.Forms.Color.White, 24 | HorizontalTextAlignment = Xamarin.Forms.TextAlignment.Center, 25 | VerticalTextAlignment = Xamarin.Forms.TextAlignment.Center, 26 | TextColor = Xamarin.Forms.Color.Blue, 27 | FontSize = 24, 28 | }, 29 | new Label() { 30 | HorizontalTextAlignment = Xamarin.Forms.TextAlignment.Center, 31 | VerticalTextAlignment = Xamarin.Forms.TextAlignment.Center, 32 | FontSize = 10, 33 | Text = "This font is added to the demo project as " + 34 | "an embedded resource. The font loader in " + 35 | "NControl.Controls detects all font resources and " + 36 | "makes them available without any additional work!" 37 | } 38 | } 39 | }; 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/FloatingLabelPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class FloatingLabelPage: ContentPage 7 | { 8 | public FloatingLabelPage () 9 | { 10 | Title = "FloatingLabel"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | var entry1 = new FloatingLabelControl{ Placeholder = "Email", Keyboard = Keyboard.Email }; 18 | entry1.SetBinding (FloatingLabelControl.TextProperty, "Title", BindingMode.TwoWay); 19 | entry1.BindingContext = this; 20 | entry1.Focus(); 21 | 22 | var entry2 = new FloatingLabelControl { Placeholder = "First name", Keyboard = Keyboard.Text }; 23 | var entry3 = new FloatingLabelControl { Placeholder = "Last name", Keyboard = Keyboard.Text }; 24 | var entry4 = new FloatingLabelControl{ 25 | Placeholder = "Price", 26 | Keyboard = Keyboard.Numeric, 27 | Postfix = "USD", 28 | HorizontalOptions = LayoutOptions.FillAndExpand 29 | }; 30 | 31 | var entry5 = new FloatingLabelControl{ 32 | Placeholder = "Distance", 33 | Keyboard = Keyboard.Numeric, 34 | Postfix = "Mi", 35 | HorizontalOptions = LayoutOptions.FillAndExpand 36 | }; 37 | 38 | var entry6 = new FloatingLabelControl 39 | { 40 | IsPassword = true, 41 | Placeholder = "Enter your secret", 42 | }; 43 | 44 | var entry7 = new FloatingLabelControl 45 | { 46 | Placeholder = "Enter location", 47 | PostfixIcon = FontAwesomeLabel.FAMapMarker, 48 | PostfixColor = Color.FromHex("#0000FF"), 49 | }; 50 | 51 | Content = new ScrollView{ 52 | Content = new StackLayout { 53 | Padding = 10, 54 | HorizontalOptions = LayoutOptions.CenterAndExpand, 55 | VerticalOptions = LayoutOptions.StartAndExpand, 56 | Orientation = StackOrientation.Vertical, 57 | Children = { 58 | entry1, 59 | entry2, 60 | entry3, 61 | new StackLayout{ 62 | 63 | Orientation = StackOrientation.Horizontal, 64 | HorizontalOptions = LayoutOptions.FillAndExpand, 65 | VerticalOptions = LayoutOptions.CenterAndExpand, 66 | Children = { 67 | entry4, entry5 68 | } 69 | }, 70 | entry6, 71 | entry7 72 | } 73 | } 74 | }; 75 | } 76 | } 77 | } 78 | 79 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/FontAwesomeLabelPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class FontAwesomeLabelPage: ContentPage 7 | { 8 | public FontAwesomeLabelPage () 9 | { 10 | Title = "FontAwesomeLabel"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | const int count = 0xf2e0 - 0xf000; 18 | const int colCount = 10; 19 | 20 | var rowLayout = new StackLayout() { 21 | Orientation = StackOrientation.Vertical, 22 | HorizontalOptions = LayoutOptions.FillAndExpand, 23 | VerticalOptions = LayoutOptions.FillAndExpand, 24 | }; 25 | 26 | var c = 0xf000; 27 | for (var row = 0; row < count / colCount; row++) 28 | { 29 | var colLayout = new StackLayout 30 | { 31 | Orientation = StackOrientation.Horizontal, 32 | HorizontalOptions = LayoutOptions.StartAndExpand, 33 | }; 34 | 35 | for (var col = 0; col < colCount; col++) { 36 | var label = new FontAwesomeLabel 37 | { 38 | Text = ((char) c++).ToString(), 39 | HorizontalOptions = LayoutOptions.CenterAndExpand, 40 | }; 41 | colLayout.Children.Add(label); 42 | } 43 | rowLayout.Children.Add(colLayout); 44 | } 45 | 46 | Content = new ScrollView { Margin = 14, Content = rowLayout }; 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/GalleryPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class GalleryPage: ContentPage 7 | { 8 | public GalleryPage () 9 | { 10 | Title = "GalleryView"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | var galleryView = new GalleryView { 17 | Padding = 10, 18 | BackgroundColor = Color.Gray, 19 | Children = { 20 | new Label { 21 | BackgroundColor = Color.Red, 22 | Text = "First", 23 | HorizontalTextAlignment = TextAlignment.Center, 24 | VerticalTextAlignment = TextAlignment.Center 25 | } 26 | , 27 | new Label { 28 | BackgroundColor = Color.Green, 29 | Text = "Second", 30 | HorizontalTextAlignment = TextAlignment.Center, 31 | VerticalTextAlignment = TextAlignment.Center 32 | }, 33 | new Label { 34 | BackgroundColor = Color.Aqua, 35 | Text = "Third", 36 | HorizontalTextAlignment = TextAlignment.Center, 37 | VerticalTextAlignment = TextAlignment.Center 38 | }, 39 | new Label { 40 | BackgroundColor = Color.Blue, 41 | Text = "Last", 42 | HorizontalTextAlignment = TextAlignment.Center, 43 | VerticalTextAlignment = TextAlignment.Center 44 | }, 45 | } 46 | }; 47 | 48 | galleryView.ActivatePage (galleryView.Children [1], false); 49 | 50 | Content = new StackLayout{ 51 | Padding = 8, 52 | HeightRequest = 150, 53 | VerticalOptions = LayoutOptions.CenterAndExpand, 54 | HorizontalOptions = LayoutOptions.FillAndExpand, 55 | Children = { 56 | galleryView 57 | } 58 | }; 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/MaterialDesignIconsPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class MaterialDesignIconsPage: ContentPage 7 | { 8 | public MaterialDesignIconsPage () 9 | { 10 | Title = "Material Design Icons"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | Content = new Grid { 18 | Padding = 16, 19 | Children = { 20 | new FontMaterialDesignLabel { 21 | Text = 22 | //FontMaterialDesignLabel.MD3 + " " + 23 | FontMaterialDesignLabel.MDDumbbell + " " + 24 | FontMaterialDesignLabel.MDGasStation + " " + 25 | FontMaterialDesignLabel.MDMenu 26 | } 27 | } 28 | }; 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/MyApp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NControl.Abstractions; 3 | using NGraphics; 4 | using Xamarin.Forms; 5 | using System.Reflection; 6 | using System.Linq; 7 | 8 | namespace NControl.Controls.Demo.FormsApp 9 | { 10 | public class MyApp : Application 11 | { 12 | public MyApp () 13 | { 14 | var demoPageList = new ContentPage[] { 15 | new CustomFontPage(), 16 | new MaterialDesignIconsPage(), 17 | new FontAwesomeLabelPage(), 18 | new RoundCornerViewPage(), 19 | new FloatingLabelPage(), 20 | new ActionButtonPage(), 21 | new CardPageDemo{BindingContext = new ViewModel("CardPage")}, 22 | new BlurViewPage(), 23 | new RippleButtonPage(), 24 | new GalleryPage(), 25 | new PagingViewPage(), 26 | new TabStripPage(), 27 | new SvgImagePage(), 28 | new CalendarPage(), 29 | new WizardPage(), 30 | new WizardPageXaml(), 31 | new RepeaterPage(), 32 | }; 33 | 34 | BindingContext = new ViewModel("Should say CardPage"); 35 | 36 | var listView = new ListView { 37 | ItemsSource = demoPageList, 38 | }; 39 | 40 | listView.ItemTemplate = new DataTemplate (typeof(TextCell)); 41 | listView.ItemTemplate.SetBinding (TextCell.TextProperty, "Title"); 42 | 43 | var contentLayout = new RelativeLayout (); 44 | contentLayout.Children.Add (listView, () => contentLayout.Bounds); 45 | 46 | var startPage = new ContentPage { 47 | Title = "NControl.Controls", 48 | Content = contentLayout 49 | }; 50 | 51 | listView.ItemSelected += async (sender, e) => { 52 | 53 | if(listView.SelectedItem == null) 54 | return; 55 | 56 | // Show page 57 | await startPage.Navigation.PushAsync(listView.SelectedItem as Page); 58 | }; 59 | 60 | listView.ItemTapped += (sender, e) => listView.SelectedItem = null; 61 | 62 | // The root page of your application 63 | MainPage = new NavigationPage(startPage); 64 | } 65 | 66 | protected override void OnStart () 67 | { 68 | // Handle when your app starts 69 | } 70 | 71 | protected override void OnSleep () 72 | { 73 | // Handle when your app sleeps 74 | } 75 | 76 | protected override void OnResume () 77 | { 78 | // Handle when your app resumes 79 | } 80 | } 81 | 82 | public class ViewModel 83 | { 84 | public ViewModel(string title) 85 | { 86 | Title = title; 87 | } 88 | 89 | public string Title { 90 | get; 91 | private set; 92 | } 93 | 94 | public override string ToString () 95 | { 96 | return string.Format ("[ViewModel: Title={0}]", Title); 97 | } 98 | } 99 | } 100 | 101 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/PagingViewPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class PagingViewPage: ContentPage 7 | { 8 | public PagingViewPage () 9 | { 10 | Title = "Pager"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | var pager = new PagingView { 18 | PageCount = 10, 19 | }; 20 | pager.BindingContext = this; 21 | pager.SetBinding (PagingView.PageProperty, PageProperty.PropertyName); 22 | 23 | var btn = new Button{ 24 | Text = "Count", 25 | Command = new Command((obj) => { 26 | Page++; 27 | }), 28 | }; 29 | 30 | Content = new StackLayout { 31 | Orientation = StackOrientation.Vertical, 32 | VerticalOptions = LayoutOptions.CenterAndExpand, 33 | Children = { 34 | pager, 35 | btn, 36 | new PagingView { 37 | PageCount = 5, 38 | Page = 3, 39 | IndicatorColor = Color.Blue, 40 | } 41 | } 42 | }; 43 | } 44 | 45 | /// 46 | /// The Page property. 47 | /// 48 | public static BindableProperty PageProperty = 49 | BindableProperty.Create(nameof(Page), typeof(int), typeof(PagingViewPage), 0, 50 | propertyChanged: (bindable, oldValue, newValue) => { 51 | var ctrl = (PagingViewPage)bindable; 52 | ctrl.Page = (int)newValue; 53 | }); 54 | 55 | /// 56 | /// Gets or sets the Page of the PagingViewPage instance. 57 | /// 58 | /// The color of the buton. 59 | public int Page { 60 | get{ return (int)GetValue (PageProperty); } 61 | set { SetValue (PageProperty, value); } 62 | } 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("NControl.Controls.Demo.FormsApp")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("christianfalch")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/RepeaterPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using System.Collections.ObjectModel; 4 | 5 | namespace NControl.Controls.Demo.FormsApp 6 | { 7 | public class RepeaterPage: ContentPage 8 | { 9 | public RepeaterPage () 10 | { 11 | Title = "RepeaterControl"; 12 | } 13 | 14 | protected override void OnAppearing () 15 | { 16 | base.OnAppearing (); 17 | 18 | Content = new RepeaterControl { 19 | ItemsSource = new ObservableCollection{ 20 | new ModelObject{ Name = "Test 1" }, 21 | new ModelObject{ Name = "Test 2" }, 22 | new ModelObject{ Name = "Test 3" }, 23 | new ModelObject{ Name = "Test 4" }, 24 | new ModelObject{ Name = "Test 5" }, 25 | new ModelObject{ Name = "Test 6" }, 26 | }, 27 | ItemTemplate = new DataTemplate(typeof(ModelView)), 28 | }; 29 | } 30 | } 31 | 32 | public class ModelView: Label 33 | { 34 | protected override void OnBindingContextChanged () 35 | { 36 | base.OnBindingContextChanged (); 37 | 38 | if(BindingContext != null) 39 | Text = (BindingContext as ModelObject).Name; 40 | } 41 | } 42 | 43 | public class ModelObject 44 | { 45 | public string Name {get;set;} 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Fonts/ClinkClank.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Fonts/ClinkClank.ttf -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Fonts/NeoTechStd-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Fonts/NeoTechStd-Regular.otf -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Images/kaffe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Images/kaffe.jpg -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Svg/Arrows.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Svg/Demo.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | SunAtNight 4 | Created with Sketch (http://www.bohemiancoding.com/sketch) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/Resources/Svg/Smile.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | Smile 4 | Created with Sketch (http://www.bohemiancoding.com/sketch) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/RippleButtonPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | 7 | public class RippleButtonPage: ContentPage 8 | { 9 | public RippleButtonPage () 10 | { 11 | Title = "RippleButton"; 12 | BackgroundColor = Color.White; 13 | } 14 | 15 | protected override void OnAppearing () 16 | { 17 | base.OnAppearing (); 18 | 19 | var label = new Label{ 20 | HorizontalTextAlignment = TextAlignment.Center, 21 | VerticalTextAlignment = TextAlignment.Center, 22 | InputTransparent = true, 23 | }; 24 | 25 | var i = 0; 26 | var incCommand = new Command ((obj) => { 27 | label.Text = "Count number: " + (i++).ToString(); 28 | }); 29 | 30 | var button = new RippleButton { 31 | Text = "Click me!", 32 | BorderColor = Color.Gray, 33 | BorderWidth = 2.0, 34 | CornerRadius = 22, 35 | Icon = FontAwesomeLabel.FACar, 36 | Command = incCommand 37 | }; 38 | 39 | var button2 = new RippleButton { 40 | Text = "And then click me!", 41 | BorderColor = Color.Red, 42 | BackgroundColor = Color.Aqua, 43 | BorderWidth = 4.0, 44 | CornerRadius = 4, 45 | RippleColor = Color.Blue, 46 | Command = incCommand 47 | }; 48 | 49 | var button3= new RippleButton { 50 | Text = "What about me?", 51 | Icon = FontAwesomeLabel.FATerminal, 52 | ImagePosition = ImagePosition.Top, 53 | BorderColor = Color.Gray, 54 | BorderWidth = 2.0, 55 | CornerRadius = 22, 56 | Command = incCommand 57 | }; 58 | 59 | var button4= new RippleButton { 60 | Text = "Yup?", 61 | Icon = FontAwesomeLabel.FAHome, 62 | ImagePosition = ImagePosition.Top, 63 | BorderColor = Color.Gray, 64 | BorderWidth = 2.0, 65 | CornerRadius = 22, 66 | Command = incCommand 67 | }; 68 | 69 | var layout = new RelativeLayout (); 70 | layout.Children.Add (button, () => new Rectangle (50, 20, layout.Width - 100, 44)); 71 | layout.Children.Add (button2, () => new Rectangle (50, 80, layout.Width - 100, 44)); 72 | layout.Children.Add (button3, () => new Rectangle (20, 160, layout.Width - 200, 150)); 73 | layout.Children.Add (button4, () => new Rectangle (210, 190, 120, 75)); 74 | layout.Children.Add (label, () => new Rectangle (10, 300, layout.Width - 20, 40)); 75 | 76 | // In stack layout 77 | var stack = new StackLayout { 78 | Children = { 79 | new RippleButton { 80 | Text = "Mega?", 81 | Icon = FontAwesomeLabel.FAHome, 82 | ImagePosition = ImagePosition.Right, 83 | BorderColor = Color.Gray, 84 | BorderWidth = 2.0, 85 | CornerRadius = 22, 86 | Command = incCommand 87 | } 88 | } 89 | }; 90 | 91 | layout.Children.Add (stack, () => new Rectangle (0, 360, layout.Width, 40)); 92 | 93 | Content = layout; 94 | } 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/RoundCornerViewPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class RoundCornerViewPage: ContentPage 7 | { 8 | public RoundCornerViewPage () 9 | { 10 | Title = "RoundCornerView"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | var layout = new RelativeLayout (); 18 | 19 | var border1 = new RoundCornerView { 20 | BackgroundColor = Color.Red, 21 | CornerRadius = 34, 22 | BorderColor = Color.Yellow, 23 | BorderWidth = 18, 24 | }; 25 | 26 | var border2 = new RoundCornerView { 27 | BackgroundColor = Color.Blue, 28 | CornerRadius = 14, 29 | }; 30 | 31 | var border3 = new RoundCornerView { 32 | BackgroundColor = Color.Green, 33 | CornerRadius = 12, 34 | BorderColor = Color.Red, 35 | BorderWidth = 4, 36 | }; 37 | 38 | var border4 = new RoundCornerView { 39 | BackgroundColor = Color.Yellow, 40 | CornerRadius = 42, 41 | }; 42 | 43 | var shape = new BoxView { BackgroundColor = Color.Aqua }; 44 | var shapeLayout = new RelativeLayout(); 45 | shapeLayout.Children.Add(shape, () => new Rectangle(-50, -30, 100, 100)); 46 | border1.Content = shapeLayout; 47 | 48 | layout.Children.Add (border1, () => new Rectangle (10, 10, (layout.Width / 2) - 20, (layout.Height / 2) - 20)); 49 | layout.Children.Add (border2, () => new Rectangle ((layout.Width / 2) + 10, 10, (layout.Width / 2) - 20, (layout.Height / 2) - 20)); 50 | layout.Children.Add (border3, () => new Rectangle (10, (layout.Height / 2) + 10, (layout.Width / 2) - 20, (layout.Height / 2) - 20)); 51 | layout.Children.Add (border4, () => new Rectangle ((layout.Width / 2) + 10, (layout.Height / 2) + 10, (layout.Width / 2) - 20, (layout.Height / 2) - 20)); 52 | 53 | Content = layout; 54 | } 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/SvgImagePage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using System.Reflection; 4 | 5 | namespace NControl.Controls.Demo.FormsApp 6 | { 7 | 8 | public class SvgImagePage: ContentPage 9 | { 10 | public SvgImagePage () 11 | { 12 | Title = "SvgImage"; 13 | } 14 | 15 | protected override void OnAppearing () 16 | { 17 | base.OnAppearing (); 18 | 19 | Content = new ScrollView{ 20 | Content = new StackLayout{ 21 | Orientation = StackOrientation.Vertical, 22 | Children = { 23 | new StackLayout{ 24 | Padding = 50, 25 | Orientation = StackOrientation.Vertical, 26 | Children = { 27 | new SvgImage{ 28 | SvgAssembly = this.GetType().GetTypeInfo().Assembly, 29 | SvgResource = "NControl.Controls.Demo.FormsApp.Resources.Svg.Demo.svg", 30 | }, 31 | } 32 | }, 33 | new StackLayout{ 34 | Padding = 4, 35 | BackgroundColor = Color.Aqua, 36 | Spacing = 4, 37 | HeightRequest = 200, 38 | Orientation = StackOrientation.Horizontal, 39 | Children = { 40 | new SvgImage{ 41 | SvgAssemblyType = this.GetType(), 42 | SvgResource = "NControl.Controls.Demo.FormsApp.Resources.Svg.Smile.svg", 43 | }, 44 | new SvgImage{ 45 | SvgAssembly = this.GetType().GetTypeInfo().Assembly, 46 | SvgResource = "NControl.Controls.Demo.FormsApp.Resources.Svg.Arrows.svg", 47 | }, 48 | } 49 | }, 50 | new StackLayout{ 51 | Padding = 50, 52 | Orientation = StackOrientation.Vertical, 53 | Children = { 54 | new ContentView{ 55 | HeightRequest = 100, 56 | BackgroundColor = Color.Red, 57 | HorizontalOptions = LayoutOptions.Center, 58 | Padding = 2, 59 | Content = 60 | new SvgImage{ 61 | WidthRequest = 100, 62 | VerticalOptions = LayoutOptions.Center, 63 | SvgAssembly = this.GetType().GetTypeInfo().Assembly, 64 | SvgResource = "NControl.Controls.Demo.FormsApp.Resources.Svg.SpaceShips.svg", 65 | } 66 | }, 67 | new ContentView{ 68 | WidthRequest = 100, 69 | BackgroundColor = Color.Yellow, 70 | HorizontalOptions = LayoutOptions.Center, 71 | Padding = 2, 72 | Content = 73 | new SvgImage{ 74 | WidthRequest = 100, 75 | SvgAssembly = this.GetType().GetTypeInfo().Assembly, 76 | SvgResource = "NControl.Controls.Demo.FormsApp.Resources.Svg.SpaceShips.svg", 77 | } 78 | } 79 | } 80 | }, 81 | } 82 | } 83 | }; 84 | } 85 | } 86 | } 87 | 88 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/TabStripPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class TabStripPage: ContentPage 7 | { 8 | public TabStripPage () 9 | { 10 | Title = "TabStrip"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | Content = new TabStripControl { 18 | Children = { 19 | new TabItem ("test 1", GetTabPage (Color.Green)), 20 | new TabItem ("test 2", GetTabPage (Color.Red)), 21 | new TabItem ("test 3", GetTabPage (Color.Blue)) 22 | }, 23 | }; 24 | } 25 | 26 | View GetTabPage (Color clr) 27 | { 28 | var retVal = new StackLayout { 29 | BackgroundColor = clr, 30 | Children = { 31 | new RippleButton{ 32 | Text = "Tastelisten 12 234 345 ", 33 | BorderWidth = 4, 34 | BorderColor = Color.Aqua, 35 | CornerRadius = 4, 36 | HeightRequest = 55, 37 | } 38 | } 39 | }; 40 | 41 | return retVal; 42 | } 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/WizardPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace NControl.Controls.Demo.FormsApp 5 | { 6 | public class WizardPage: ContentPage 7 | { 8 | public WizardPage () 9 | { 10 | Title = "WizardLayout"; 11 | } 12 | 13 | protected override void OnAppearing () 14 | { 15 | base.OnAppearing (); 16 | 17 | WizardLayout wizard = null; 18 | wizard = new WizardLayout { 19 | Pages = { 20 | new Button { 21 | Command = new Command((obj)=>wizard.Page++), 22 | Text = "Page 2", 23 | }, 24 | 25 | new Button { 26 | Command = new Command((obj)=>wizard.Page++), 27 | Text = "Page 3", 28 | }, 29 | 30 | new Button { 31 | Command = new Command((obj)=>wizard.Page++), 32 | Text = "Page 4", 33 | }, 34 | 35 | new Button { 36 | Text = "Done", 37 | } 38 | } 39 | }; 40 | 41 | Content = wizard; 42 | } 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/WizardPageXaml.xaml: -------------------------------------------------------------------------------- 1 |  2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/WizardPageXaml.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using Xamarin.Forms; 5 | 6 | namespace NControl.Controls.Demo.FormsApp 7 | { 8 | public partial class WizardPageXaml : ContentPage 9 | { 10 | public WizardPageXaml() 11 | { 12 | InitializeComponent(); 13 | Title = "WizardLayout XAML"; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/NControl.Controls.Demo.FormsApp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/App.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Assets/AlignmentGrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Assets/AlignmentGrid.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Assets/ApplicationIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Assets/ApplicationIcon.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Assets/Tiles/FlipCycleTileLarge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Assets/Tiles/FlipCycleTileLarge.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Assets/Tiles/FlipCycleTileMedium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Assets/Tiles/FlipCycleTileMedium.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Assets/Tiles/FlipCycleTileSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Assets/Tiles/FlipCycleTileSmall.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Assets/Tiles/IconicTileMediumLarge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Assets/Tiles/IconicTileMediumLarge.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Assets/Tiles/IconicTileSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Assets/Tiles/IconicTileSmall.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/LocalizedStrings.cs: -------------------------------------------------------------------------------- 1 | using NControl.Controls.Demo.FormsApp.WP80.Resources; 2 | 3 | namespace NControl.Controls.Demo.FormsApp.WP80 4 | { 5 | /// 6 | /// Provides access to string resources. 7 | /// 8 | public class LocalizedStrings 9 | { 10 | private static AppResources _localizedResources = new AppResources(); 11 | 12 | public AppResources LocalizedResources { get { return _localizedResources; } } 13 | } 14 | } -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Phone.Controls; 2 | using NControl.Controls.WP80; 3 | using NControl.WP80; 4 | using Xamarin.Forms; 5 | 6 | namespace NControl.Controls.Demo.FormsApp.WP80 7 | { 8 | public partial class MainPage 9 | { 10 | // Constructor 11 | public MainPage() 12 | { 13 | InitializeComponent(); 14 | 15 | Forms.Init(); 16 | NControlViewRenderer.Init(); 17 | NControls.Init(); 18 | 19 | LoadApplication(new FormsApp.MyApp()); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Properties/AppManifest.xml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Resources; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("WP80")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("WP80")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | [assembly: Guid("be5c5dfc-424b-4a9c-8d03-15b0ef62f0b4")] 25 | 26 | // Version information for an assembly consists of the following four values: 27 | // 28 | // Major Version 29 | // Minor Version 30 | // Build Number 31 | // Revision 32 | // 33 | // You can specify all the values or you can default the Revision and Build Numbers 34 | // by using the '*' as shown below: 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | [assembly: NeutralResourcesLanguageAttribute("en-US")] 38 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Properties/WMAppManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Assets\ApplicationIcon.png 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Assets\Tiles\FlipCycleTileSmall.png 21 | 0 22 | Assets\Tiles\FlipCycleTileMedium.png 23 | WP80 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Resources/AppResources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace NControl.Controls.Demo.FormsApp.WP80.Resources { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public class AppResources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal AppResources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | public static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NControl.Controls.Demo.FormsApp.WP80.Resources.AppResources", typeof(AppResources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to add. 65 | /// 66 | public static string AppBarButtonText { 67 | get { 68 | return ResourceManager.GetString("AppBarButtonText", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to Menu Item. 74 | /// 75 | public static string AppBarMenuItemText { 76 | get { 77 | return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// Looks up a localized string similar to MY APPLICATION. 83 | /// 84 | public static string ApplicationTitle { 85 | get { 86 | return ResourceManager.GetString("ApplicationTitle", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// Looks up a localized string similar to LeftToRight. 92 | /// 93 | public static string ResourceFlowDirection { 94 | get { 95 | return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// Looks up a localized string similar to en-US. 101 | /// 102 | public static string ResourceLanguage { 103 | get { 104 | return ResourceManager.GetString("ResourceLanguage", resourceCulture); 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Add.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Cancel.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Check.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Delete.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP80/Toolkit.Content/ApplicationBar.Select.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP80/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/AlignmentGrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/AlignmentGrid.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/ApplicationIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/ApplicationIcon.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/BadgeLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/BadgeLogo.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/Logo.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/SplashScreen.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/SquareTile150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/SquareTile150x150.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/SquareTile71x71.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/SquareTile71x71.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/StoreLogo.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/Tiles/FlipCycleTileLarge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/Tiles/FlipCycleTileLarge.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/Tiles/FlipCycleTileMedium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/Tiles/FlipCycleTileMedium.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/Tiles/FlipCycleTileSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/Tiles/FlipCycleTileSmall.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/Tiles/IconicTileMediumLarge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/Tiles/IconicTileMediumLarge.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/Tiles/IconicTileSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/Tiles/IconicTileSmall.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Assets/WideLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Assets/WideLogo.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Phone.Controls; 2 | using NControl.Controls.WP81; 3 | using NControl.WP81; 4 | using Xamarin.Forms; 5 | using Xamarin.Forms.Platform.WinPhone; 6 | 7 | namespace NControl.Controls.Demo.FormsApp.WP81 8 | { 9 | public partial class MainPage 10 | { 11 | public MainPage() 12 | { 13 | InitializeComponent(); 14 | 15 | SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape; 16 | 17 | Forms.Init(); 18 | NControlViewRenderer.Init(); 19 | NControls.Init(); 20 | 21 | LoadApplication(new FormsApp.MyApp()); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 13 | 14 | 15 | WP81 16 | christianfalch 17 | Assets\StoreLogo.png 18 | 19 | 20 | 21 | 6.3.1 22 | 6.3.1 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | AgHostSvcs.dll 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Properties/AppManifest.xml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Resources; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("WP81")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("WP81")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | [assembly: Guid("632d2901-09eb-4984-9463-ae095979b4e4")] 25 | 26 | // Version information for an assembly consists of the following four values: 27 | // 28 | // Major Version 29 | // Minor Version 30 | // Build Number 31 | // Revision 32 | // 33 | // You can specify all the values or you can default the Revision and Build Numbers 34 | // by using the '*' as shown below: 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | [assembly: NeutralResourcesLanguageAttribute("en-US")] 38 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Properties/WMAppManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Assets\ApplicationIcon.png 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Assets\Tiles\FlipCycleTileSmall.png 21 | 0 22 | Assets\Tiles\FlipCycleTileMedium.png 23 | WP81 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Resources/AppResources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace NControl.Controls.Demo.FormsApp.WP81.Resources { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public class AppResources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal AppResources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | public static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NControl.Controls.Demo.FormsApp.WP81.Resources.AppResources", typeof(AppResources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to add. 65 | /// 66 | public static string AppBarButtonText { 67 | get { 68 | return ResourceManager.GetString("AppBarButtonText", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to Menu Item. 74 | /// 75 | public static string AppBarMenuItemText { 76 | get { 77 | return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// Looks up a localized string similar to MY APPLICATION. 83 | /// 84 | public static string ApplicationTitle { 85 | get { 86 | return ResourceManager.GetString("ApplicationTitle", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// Looks up a localized string similar to LeftToRight. 92 | /// 93 | public static string ResourceFlowDirection { 94 | get { 95 | return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// Looks up a localized string similar to en-US. 101 | /// 102 | public static string ResourceLanguage { 103 | get { 104 | return ResourceManager.GetString("ResourceLanguage", resourceCulture); 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Add.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Cancel.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Check.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Delete.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/WP81/Toolkit.Content/ApplicationBar.Select.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/WP81/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using NControl.Controls.iOS; 3 | using UIKit; 4 | 5 | namespace NControl.Controls.Demo.FormsApp.iOS 6 | { 7 | [Register ("AppDelegate")] 8 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 9 | { 10 | public override bool FinishedLaunching (UIApplication app, NSDictionary options) 11 | { 12 | global::Xamarin.Forms.Forms.Init (); 13 | NControls.Init (); 14 | 15 | LoadApplication (new MyApp ()); 16 | 17 | return base.FinishedLaunching (app, options); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/ITunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/ITunesArtwork -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/ITunesArtwork@2x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/ITunesArtwork@2x -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | NControl.Controls.Demo.FormsApp.iOS 7 | CFBundleIdentifier 8 | com.cf.NControl.Controls.Demo.FormsApp.iOS 9 | CFBundleShortVersionString 10 | 1.0 11 | CFBundleVersion 12 | 1.0 13 | LSRequiresIPhoneOS 14 | 15 | MinimumOSVersion 16 | 7.0 17 | UIDeviceFamily 18 | 19 | 1 20 | 2 21 | 22 | UIRequiredDeviceCapabilities 23 | 24 | armv7 25 | 26 | UISupportedInterfaceOrientations 27 | 28 | UIInterfaceOrientationPortrait 29 | UIInterfaceOrientationLandscapeLeft 30 | UIInterfaceOrientationLandscapeRight 31 | 32 | UISupportedInterfaceOrientations~ipad 33 | 34 | UIInterfaceOrientationPortrait 35 | UIInterfaceOrientationPortraitUpsideDown 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | CFBundleIconFiles 40 | 41 | Icon-60@2x 42 | Icon-60@3x 43 | Icon-76 44 | Icon-76@2x 45 | Default 46 | Default@2x 47 | Default-568h 48 | Default-568h@2x 49 | Default-Landscape 50 | Default-Landscape@2x 51 | Default-Portrait 52 | Default-Portrait@2x 53 | Icon-Small-40 54 | Icon-Small-40@2x 55 | Icon-Small-40@3x 56 | Icon-Small 57 | Icon-Small@2x 58 | Icon-Small@3x 59 | 60 | UILaunchStoryboardName 61 | LaunchScreen 62 | 63 | 64 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace NControl.Controls.Demo.FormsApp.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main (string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main (args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Default.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-60@2x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-60@3x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-76.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-76@2x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-Small-40.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-Small.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-Small@2x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrfalch/NControl.Controls/370bb0a5dfe505d68a3f4b191249f7b34e942215/NControl.ControlsDemo/iOS/Resources/Icon-Small@3x.png -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /NControl.ControlsDemo/iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NControl.Controls 2 | Sample Control implementations using the [NControl](https://github.com/chrfalch/NControl) library. Implementations for iOS/Android/Windows Phone 8/8.1 is included. 3 | 4 | ## Initialization 5 | 6 | Call ```NControls.Init ()``` in your app startup code. 7 | 8 | ## Controls 9 | Some of this controls are just conceptual demos of things that can be accomplished with NControl and Xamarin.Forms. Other controls are complete. 10 | 11 | ### SvgImage 12 | Control that can read svg files using the SvgReader class found in NGraphics. The control handles resizing and redrawing within Xamarin.Forms. Uses embedded resources for svg files. To load an svg file, set the SvgAssemblyType property to a type defined in the assembly where the svg file is embedded, and provide the full resouce path for the embedded svg file to the SvgResource property. 13 | 14 | *Thanks to Veridit As for sponsorship* 15 | 16 | ### BlurImageView (conceptual) 17 | Simple but full implementation of a Xamarin.Forms Image that blurs the image. 18 | 19 | ### CalendarView (conceptual) 20 | Simple calendar view. 21 | 22 | ### CardPage 23 | Popup in Xamarin.Forms with full support for view models, page and content. 24 | 25 | ### FloatingLabel 26 | Fully implemented floating label from [Brad Frost's Floating Label concept](http://bradfrost.com/blog/post/float-label-pattern/). 27 | 28 | ### RoundCornerView 29 | Implements a content view with round corners and correct clipping on all platforms. 30 | 31 | ### FontAwesomeLabel 32 | Label with constants for FontAwesome icons 33 | 34 | ### FontMaterialDesignLabel 35 | Label with constnats for Material design icons. 36 | 37 | ### GalleryView (conceptual) 38 | Container view with snapping and sliding. 39 | 40 | ### PagingView 41 | Page control based on the iOS paging control. 42 | 43 | ### RippleButton (conceptual) 44 | Material design based button with ripple effect. 45 | 46 | ### ActionButton (conceptual) 47 | Material design based action button 48 | 49 | ### ToggleActionButton (conceptual) 50 | Material design based action button with toggle support 51 | 52 | ### ExpandableActionButton (conceptual) 53 | Material design based action button with expanding sub buttons. 54 | 55 | ### TabStripControl 56 | Fully implemented TabControl. 57 | --------------------------------------------------------------------------------