├── .gitignore ├── ExtendedSegmentedTabControl.Android ├── Assets │ └── AboutAssets.txt ├── ExtendedSegmentedTabControl.Android.csproj ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs └── Resources │ ├── AboutResources.txt │ ├── Resource.designer.cs │ ├── layout │ ├── Tabbar.xml │ └── Toolbar.xml │ ├── mipmap-anydpi-v26 │ ├── icon.xml │ └── icon_round.xml │ ├── mipmap-hdpi │ ├── icon.png │ └── launcher_foreground.png │ ├── mipmap-mdpi │ ├── icon.png │ └── launcher_foreground.png │ ├── mipmap-xhdpi │ ├── icon.png │ └── launcher_foreground.png │ ├── mipmap-xxhdpi │ ├── icon.png │ └── launcher_foreground.png │ ├── mipmap-xxxhdpi │ ├── icon.png │ └── launcher_foreground.png │ └── values │ ├── colors.xml │ └── styles.xml ├── ExtendedSegmentedTabControl.iOS ├── AppDelegate.cs ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon1024.png │ │ ├── Icon120.png │ │ ├── Icon152.png │ │ ├── Icon167.png │ │ ├── Icon180.png │ │ ├── Icon20.png │ │ ├── Icon29.png │ │ ├── Icon40.png │ │ ├── Icon58.png │ │ ├── Icon60.png │ │ ├── Icon76.png │ │ ├── Icon80.png │ │ └── Icon87.png ├── Entitlements.plist ├── ExtendedSegmentedTabControl.iOS.csproj ├── Info.plist ├── Main.cs ├── Properties │ └── AssemblyInfo.cs └── Resources │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ └── LaunchScreen.storyboard ├── ExtendedSegmentedTabControl.sln ├── ExtendedSegmentedTabControl ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── Controls │ └── SegmentedControl.cs ├── ExtendedSegmentedTabControl.csproj ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── Models │ └── TabOption.cs ├── ViewModels │ └── MainPageViewModel.cs └── Views │ ├── MainPage.xaml │ └── MainPage.xaml.cs ├── LICENSE ├── README.md └── sample.gif /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/ExtendedSegmentedTabControl.Android.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62} 7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | {c9e5eea5-ca05-42a1-839b-61506e0a37df} 9 | Library 10 | ExtendedSegmentedTabControl.Droid 11 | ExtendedSegmentedTabControl.Android 12 | True 13 | Resources\Resource.designer.cs 14 | Resource 15 | Properties\AndroidManifest.xml 16 | Resources 17 | Assets 18 | v9.0 19 | true 20 | true 21 | Xamarin.Android.Net.AndroidClientHandler 22 | 23 | 24 | 25 | 26 | true 27 | portable 28 | false 29 | bin\Debug 30 | DEBUG; 31 | prompt 32 | 4 33 | None 34 | 35 | 36 | true 37 | portable 38 | true 39 | bin\Release 40 | prompt 41 | 4 42 | true 43 | false 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF} 92 | ExtendedSegmentedTabControl 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content.PM; 5 | using Android.Runtime; 6 | using Android.Views; 7 | using Android.Widget; 8 | using Android.OS; 9 | 10 | namespace ExtendedSegmentedTabControl.Droid 11 | { 12 | [Activity(Label = "ExtendedSegmentedTabControl", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 14 | { 15 | protected override void OnCreate(Bundle savedInstanceState) 16 | { 17 | TabLayoutResource = Resource.Layout.Tabbar; 18 | ToolbarResource = Resource.Layout.Toolbar; 19 | 20 | base.OnCreate(savedInstanceState); 21 | 22 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState); 23 | LoadApplication(new App()); 24 | } 25 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) 26 | { 27 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ExtendedSegmentedTabControl.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("ExtendedSegmentedTabControl.Android")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | 32 | // Add some common permissions, these can be removed if not needed 33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 35 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/layout/Tabbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/layout/Toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-anydpi-v26/icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-anydpi-v26/icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-hdpi/icon.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-hdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-hdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-mdpi/icon.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-mdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-mdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-xhdpi/icon.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-xhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-xhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-xxhdpi/icon.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-xxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-xxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-xxxhdpi/icon.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #3F51B5 5 | #303F9F 6 | #FF4081 7 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 24 | 27 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ExtendedSegmentedTabControl.iOS 9 | { 10 | // The UIApplicationDelegate for the application. This class is responsible for launching the 11 | // User Interface of the application, as well as listening (and optionally responding) to 12 | // application events from iOS. 13 | [Register("AppDelegate")] 14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 15 | { 16 | // 17 | // This method is invoked when the application has loaded and is ready to run. In this 18 | // method you should instantiate the window, load the UI into it and then make the window 19 | // visible. 20 | // 21 | // You have 17 seconds to return from this method, or iOS will terminate your application. 22 | // 23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 24 | { 25 | global::Xamarin.Forms.Forms.Init(); 26 | LoadApplication(new App()); 27 | 28 | return base.FinishedLaunching(app, options); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "scale": "2x", 5 | "size": "20x20", 6 | "idiom": "iphone", 7 | "filename": "Icon40.png" 8 | }, 9 | { 10 | "scale": "3x", 11 | "size": "20x20", 12 | "idiom": "iphone", 13 | "filename": "Icon60.png" 14 | }, 15 | { 16 | "scale": "2x", 17 | "size": "29x29", 18 | "idiom": "iphone", 19 | "filename": "Icon58.png" 20 | }, 21 | { 22 | "scale": "3x", 23 | "size": "29x29", 24 | "idiom": "iphone", 25 | "filename": "Icon87.png" 26 | }, 27 | { 28 | "scale": "2x", 29 | "size": "40x40", 30 | "idiom": "iphone", 31 | "filename": "Icon80.png" 32 | }, 33 | { 34 | "scale": "3x", 35 | "size": "40x40", 36 | "idiom": "iphone", 37 | "filename": "Icon120.png" 38 | }, 39 | { 40 | "scale": "2x", 41 | "size": "60x60", 42 | "idiom": "iphone", 43 | "filename": "Icon120.png" 44 | }, 45 | { 46 | "scale": "3x", 47 | "size": "60x60", 48 | "idiom": "iphone", 49 | "filename": "Icon180.png" 50 | }, 51 | { 52 | "scale": "1x", 53 | "size": "20x20", 54 | "idiom": "ipad", 55 | "filename": "Icon20.png" 56 | }, 57 | { 58 | "scale": "2x", 59 | "size": "20x20", 60 | "idiom": "ipad", 61 | "filename": "Icon40.png" 62 | }, 63 | { 64 | "scale": "1x", 65 | "size": "29x29", 66 | "idiom": "ipad", 67 | "filename": "Icon29.png" 68 | }, 69 | { 70 | "scale": "2x", 71 | "size": "29x29", 72 | "idiom": "ipad", 73 | "filename": "Icon58.png" 74 | }, 75 | { 76 | "scale": "1x", 77 | "size": "40x40", 78 | "idiom": "ipad", 79 | "filename": "Icon40.png" 80 | }, 81 | { 82 | "scale": "2x", 83 | "size": "40x40", 84 | "idiom": "ipad", 85 | "filename": "Icon80.png" 86 | }, 87 | { 88 | "scale": "1x", 89 | "size": "76x76", 90 | "idiom": "ipad", 91 | "filename": "Icon76.png" 92 | }, 93 | { 94 | "scale": "2x", 95 | "size": "76x76", 96 | "idiom": "ipad", 97 | "filename": "Icon152.png" 98 | }, 99 | { 100 | "scale": "2x", 101 | "size": "83.5x83.5", 102 | "idiom": "ipad", 103 | "filename": "Icon167.png" 104 | }, 105 | { 106 | "scale": "1x", 107 | "size": "1024x1024", 108 | "idiom": "ios-marketing", 109 | "filename": "Icon1024.png" 110 | } 111 | ], 112 | "properties": {}, 113 | "info": { 114 | "version": 1, 115 | "author": "xcode" 116 | } 117 | } -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/ExtendedSegmentedTabControl.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | 8.0.30703 7 | 2.0 8 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | {6143fdea-f3c2-4a09-aafa-6e230626515e} 11 | Exe 12 | ExtendedSegmentedTabControl.iOS 13 | Resources 14 | ExtendedSegmentedTabControl.iOS 15 | true 16 | NSUrlSessionHandler 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\iPhoneSimulator\Debug 23 | DEBUG 24 | prompt 25 | 4 26 | x86_64 27 | None 28 | true 29 | 30 | 31 | none 32 | true 33 | bin\iPhoneSimulator\Release 34 | prompt 35 | 4 36 | None 37 | x86_64 38 | 39 | 40 | true 41 | full 42 | false 43 | bin\iPhone\Debug 44 | DEBUG 45 | prompt 46 | 4 47 | ARM64 48 | iPhone Developer 49 | true 50 | Entitlements.plist 51 | 52 | 53 | none 54 | true 55 | bin\iPhone\Release 56 | prompt 57 | 4 58 | ARM64 59 | iPhone Developer 60 | Entitlements.plist 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | false 73 | 74 | 75 | false 76 | 77 | 78 | false 79 | 80 | 81 | false 82 | 83 | 84 | false 85 | 86 | 87 | false 88 | 89 | 90 | false 91 | 92 | 93 | false 94 | 95 | 96 | false 97 | 98 | 99 | false 100 | 101 | 102 | false 103 | 104 | 105 | false 106 | 107 | 108 | false 109 | 110 | 111 | false 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF} 129 | ExtendedSegmentedTabControl 130 | 131 | 132 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 8.0 25 | CFBundleDisplayName 26 | ExtendedSegmentedTabControl 27 | CFBundleIdentifier 28 | com.crossgeeks.ExtendedSegmentedTabControl 29 | CFBundleVersion 30 | 1.0 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | CFBundleName 34 | ExtendedSegmentedTabControl 35 | XSAppIconAssets 36 | Assets.xcassets/AppIcon.appiconset 37 | 38 | 39 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.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 ExtendedSegmentedTabControl.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 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ExtendedSegmentedTabControl.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ExtendedSegmentedTabControl.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Resources/Default.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/ExtendedSegmentedTabControl.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.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 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedSegmentedTabControl.Android", "ExtendedSegmentedTabControl.Android\ExtendedSegmentedTabControl.Android.csproj", "{B19F1EA8-2DBA-4831-85A4-82D867ABFC62}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedSegmentedTabControl.iOS", "ExtendedSegmentedTabControl.iOS\ExtendedSegmentedTabControl.iOS.csproj", "{FF5906DC-68D1-409B-8D8F-83F08CE78B5B}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedSegmentedTabControl", "ExtendedSegmentedTabControl\ExtendedSegmentedTabControl.csproj", "{FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 15 | Release|iPhoneSimulator = Release|iPhoneSimulator 16 | Debug|iPhone = Debug|iPhone 17 | Release|iPhone = Release|iPhone 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 25 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 26 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 27 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 28 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Debug|iPhone.ActiveCfg = Debug|Any CPU 29 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Debug|iPhone.Build.0 = Debug|Any CPU 30 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Release|iPhone.ActiveCfg = Release|Any CPU 31 | {B19F1EA8-2DBA-4831-85A4-82D867ABFC62}.Release|iPhone.Build.0 = Release|Any CPU 32 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator 33 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator 34 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator 35 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator 36 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 37 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 38 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 39 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 40 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Debug|iPhone.ActiveCfg = Debug|iPhone 41 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Debug|iPhone.Build.0 = Debug|iPhone 42 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Release|iPhone.ActiveCfg = Release|iPhone 43 | {FF5906DC-68D1-409B-8D8F-83F08CE78B5B}.Release|iPhone.Build.0 = Release|iPhone 44 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 45 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Debug|Any CPU.Build.0 = Debug|Any CPU 46 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Release|Any CPU.ActiveCfg = Release|Any CPU 47 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Release|Any CPU.Build.0 = Release|Any CPU 48 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 49 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 50 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 51 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 52 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Debug|iPhone.ActiveCfg = Debug|Any CPU 53 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Debug|iPhone.Build.0 = Debug|Any CPU 54 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Release|iPhone.ActiveCfg = Release|Any CPU 55 | {FA1C9F4E-6029-4F94-A248-E320E9D0A3FF}.Release|iPhone.Build.0 = Release|Any CPU 56 | EndGlobalSection 57 | EndGlobal 58 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using Xamarin.Forms.Xaml; 4 | 5 | namespace ExtendedSegmentedTabControl 6 | { 7 | public partial class App : Application 8 | { 9 | public App() 10 | { 11 | InitializeComponent(); 12 | 13 | MainPage = new MainPage(); 14 | } 15 | 16 | protected override void OnStart() 17 | { 18 | // Handle when your app starts 19 | } 20 | 21 | protected override void OnSleep() 22 | { 23 | // Handle when your app sleeps 24 | } 25 | 26 | protected override void OnResume() 27 | { 28 | // Handle when your app resumes 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms.Xaml; 2 | 3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)] -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/Controls/SegmentedControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.Specialized; 4 | using System.Linq; 5 | using Xamarin.Forms; 6 | using System.Collections; 7 | using System.Reflection; 8 | using System.Windows.Input; 9 | 10 | namespace ExtendedSegmentedTabControl.Controls 11 | { 12 | public class SegmentedControl : ContentView 13 | { 14 | public static readonly BindableProperty ItemSelectedProperty = BindableProperty.Create(nameof(ItemSelected), typeof(object), typeof(SegmentedControl), null, BindingMode.TwoWay, propertyChanged: (bindable, oldValue, newValue) => OnItemSelectedChanged(bindable, oldValue, newValue)); 15 | public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create(nameof(ItemsSource), typeof(IEnumerable), typeof(SegmentedControl), new List(), propertyChanged: (bindable, oldValue, newValue) => OnItemsSourceChanged(bindable, oldValue, newValue)); 16 | public static readonly BindableProperty SelectionIndicatorProperty = BindableProperty.Create(nameof(SelectionIndicator), typeof(string), typeof(SegmentedControl), string.Empty); 17 | public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create(nameof(ItemTemplate), typeof(DataTemplate), typeof(SegmentedControl), default(DataTemplate)); 18 | public static readonly BindableProperty SelectedItemChangedCommandProperty = BindableProperty.Create(nameof(SelectedItemChangedCommand), typeof(Command), typeof(SegmentedControl), default(Command), BindingMode.TwoWay, null, SelectedItemChangedCommandPropertyChanged); 19 | 20 | public IEnumerable ItemsSource 21 | { 22 | get 23 | { 24 | return (IEnumerable)GetValue(ItemsSourceProperty); 25 | } 26 | set 27 | { 28 | SetValue(ItemsSourceProperty, value); 29 | } 30 | } 31 | 32 | public object ItemSelected 33 | { 34 | get 35 | { 36 | return (object)GetValue(ItemSelectedProperty); 37 | } 38 | set 39 | { 40 | SetValue(ItemSelectedProperty, value); 41 | 42 | } 43 | } 44 | 45 | 46 | public string SelectionIndicator 47 | { 48 | get 49 | { 50 | return (string)GetValue(SelectionIndicatorProperty); 51 | } 52 | set 53 | { 54 | SetValue(SelectionIndicatorProperty, value); 55 | 56 | } 57 | } 58 | 59 | static void SelectedItemChangedCommandPropertyChanged(BindableObject bindable, object oldValue, object newValue) 60 | { 61 | var source = bindable as SegmentedControl; 62 | if (source == null) 63 | { 64 | return; 65 | } 66 | source.SelectedItemChangedCommandChanged(); 67 | } 68 | 69 | private void SelectedItemChangedCommandChanged() 70 | { 71 | OnPropertyChanged("SelectedItemChangedCommand"); 72 | } 73 | 74 | public Command SelectedItemChangedCommand 75 | { 76 | get 77 | { 78 | return (Command)GetValue(SelectedItemChangedCommandProperty); 79 | } 80 | set 81 | { 82 | SetValue(SelectedItemChangedCommandProperty, value); 83 | } 84 | } 85 | public delegate void SelectedItemChangedEventHandler(object sender, SelectedItemChangedEventArgs e); 86 | public event SelectedItemChangedEventHandler SelectedItemChanged; 87 | 88 | public DataTemplate ItemTemplate 89 | { 90 | get { return (DataTemplate)GetValue(ItemTemplateProperty); } 91 | set { SetValue(ItemTemplateProperty, value); } 92 | } 93 | static void OnItemSelectedChanged(BindableObject bindable, object oldValue, object newValue) 94 | { 95 | var tabbedView = bindable as SegmentedControl; 96 | 97 | tabbedView.SelectedItemChanged?.Invoke(tabbedView, new SelectedItemChangedEventArgs(newValue)); 98 | tabbedView.SelectedItemChangedCommand?.Execute(newValue); 99 | if (!string.IsNullOrEmpty(tabbedView.SelectionIndicator) && newValue != null) 100 | { 101 | foreach (object obj in tabbedView.ItemsSource) 102 | { 103 | var prop = obj.GetType().GetRuntimeProperties().FirstOrDefault(p => string.Equals(p.Name, tabbedView.SelectionIndicator, StringComparison.OrdinalIgnoreCase)); 104 | if (prop != null) 105 | { 106 | prop.SetValue(obj, obj.Equals(newValue)); 107 | } 108 | } 109 | } 110 | 111 | } 112 | static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue) 113 | { 114 | var tabbedView = bindable as SegmentedControl; 115 | var scrollView = (tabbedView.Content as ScrollView); 116 | var innerStackLayout = scrollView.Content as StackLayout; 117 | 118 | void newValueINotifyCollectionChanged_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) 119 | { 120 | if (e.Action == NotifyCollectionChangedAction.Reset) 121 | { 122 | innerStackLayout.Children.Clear(); 123 | scrollView.ScrollToAsync(0, 0, false); 124 | return; 125 | } 126 | 127 | 128 | if (e.OldItems != null) 129 | foreach (var item in e.OldItems) 130 | innerStackLayout.Children.Remove(item as View); 131 | 132 | 133 | if (e.NewItems != null) 134 | foreach (var item in e.NewItems) 135 | { 136 | if (!innerStackLayout.Children.Any(prop => prop.BindingContext == item)) 137 | { 138 | var element = tabbedView.CreateNewItem(item); 139 | innerStackLayout.Children.Add(element); 140 | } 141 | 142 | } 143 | 144 | } 145 | 146 | var oldValueINotifyCollectionChanged = oldValue as INotifyCollectionChanged; 147 | 148 | if (null != oldValueINotifyCollectionChanged) 149 | { 150 | oldValueINotifyCollectionChanged.CollectionChanged -= newValueINotifyCollectionChanged_CollectionChanged; 151 | } 152 | 153 | var newValueINotifyCollectionChanged = newValue as INotifyCollectionChanged; 154 | 155 | if (null != newValueINotifyCollectionChanged) 156 | { 157 | newValueINotifyCollectionChanged.CollectionChanged -= newValueINotifyCollectionChanged_CollectionChanged; 158 | newValueINotifyCollectionChanged.CollectionChanged += newValueINotifyCollectionChanged_CollectionChanged; 159 | } 160 | else 161 | { 162 | innerStackLayout.Children.Clear(); 163 | IEnumerable items = (IEnumerable)newValue; 164 | 165 | if (items.Any()) 166 | { 167 | foreach (var item in items) 168 | { 169 | innerStackLayout.Children.Add(tabbedView.CreateNewItem(item)); 170 | } 171 | 172 | if (tabbedView.ItemSelected == null) 173 | tabbedView.ItemSelected = items.FirstOrNull(); 174 | } 175 | } 176 | } 177 | 178 | public ICommand TapCommand => new Command(OnTap); 179 | void OnTap(object val) 180 | { 181 | ItemSelected = val; 182 | } 183 | 184 | protected virtual View CreateNewItem(object item) 185 | { 186 | View view = null; 187 | if (ItemTemplate != null) 188 | { 189 | var content = ItemTemplate.CreateContent(); 190 | view = (content is View) ? content as View : ((ViewCell)content).View; 191 | 192 | view.BindingContext = item; 193 | 194 | if (TapCommand != null) 195 | { 196 | view.GestureRecognizers.Add(new TapGestureRecognizer { Command = TapCommand, CommandParameter = item }); 197 | } 198 | } 199 | return view; 200 | } 201 | 202 | StackLayout _mainContentLayout = new StackLayout() { Spacing = 10, Orientation = StackOrientation.Horizontal }; 203 | ScrollView _mainLayout = new ScrollView() { HorizontalScrollBarVisibility = ScrollBarVisibility.Never, VerticalOptions = LayoutOptions.Start, Orientation = ScrollOrientation.Horizontal }; 204 | 205 | public SegmentedControl() 206 | { 207 | _mainLayout.Content = _mainContentLayout; 208 | Content = _mainLayout; 209 | Padding = new Thickness(0, 10, 0, 0); 210 | } 211 | } 212 | 213 | /// 214 | /// Extension methods for . 215 | /// 216 | public static class NonGenericEnumerableExtensions 217 | { 218 | public static bool Any(this IEnumerable source) 219 | { 220 | foreach (var item in source) 221 | { 222 | return true; 223 | } 224 | 225 | return false; 226 | } 227 | 228 | public static object FirstOrNull(this IEnumerable source) 229 | { 230 | if (source != null) 231 | { 232 | foreach (var item in source) 233 | { 234 | return item; 235 | } 236 | } 237 | 238 | return null; 239 | } 240 | } 241 | 242 | } -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/ExtendedSegmentedTabControl.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/FodyWeavers.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Used to control if the On_PropertyName_Changed feature is enabled. 12 | 13 | 14 | 15 | 16 | Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form. 17 | 18 | 19 | 20 | 21 | Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project. 22 | 23 | 24 | 25 | 26 | Used to control if equality checks should use the Equals method resolved from the base class. 27 | 28 | 29 | 30 | 31 | Used to control if equality checks should use the static Equals method resolved from the base class. 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. 40 | 41 | 42 | 43 | 44 | A comma-separated list of error codes that can be safely ignored in assembly verification. 45 | 46 | 47 | 48 | 49 | 'false' to turn off automatic generation of the XML Schema file. 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/Models/TabOption.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace ExtendedSegmentedTabControl.Models 4 | { 5 | public class TabOption: INotifyPropertyChanged 6 | { 7 | public string Name { get; set; } 8 | public bool IsSelected { get; set; } 9 | 10 | public event PropertyChangedEventHandler PropertyChanged; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/ViewModels/MainPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ExtendedSegmentedTabControl.Models; 3 | 4 | namespace ExtendedSegmentedTabControl 5 | { 6 | public class MainPageViewModel 7 | { 8 | public List TabOptions { get; set; } 9 | public MainPageViewModel() 10 | { 11 | TabOptions=new List() 12 | { 13 | {new TabOption(){ Name="Invertebrates"} }, 14 | {new TabOption(){ Name="Fish"} }, 15 | {new TabOption(){ Name="Amphibians"} }, 16 | {new TabOption(){ Name="Reptiles"} }, 17 | {new TabOption(){ Name="Birds"} }, 18 | {new TabOption(){ Name="Mammals"} } 19 | }; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/Views/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 9 | 10 | 14 | 15 | 16 | 19 | 20 | 33 | 34 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 54 | -------------------------------------------------------------------------------- /ExtendedSegmentedTabControl/Views/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using Xamarin.Forms; 3 | 4 | namespace ExtendedSegmentedTabControl 5 | { 6 | [DesignTimeVisible(false)] 7 | public partial class MainPage : ContentPage 8 | { 9 | public MainPage() 10 | { 11 | InitializeComponent(); 12 | BindingContext = new MainPageViewModel(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 CrossGeeks 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Extended Segmented TabControl 2 | 3 | 4 |

5 | 6 |

7 | 8 | 9 | Blog post: http://www.xamboy.com/2019/11/27/extended-segmented-tab-control-for-xamarin-forms/ 10 | -------------------------------------------------------------------------------- /sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ExtendedSegmentedTabControl/8266c31da00ae1a4bb08ffcf1b6de97d43ff44dc/sample.gif --------------------------------------------------------------------------------