├── .gitignore
├── LICENSE
├── README.md
├── Sample
└── TabViewSample
│ ├── TabViewSample.sln
│ └── TabViewSample
│ ├── TabViewSample.Android
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.designer.cs
│ │ ├── drawable
│ │ │ ├── icon.png
│ │ │ └── monkey.png
│ │ ├── 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
│ └── TabViewSample.Android.csproj
│ ├── TabViewSample.UWP
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── LargeTile.scale-100.png
│ │ ├── LargeTile.scale-200.png
│ │ ├── LargeTile.scale-400.png
│ │ ├── SmallTile.scale-100.png
│ │ ├── SmallTile.scale-200.png
│ │ ├── SmallTile.scale-400.png
│ │ ├── SplashScreen.scale-100.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── SplashScreen.scale-400.png
│ │ ├── Square150x150Logo.scale-100.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square150x150Logo.scale-400.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ │ ├── Square44x44Logo.scale-100.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-400.png
│ │ ├── Square44x44Logo.targetsize-16.png
│ │ ├── Square44x44Logo.targetsize-256.png
│ │ ├── Square44x44Logo.targetsize-48.png
│ │ ├── StoreLogo.backup.png
│ │ ├── StoreLogo.scale-100.png
│ │ ├── StoreLogo.scale-200.png
│ │ ├── StoreLogo.scale-400.png
│ │ ├── Wide310x150Logo.scale-100.png
│ │ ├── Wide310x150Logo.scale-200.png
│ │ └── Wide310x150Logo.scale-400.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── TabViewSample.UWP.csproj
│ ├── icon.png
│ └── monkey.png
│ ├── TabViewSample.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
│ ├── 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
│ │ ├── icon.png
│ │ └── monkey.png
│ └── TabViewSample.iOS.csproj
│ └── TabViewSample
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Pages
│ ├── ItemSourceSamplePage.xaml
│ ├── ItemSourceSamplePage.xaml.cs
│ ├── TemplatedItemSourceSamplePage.xaml
│ └── TemplatedItemSourceSamplePage.xaml.cs
│ ├── TabViewSample.csproj
│ └── ViewModels
│ └── TemplatedItemSourceSamplePageViewModel.cs
└── Xam.Plugin.TabView
├── Converters
├── DoubleToLayoutOptionsConverter.cs
├── NullToBoolConverter.cs
└── SelectedTabHeaderToTabBackgroundColorConverter.cs
├── ITabViewControlTabItem.cs
├── ObservableBase.cs
├── TabItem.cs
├── Xam.Plugin.TabView.cs
├── Xam.Plugin.TabView.csproj
└── Xam.Plugin.TabView.nuspec
/.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 | *.pch
68 | *.pdb
69 | *.pgc
70 | *.pgd
71 | *.rsp
72 | *.sbr
73 | *.tlb
74 | *.tli
75 | *.tlh
76 | *.tmp
77 | *.tmp_proj
78 | *.log
79 | *.vspscc
80 | *.vssscc
81 | .builds
82 | *.pidb
83 | *.svclog
84 | *.scc
85 |
86 | # Chutzpah Test files
87 | _Chutzpah*
88 |
89 | # Visual C++ cache files
90 | ipch/
91 | *.aps
92 | *.ncb
93 | *.opendb
94 | *.opensdf
95 | *.sdf
96 | *.cachefile
97 | *.VC.db
98 | *.VC.VC.opendb
99 |
100 | # Visual Studio profiler
101 | *.psess
102 | *.vsp
103 | *.vspx
104 | *.sap
105 |
106 | # Visual Studio Trace Files
107 | *.e2e
108 |
109 | # TFS 2012 Local Workspace
110 | $tf/
111 |
112 | # Guidance Automation Toolkit
113 | *.gpState
114 |
115 | # ReSharper is a .NET coding add-in
116 | _ReSharper*/
117 | *.[Rr]e[Ss]harper
118 | *.DotSettings.user
119 |
120 | # JustCode is a .NET coding add-in
121 | .JustCode
122 |
123 | # TeamCity is a build add-in
124 | _TeamCity*
125 |
126 | # DotCover is a Code Coverage Tool
127 | *.dotCover
128 |
129 | # AxoCover is a Code Coverage Tool
130 | .axoCover/*
131 | !.axoCover/settings.json
132 |
133 | # Visual Studio code coverage results
134 | *.coverage
135 | *.coveragexml
136 |
137 | # NCrunch
138 | _NCrunch_*
139 | .*crunch*.local.xml
140 | nCrunchTemp_*
141 |
142 | # MightyMoose
143 | *.mm.*
144 | AutoTest.Net/
145 |
146 | # Web workbench (sass)
147 | .sass-cache/
148 |
149 | # Installshield output folder
150 | [Ee]xpress/
151 |
152 | # DocProject is a documentation generator add-in
153 | DocProject/buildhelp/
154 | DocProject/Help/*.HxT
155 | DocProject/Help/*.HxC
156 | DocProject/Help/*.hhc
157 | DocProject/Help/*.hhk
158 | DocProject/Help/*.hhp
159 | DocProject/Help/Html2
160 | DocProject/Help/html
161 |
162 | # Click-Once directory
163 | publish/
164 |
165 | # Publish Web Output
166 | *.[Pp]ublish.xml
167 | *.azurePubxml
168 | # Note: Comment the next line if you want to checkin your web deploy settings,
169 | # but database connection strings (with potential passwords) will be unencrypted
170 | *.pubxml
171 | *.publishproj
172 |
173 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
174 | # checkin your Azure Web App publish settings, but sensitive information contained
175 | # in these scripts will be unencrypted
176 | PublishScripts/
177 |
178 | # NuGet Packages
179 | *.nupkg
180 | # The packages folder can be ignored because of Package Restore
181 | **/[Pp]ackages/*
182 | # except build/, which is used as an MSBuild target.
183 | !**/[Pp]ackages/build/
184 | # Uncomment if necessary however generally it will be regenerated when needed
185 | #!**/[Pp]ackages/repositories.config
186 | # NuGet v3's project.json files produces more ignorable files
187 | *.nuget.props
188 | *.nuget.targets
189 |
190 | # Microsoft Azure Build Output
191 | csx/
192 | *.build.csdef
193 |
194 | # Microsoft Azure Emulator
195 | ecf/
196 | rcf/
197 |
198 | # Windows Store app package directories and files
199 | AppPackages/
200 | BundleArtifacts/
201 | Package.StoreAssociation.xml
202 | _pkginfo.txt
203 | *.appx
204 |
205 | # Visual Studio cache files
206 | # files ending in .cache can be ignored
207 | *.[Cc]ache
208 | # but keep track of directories ending in .cache
209 | !*.[Cc]ache/
210 |
211 | # Others
212 | ClientBin/
213 | ~$*
214 | *~
215 | *.dbmdl
216 | *.dbproj.schemaview
217 | *.jfm
218 | *.pfx
219 | *.publishsettings
220 | orleans.codegen.cs
221 |
222 | # Including strong name files can present a security risk
223 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
224 | #*.snk
225 |
226 | # Since there are multiple workflows, uncomment next line to ignore bower_components
227 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
228 | #bower_components/
229 |
230 | # RIA/Silverlight projects
231 | Generated_Code/
232 |
233 | # Backup & report files from converting an old project file
234 | # to a newer Visual Studio version. Backup files are not needed,
235 | # because we have git ;-)
236 | _UpgradeReport_Files/
237 | Backup*/
238 | UpgradeLog*.XML
239 | UpgradeLog*.htm
240 | ServiceFabricBackup/
241 |
242 | # SQL Server files
243 | *.mdf
244 | *.ldf
245 | *.ndf
246 |
247 | # Business Intelligence projects
248 | *.rdl.data
249 | *.bim.layout
250 | *.bim_*.settings
251 |
252 | # Microsoft Fakes
253 | FakesAssemblies/
254 |
255 | # GhostDoc plugin setting file
256 | *.GhostDoc.xml
257 |
258 | # Node.js Tools for Visual Studio
259 | .ntvs_analysis.dat
260 | node_modules/
261 |
262 | # TypeScript v1 declaration files
263 | typings/
264 |
265 | # Visual Studio 6 build log
266 | *.plg
267 |
268 | # Visual Studio 6 workspace options file
269 | *.opt
270 |
271 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
272 | *.vbw
273 |
274 | # Visual Studio LightSwitch build output
275 | **/*.HTMLClient/GeneratedArtifacts
276 | **/*.DesktopClient/GeneratedArtifacts
277 | **/*.DesktopClient/ModelManifest.xml
278 | **/*.Server/GeneratedArtifacts
279 | **/*.Server/ModelManifest.xml
280 | _Pvt_Extensions
281 |
282 | # Paket dependency manager
283 | .paket/paket.exe
284 | paket-files/
285 |
286 | # FAKE - F# Make
287 | .fake/
288 |
289 | # JetBrains Rider
290 | .idea/
291 | *.sln.iml
292 |
293 | # CodeRush
294 | .cr/
295 |
296 | # Python Tools for Visual Studio (PTVS)
297 | __pycache__/
298 | *.pyc
299 |
300 | # Cake - Uncomment if you are using it
301 | # tools/**
302 | # !tools/packages.config
303 |
304 | # Tabs Studio
305 | *.tss
306 |
307 | # Telerik's JustMock configuration file
308 | *.jmconfig
309 |
310 | # BizTalk build output
311 | *.btp.cs
312 | *.btm.cs
313 | *.odx.cs
314 | *.xsd.cs
315 |
316 | # OpenCover UI analysis results
317 | OpenCover/
318 |
319 | # Azure Stream Analytics local run output
320 | ASALocalRun/
321 |
322 | # MSBuild Binary and Structured Log
323 | *.binlog
324 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 chaosifier
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 | # TabView
2 | TabView control for Xamarin.Forms.
3 | Requires CarouselView plugin.
4 |
5 | Also available on NuGet : https://www.nuget.org/packages/Xam.Plugin.TabView [](https://www.nuget.org/packages/Xam.Plugin.TabView)
6 |
7 | Make sure to initialize the CarouselView plugin first before using TabView.
8 | To do so, in your iOS and Android projects call:
9 |
10 | ```
11 | Xamarin.Forms.Init();
12 | CarouselViewRenderer.Init();
13 | ```
14 |
15 | And in your UWP project call:
16 |
17 | ```
18 | List assembliesToInclude = new List();
19 | assembliesToInclude.Add(typeof(CarouselViewRenderer).GetTypeInfo().Assembly);
20 | Xamarin.Forms.Forms.Init(e, assembliesToInclude);
21 | ```
22 |
23 | Bindable properties:
24 | - HeaderBackgroundColor
25 | - HeaderTabTextColor
26 | - ContentHeight
27 | - HeaderSelectionUnderlineColor
28 | - HeaderSelectionUnderlineThickness
29 | - HeaderSelectionUnderlineWidth
30 | - HeaderTabTextFontSize
31 | - HeaderTabTextFontFamily
32 | - HeaderTabTextFontAttributes
33 | - IsSwipeEnabled
34 | - TabHeaderSpacing
35 | - ItemSource (Collection of TabItem)
36 | - TemplatedItemSource (Collection of ITabViewControlTabItem)
37 | - ItemTemplate (works along with TemplatedItemSource)
38 | - TabHeaderItemTemplate (works along with TemplatedItemSource)
39 | - SelectedTabIndex
40 | - TabSizeOption (Sets tab header sizing strategy. Accepts GridLength, namely : Auto, *, some fix width value)
41 |
42 |
43 | Note :
44 | - ItemSource and TemplatedItemSource cannot be used together.
45 | - TabHeaderItemTemplate only works along with TemplatedItemSource.
46 | - TemplatedItemSource items must implement ITabViewControlTabItem
47 | - ITabViewControlTabItem interface members :
48 | - TabViewControlTabItemFocus() : called when tab receives focus, could be used for lazy loading of data in each tab.
49 | - TabViewControlTabItemIconSource : icon to set for the tab
50 | - TabViewControlTabItemTitle : title to set for the tab
51 |
52 |
53 | Events:
54 | - OnPositionChanging
55 | - OnPositionChanged
56 |
57 |
58 | Functions:
59 | - SetPosition
60 | - SelectNext
61 | - SelectPrevious
62 | - SelectLast
63 | - AddTab
64 | - RemoveTab
65 |
66 | Screenshots:
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30011.22
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabViewSample.UWP", "TabViewSample\TabViewSample.UWP\TabViewSample.UWP.csproj", "{8877FCD4-24C0-4A08-9F4B-04768E884789}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabViewSample.Android", "TabViewSample\TabViewSample.Android\TabViewSample.Android.csproj", "{14B2D6BE-C125-4202-A265-2159814FA54E}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabViewSample.iOS", "TabViewSample\TabViewSample.iOS\TabViewSample.iOS.csproj", "{25D89702-E965-4DD6-8CFE-01A8496AC4AE}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabViewSample", "TabViewSample\TabViewSample\TabViewSample.csproj", "{D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}"
13 | EndProject
14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xam.Plugin.TabView", "..\..\Xam.Plugin.TabView\Xam.Plugin.TabView.csproj", "{B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Debug|ARM = Debug|ARM
20 | Debug|iPhone = Debug|iPhone
21 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
22 | Debug|x64 = Debug|x64
23 | Debug|x86 = Debug|x86
24 | Release|Any CPU = Release|Any CPU
25 | Release|ARM = Release|ARM
26 | Release|iPhone = Release|iPhone
27 | Release|iPhoneSimulator = Release|iPhoneSimulator
28 | Release|x64 = Release|x64
29 | Release|x86 = Release|x86
30 | EndGlobalSection
31 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
32 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|Any CPU.ActiveCfg = Debug|x86
33 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|Any CPU.Build.0 = Debug|x86
34 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|Any CPU.Deploy.0 = Debug|x86
35 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|ARM.ActiveCfg = Debug|ARM
36 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|ARM.Build.0 = Debug|ARM
37 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|ARM.Deploy.0 = Debug|ARM
38 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|iPhone.ActiveCfg = Debug|x86
39 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|iPhone.Build.0 = Debug|x86
40 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|iPhone.Deploy.0 = Debug|x86
41 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
42 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|iPhoneSimulator.Build.0 = Debug|x86
43 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86
44 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|x64.ActiveCfg = Debug|x64
45 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|x64.Build.0 = Debug|x64
46 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|x64.Deploy.0 = Debug|x64
47 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|x86.ActiveCfg = Debug|x86
48 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|x86.Build.0 = Debug|x86
49 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Debug|x86.Deploy.0 = Debug|x86
50 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|Any CPU.ActiveCfg = Release|x86
51 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|Any CPU.Build.0 = Release|x86
52 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|Any CPU.Deploy.0 = Release|x86
53 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|ARM.ActiveCfg = Release|ARM
54 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|ARM.Build.0 = Release|ARM
55 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|ARM.Deploy.0 = Release|ARM
56 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|iPhone.ActiveCfg = Release|x86
57 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|iPhone.Build.0 = Release|x86
58 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|iPhone.Deploy.0 = Release|x86
59 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|iPhoneSimulator.ActiveCfg = Release|x86
60 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|iPhoneSimulator.Build.0 = Release|x86
61 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|iPhoneSimulator.Deploy.0 = Release|x86
62 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|x64.ActiveCfg = Release|x64
63 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|x64.Build.0 = Release|x64
64 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|x64.Deploy.0 = Release|x64
65 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|x86.ActiveCfg = Release|x86
66 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|x86.Build.0 = Release|x86
67 | {8877FCD4-24C0-4A08-9F4B-04768E884789}.Release|x86.Deploy.0 = Release|x86
68 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|Any CPU.Build.0 = Debug|Any CPU
70 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
71 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|ARM.ActiveCfg = Debug|Any CPU
72 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|ARM.Build.0 = Debug|Any CPU
73 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|ARM.Deploy.0 = Debug|Any CPU
74 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
75 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|iPhone.Build.0 = Debug|Any CPU
76 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|iPhone.Deploy.0 = Debug|Any CPU
77 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
78 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
79 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
80 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|x64.ActiveCfg = Debug|Any CPU
81 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|x64.Build.0 = Debug|Any CPU
82 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|x64.Deploy.0 = Debug|Any CPU
83 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|x86.ActiveCfg = Debug|Any CPU
84 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|x86.Build.0 = Debug|Any CPU
85 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Debug|x86.Deploy.0 = Debug|Any CPU
86 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|Any CPU.ActiveCfg = Release|Any CPU
87 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|Any CPU.Build.0 = Release|Any CPU
88 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|Any CPU.Deploy.0 = Release|Any CPU
89 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|ARM.ActiveCfg = Release|Any CPU
90 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|ARM.Build.0 = Release|Any CPU
91 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|ARM.Deploy.0 = Release|Any CPU
92 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|iPhone.ActiveCfg = Release|Any CPU
93 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|iPhone.Build.0 = Release|Any CPU
94 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|iPhone.Deploy.0 = Release|Any CPU
95 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
96 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
97 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
98 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|x64.ActiveCfg = Release|Any CPU
99 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|x64.Build.0 = Release|Any CPU
100 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|x64.Deploy.0 = Release|Any CPU
101 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|x86.ActiveCfg = Release|Any CPU
102 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|x86.Build.0 = Release|Any CPU
103 | {14B2D6BE-C125-4202-A265-2159814FA54E}.Release|x86.Deploy.0 = Release|Any CPU
104 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|Any CPU.ActiveCfg = Debug|iPhone
105 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|Any CPU.Build.0 = Debug|iPhone
106 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|Any CPU.Deploy.0 = Debug|iPhone
107 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|ARM.ActiveCfg = Debug|iPhone
108 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|ARM.Build.0 = Debug|iPhone
109 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|ARM.Deploy.0 = Debug|iPhone
110 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|iPhone.ActiveCfg = Debug|iPhone
111 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|iPhone.Build.0 = Debug|iPhone
112 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|iPhone.Deploy.0 = Debug|iPhone
113 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
114 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
115 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|iPhoneSimulator.Deploy.0 = Debug|iPhoneSimulator
116 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|x64.ActiveCfg = Debug|iPhone
117 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|x64.Build.0 = Debug|iPhone
118 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|x64.Deploy.0 = Debug|iPhone
119 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|x86.ActiveCfg = Debug|iPhone
120 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|x86.Build.0 = Debug|iPhone
121 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Debug|x86.Deploy.0 = Debug|iPhone
122 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|Any CPU.ActiveCfg = Release|iPhone
123 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|Any CPU.Build.0 = Release|iPhone
124 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|Any CPU.Deploy.0 = Release|iPhone
125 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|ARM.ActiveCfg = Release|iPhone
126 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|ARM.Build.0 = Release|iPhone
127 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|ARM.Deploy.0 = Release|iPhone
128 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|iPhone.ActiveCfg = Release|iPhone
129 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|iPhone.Build.0 = Release|iPhone
130 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|iPhone.Deploy.0 = Release|iPhone
131 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
132 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
133 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|iPhoneSimulator.Deploy.0 = Release|iPhoneSimulator
134 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|x64.ActiveCfg = Release|iPhone
135 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|x64.Build.0 = Release|iPhone
136 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|x64.Deploy.0 = Release|iPhone
137 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|x86.ActiveCfg = Release|iPhone
138 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|x86.Build.0 = Release|iPhone
139 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}.Release|x86.Deploy.0 = Release|iPhone
140 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
141 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|Any CPU.Build.0 = Debug|Any CPU
142 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
143 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|ARM.ActiveCfg = Debug|Any CPU
144 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|ARM.Build.0 = Debug|Any CPU
145 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|ARM.Deploy.0 = Debug|Any CPU
146 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
147 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|iPhone.Build.0 = Debug|Any CPU
148 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|iPhone.Deploy.0 = Debug|Any CPU
149 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
150 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
151 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
152 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|x64.ActiveCfg = Debug|Any CPU
153 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|x64.Build.0 = Debug|Any CPU
154 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|x64.Deploy.0 = Debug|Any CPU
155 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|x86.ActiveCfg = Debug|Any CPU
156 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|x86.Build.0 = Debug|Any CPU
157 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Debug|x86.Deploy.0 = Debug|Any CPU
158 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|Any CPU.ActiveCfg = Release|Any CPU
159 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|Any CPU.Build.0 = Release|Any CPU
160 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|Any CPU.Deploy.0 = Release|Any CPU
161 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|ARM.ActiveCfg = Release|Any CPU
162 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|ARM.Build.0 = Release|Any CPU
163 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|ARM.Deploy.0 = Release|Any CPU
164 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|iPhone.ActiveCfg = Release|Any CPU
165 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|iPhone.Build.0 = Release|Any CPU
166 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|iPhone.Deploy.0 = Release|Any CPU
167 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
168 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
169 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
170 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|x64.ActiveCfg = Release|Any CPU
171 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|x64.Build.0 = Release|Any CPU
172 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|x64.Deploy.0 = Release|Any CPU
173 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|x86.ActiveCfg = Release|Any CPU
174 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|x86.Build.0 = Release|Any CPU
175 | {D209D4A0-B1DE-4A5A-BF6E-7E25E647927F}.Release|x86.Deploy.0 = Release|Any CPU
176 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
177 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|Any CPU.Build.0 = Debug|Any CPU
178 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|ARM.ActiveCfg = Debug|Any CPU
179 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|ARM.Build.0 = Debug|Any CPU
180 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|iPhone.ActiveCfg = Debug|Any CPU
181 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|iPhone.Build.0 = Debug|Any CPU
182 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
183 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
184 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|x64.ActiveCfg = Debug|Any CPU
185 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|x64.Build.0 = Debug|Any CPU
186 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|x86.ActiveCfg = Debug|Any CPU
187 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Debug|x86.Build.0 = Debug|Any CPU
188 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|Any CPU.ActiveCfg = Release|Any CPU
189 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|Any CPU.Build.0 = Release|Any CPU
190 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|ARM.ActiveCfg = Release|Any CPU
191 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|ARM.Build.0 = Release|Any CPU
192 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|iPhone.ActiveCfg = Release|Any CPU
193 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|iPhone.Build.0 = Release|Any CPU
194 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
195 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
196 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|x64.ActiveCfg = Release|Any CPU
197 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|x64.Build.0 = Release|Any CPU
198 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|x86.ActiveCfg = Release|Any CPU
199 | {B7594B1B-49A7-4CA8-B3AB-F84DDC56D154}.Release|x86.Build.0 = Release|Any CPU
200 | EndGlobalSection
201 | GlobalSection(SolutionProperties) = preSolution
202 | HideSolutionNode = FALSE
203 | EndGlobalSection
204 | GlobalSection(ExtensibilityGlobals) = postSolution
205 | SolutionGuid = {94983876-E0D9-4168-B139-5D7A215B5532}
206 | EndGlobalSection
207 | EndGlobal
208 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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 | using CarouselView.FormsPlugin.Android;
10 |
11 | namespace TabViewSample.Droid
12 | {
13 | [Activity(Label = "TabViewSample", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
14 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
15 | {
16 | protected override void OnCreate(Bundle savedInstanceState)
17 | {
18 | TabLayoutResource = Resource.Layout.Tabbar;
19 | ToolbarResource = Resource.Layout.Toolbar;
20 |
21 | base.OnCreate(savedInstanceState);
22 |
23 | Xamarin.Essentials.Platform.Init(this, savedInstanceState);
24 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
25 |
26 | CarouselViewRenderer.Init();
27 |
28 | LoadApplication(new App());
29 | }
30 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
31 | {
32 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
33 |
34 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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("TabViewSample.Android")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("TabViewSample.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 | [assembly: AssemblyVersion("1.0.0.0")]
26 | [assembly: AssemblyFileVersion("1.0.0.0")]
27 |
28 | // Add some common permissions, these can be removed if not needed
29 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
30 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
31 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/drawable/monkey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/drawable/monkey.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/layout/Tabbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/layout/Toolbar.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-hdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-hdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-mdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-mdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #3F51B5
5 | #303F9F
6 | #FF4081
7 |
8 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
26 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.Android/TabViewSample.Android.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {14B2D6BE-C125-4202-A265-2159814FA54E}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | {c9e5eea5-ca05-42a1-839b-61506e0a37df}
9 | Library
10 | TabViewSample.Droid
11 | TabViewSample.Android
12 | True
13 | True
14 | Resources\Resource.designer.cs
15 | Resource
16 | Properties\AndroidManifest.xml
17 | Resources
18 | Assets
19 | false
20 | v9.0
21 | true
22 | true
23 | Xamarin.Android.Net.AndroidClientHandler
24 |
25 |
26 |
27 |
28 | true
29 | portable
30 | false
31 | bin\Debug
32 | DEBUG;
33 | prompt
34 | 4
35 | None
36 |
37 |
38 | true
39 | portable
40 | true
41 | bin\Release
42 | prompt
43 | 4
44 | true
45 | false
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 5.2.0
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 |
92 |
93 |
94 | {C4B1BE4B-CC8B-4F8F-B8E7-40CB59B1F518}
95 | TabViewSample
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using CarouselView.FormsPlugin.UWP;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Reflection;
7 | using System.Runtime.InteropServices.WindowsRuntime;
8 | using Windows.ApplicationModel;
9 | using Windows.ApplicationModel.Activation;
10 | using Windows.Foundation;
11 | using Windows.Foundation.Collections;
12 | using Windows.UI.Xaml;
13 | using Windows.UI.Xaml.Controls;
14 | using Windows.UI.Xaml.Controls.Primitives;
15 | using Windows.UI.Xaml.Data;
16 | using Windows.UI.Xaml.Input;
17 | using Windows.UI.Xaml.Media;
18 | using Windows.UI.Xaml.Navigation;
19 |
20 | namespace TabViewSample.UWP
21 | {
22 | ///
23 | /// Provides application-specific behavior to supplement the default Application class.
24 | ///
25 | sealed partial class App : Application
26 | {
27 | ///
28 | /// Initializes the singleton application object. This is the first line of authored code
29 | /// executed, and as such is the logical equivalent of main() or WinMain().
30 | ///
31 | public App()
32 | {
33 | this.InitializeComponent();
34 | this.Suspending += OnSuspending;
35 | }
36 |
37 | ///
38 | /// Invoked when the application is launched normally by the end user. Other entry points
39 | /// will be used such as when the application is launched to open a specific file.
40 | ///
41 | /// Details about the launch request and process.
42 | protected override void OnLaunched(LaunchActivatedEventArgs e)
43 | {
44 |
45 |
46 | Frame rootFrame = Window.Current.Content as Frame;
47 |
48 | // Do not repeat app initialization when the Window already has content,
49 | // just ensure that the window is active
50 | if (rootFrame == null)
51 | {
52 | // Create a Frame to act as the navigation context and navigate to the first page
53 | rootFrame = new Frame();
54 |
55 | rootFrame.NavigationFailed += OnNavigationFailed;
56 |
57 | List assembliesToInclude = new List();
58 | assembliesToInclude.Add(typeof(CarouselViewRenderer).GetTypeInfo().Assembly);
59 |
60 | Xamarin.Forms.Forms.Init(e);
61 |
62 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
63 | {
64 | //TODO: Load state from previously suspended application
65 | }
66 |
67 | // Place the frame in the current Window
68 | Window.Current.Content = rootFrame;
69 | }
70 |
71 | if (rootFrame.Content == null)
72 | {
73 | // When the navigation stack isn't restored navigate to the first page,
74 | // configuring the new page by passing required information as a navigation
75 | // parameter
76 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
77 | }
78 | // Ensure the current window is active
79 | Window.Current.Activate();
80 | }
81 |
82 | ///
83 | /// Invoked when Navigation to a certain page fails
84 | ///
85 | /// The Frame which failed navigation
86 | /// Details about the navigation failure
87 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
88 | {
89 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
90 | }
91 |
92 | ///
93 | /// Invoked when application execution is being suspended. Application state is saved
94 | /// without knowing whether the application will be terminated or resumed with the contents
95 | /// of memory still intact.
96 | ///
97 | /// The source of the suspend request.
98 | /// Details about the suspend request.
99 | private void OnSuspending(object sender, SuspendingEventArgs e)
100 | {
101 | var deferral = e.SuspendingOperation.GetDeferral();
102 | //TODO: Save application state and stop any background activity
103 | deferral.Complete();
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/LargeTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/LargeTile.scale-400.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.backup.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace TabViewSample.UWP
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | LoadApplication(new TabViewSample.App());
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | TabViewSample.UWP
18 | 3240529c-a14e-42f6-a52a-b4e4f6419db7
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/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("TabViewSample.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("TabViewSample.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/TabViewSample.UWP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {8877FCD4-24C0-4A08-9F4B-04768E884789}
8 | AppContainerExe
9 | Properties
10 | TabViewSample.UWP
11 | TabViewSample.UWP
12 | en-US
13 | UAP
14 | 10.0.16299.0
15 | 10.0.16299.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | false
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 | App.xaml
94 |
95 |
96 | MainPage.xaml
97 |
98 |
99 |
100 |
101 |
102 | Designer
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 | MSBuild:Compile
140 | Designer
141 |
142 |
143 | MSBuild:Compile
144 | Designer
145 |
146 |
147 |
148 |
149 | 5.2.0
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 | {C4B1BE4B-CC8B-4F8F-B8E7-40CB59B1F518}
158 | TabViewSample
159 |
160 |
161 |
162 | 14.0
163 |
164 |
165 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/monkey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.UWP/monkey.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using CarouselView.FormsPlugin.iOS;
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace TabViewSample.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 |
27 | CarouselViewRenderer.Init();
28 |
29 | LoadApplication(new App());
30 |
31 | return base.FinishedLaunching(app, options);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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 | }
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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 | TabViewSample
27 | CFBundleIdentifier
28 | com.companyname.TabViewSample
29 | CFBundleVersion
30 | 1.0
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | CFBundleName
34 | TabViewSample
35 | XSAppIconAssets
36 | Assets.xcassets/AppIcon.appiconset
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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 TabViewSample.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 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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("TabViewSample.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("TabViewSample.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 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.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 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/icon.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/monkey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chaosifier/TabView/efcc8867ae6d20d4a7e2eea18228e85c666ec6a7/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/Resources/monkey.png
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample.iOS/TabViewSample.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {25D89702-E965-4DD6-8CFE-01A8496AC4AE}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | {6143fdea-f3c2-4a09-aafa-6e230626515e}
11 | Exe
12 | TabViewSample.iOS
13 | Resources
14 | TabViewSample.iOS
15 | true
16 | NSUrlSessionHandler
17 | automatic
18 |
19 |
20 | true
21 | full
22 | false
23 | bin\iPhoneSimulator\Debug
24 | DEBUG
25 | prompt
26 | 4
27 | x86_64
28 | None
29 | true
30 |
31 |
32 | none
33 | true
34 | bin\iPhoneSimulator\Release
35 | prompt
36 | 4
37 | None
38 | x86_64
39 |
40 |
41 | true
42 | full
43 | false
44 | bin\iPhone\Debug
45 | DEBUG
46 | prompt
47 | 4
48 | ARM64
49 | iPhone Developer
50 | true
51 | Entitlements.plist
52 | None
53 | -all
54 |
55 |
56 | none
57 | true
58 | bin\iPhone\Release
59 | prompt
60 | 4
61 | ARM64
62 | iPhone Developer
63 | Entitlements.plist
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
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 | false
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | 5.2.0
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 | {C4B1BE4B-CC8B-4F8F-B8E7-40CB59B1F518}
136 | TabViewSample
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 |
5 | namespace TabViewSample
6 | {
7 | public partial class App : Application
8 | {
9 | public App()
10 | {
11 | InitializeComponent();
12 |
13 | MainPage = new NavigationPage(new MainPage());
14 | }
15 |
16 | protected override void OnStart()
17 | {
18 | }
19 |
20 | protected override void OnSleep()
21 | {
22 | }
23 |
24 | protected override void OnResume()
25 | {
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms.Xaml;
2 |
3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
18 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using TabViewSample.Pages;
8 | using Xamarin.Forms;
9 |
10 | namespace TabViewSample
11 | {
12 | // Learn more about making custom code visible in the Xamarin.Forms previewer
13 | // by visiting https://aka.ms/xamarinforms-previewer
14 | [DesignTimeVisible(false)]
15 | public partial class MainPage : ContentPage
16 | {
17 | public MainPage()
18 | {
19 | InitializeComponent();
20 | }
21 |
22 | private async void btnItemSource_Clicked(object sender, EventArgs e)
23 | {
24 | await App.Current.MainPage.Navigation.PushAsync(new ItemSourceSamplePage());
25 | }
26 |
27 | private async void btnTemplatedItemSourceSample_Clicked(object sender, EventArgs e)
28 | {
29 | await App.Current.MainPage.Navigation.PushAsync(new TemplatedItemSourceSamplePage());
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/Pages/ItemSourceSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
21 |
22 |
23 |
28 |
29 |
30 |
35 |
36 |
37 |
38 |
39 |
40 | mono
41 | monodroid
42 | monotouch
43 | monorail
44 | monodevelop
45 | monotone
46 | monopoly
47 | monomodal
48 | mononucleosis
49 |
50 |
51 |
52 |
53 |
54 |
59 |
60 |
61 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/Pages/ItemSourceSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | using Xamarin.Forms;
8 | using Xamarin.Forms.Xaml;
9 |
10 | namespace TabViewSample.Pages
11 | {
12 | [XamlCompilation(XamlCompilationOptions.Compile)]
13 | public partial class ItemSourceSamplePage : ContentPage
14 | {
15 | public ItemSourceSamplePage()
16 | {
17 | InitializeComponent();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/Pages/TemplatedItemSourceSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
17 |
23 |
24 |
25 |
26 |
46 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/Pages/TemplatedItemSourceSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using TabViewSample.ViewModels;
7 | using Xamarin.Forms;
8 | using Xamarin.Forms.Xaml;
9 |
10 | namespace TabViewSample.Pages
11 | {
12 | [XamlCompilation(XamlCompilationOptions.Compile)]
13 | public partial class TemplatedItemSourceSamplePage : ContentPage
14 | {
15 | public TemplatedItemSourceSamplePageViewModel PageViewModel;
16 | public TemplatedItemSourceSamplePage()
17 | {
18 | InitializeComponent();
19 |
20 | PageViewModel = new TemplatedItemSourceSamplePageViewModel();
21 |
22 | BindingContext = PageViewModel;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/TabViewSample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | true
6 |
7 |
8 |
9 | portable
10 | true
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | MSBuild:UpdateDesignTimeXaml
26 |
27 |
28 | MSBuild:UpdateDesignTimeXaml
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Sample/TabViewSample/TabViewSample/TabViewSample/ViewModels/TemplatedItemSourceSamplePageViewModel.cs:
--------------------------------------------------------------------------------
1 | using Neemacademy.CustomControls.Xam.Plugin.TabView;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Collections.ObjectModel;
5 | using System.Diagnostics;
6 | using System.Text;
7 | using Xam.Plugin.TabView;
8 | using Xamarin.Forms;
9 |
10 | namespace TabViewSample.ViewModels
11 | {
12 | public class TemplatedItemSourceSamplePageViewModel : ObservableBase
13 | {
14 | private bool _enableSwipe;
15 | public bool EnableSwipe
16 | {
17 | get { return _enableSwipe; }
18 | set { SetProperty(ref _enableSwipe, value); }
19 | }
20 |
21 | private ObservableCollection _animalCategories;
22 | public ObservableCollection AnimalCategories
23 | {
24 | get { return _animalCategories; }
25 | set { SetProperty(ref _animalCategories, value); }
26 | }
27 |
28 | public TemplatedItemSourceSamplePageViewModel()
29 | {
30 | EnableSwipe = false;
31 | AnimalCategories = new ObservableCollection();
32 | AnimalCategories.Add(new AnimalCategory()
33 | {
34 | TabViewControlTabItemTitle = "Mammals",
35 | TabViewControlTabItemIconSource = "icon.png",
36 | Animals = new ObservableCollection()
37 | {
38 | "Elephant",
39 | "Rabbit",
40 | "Monkey",
41 | "Whale"
42 | }
43 | });
44 | AnimalCategories.Add(new AnimalCategory()
45 | {
46 | TabViewControlTabItemTitle = "Birds",
47 | TabViewControlTabItemIconSource = "icon.png",
48 | Animals = new ObservableCollection()
49 | {
50 | "Duck",
51 | "Crow",
52 | "Sparrow",
53 | "Eagle"
54 | }
55 | });
56 | AnimalCategories.Add(new AnimalCategory()
57 | {
58 | TabViewControlTabItemTitle = "Fish",
59 | TabViewControlTabItemIconSource = "icon.png",
60 | Animals = new ObservableCollection()
61 | {
62 | "Carp",
63 | "Salmon",
64 | "Swordfish",
65 | "Eel"
66 | }
67 | });
68 | }
69 |
70 | public class AnimalCategory : ObservableBase, ITabViewControlTabItem
71 | {
72 | public string TabViewControlTabItemTitle { get; set; }
73 | public ImageSource TabViewControlTabItemIconSource { get; set; }
74 | public ObservableCollection Animals { get; set; }
75 |
76 | public void TabViewControlTabItemFocus()
77 | {
78 | Debug.WriteLine($"{TabViewControlTabItemTitle} tab received focus.");
79 | }
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/Converters/DoubleToLayoutOptionsConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using Xamarin.Forms;
4 |
5 | namespace Xam.Plugin.TabView.Converters
6 | {
7 | public class DoubleToLayoutOptionsConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
10 | {
11 | var result = double.TryParse(value.ToString(), out double val);
12 | if (result && val > 0)
13 | {
14 | return LayoutOptions.CenterAndExpand;
15 | }
16 | return LayoutOptions.FillAndExpand;
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | return null;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/Converters/NullToBoolConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using Xamarin.Forms;
4 |
5 | namespace Xam.Plugin.TabView.Converters
6 | {
7 | public class NullToBoolConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
10 | {
11 | return value != null;
12 | }
13 |
14 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | return null;
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/Converters/SelectedTabHeaderToTabBackgroundColorConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Text;
5 | using Xamarin.Forms;
6 |
7 | namespace Xam.Plugin.TabView.Converters
8 | {
9 | class SelectedTabHeaderToTabBackgroundColorConverter : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | bool isCurrentTabSelected = false;
14 | if (!string.IsNullOrWhiteSpace(value?.ToString()))
15 | bool.TryParse(value.ToString(), out isCurrentTabSelected);
16 |
17 | if (parameter is TabViewControl tvc && isCurrentTabSelected)
18 | {
19 | return tvc.HeaderSelectionUnderlineColor;
20 | }
21 | else
22 | {
23 | return Color.Transparent;
24 | }
25 | }
26 |
27 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
28 | {
29 | throw new NotImplementedException();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/ITabViewControlTabItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using Xamarin.Forms;
5 |
6 | namespace Xam.Plugin.TabView
7 | {
8 | public interface ITabViewControlTabItem
9 | {
10 | string TabViewControlTabItemTitle { get; set; }
11 | ImageSource TabViewControlTabItemIconSource { get; set; }
12 |
13 | ///
14 | /// called when the view receives focus
15 | ///
16 | void TabViewControlTabItemFocus();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/ObservableBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Runtime.CompilerServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Xam.Plugin.TabView
10 | {
11 | public class ObservableBase : INotifyPropertyChanged
12 | {
13 | public event PropertyChangedEventHandler PropertyChanged;
14 | protected bool SetProperty(ref T storage, T value, [CallerMemberName] String propertyName = null)
15 | {
16 | if (object.Equals(storage, value)) return false;
17 |
18 | storage = value;
19 | this.OnPropertyChanged(propertyName);
20 | return true;
21 | }
22 |
23 | protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
24 | {
25 | this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/TabItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.CompilerServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Xamarin.Forms;
8 | using Xamarin.Forms.Internals;
9 |
10 | namespace Xam.Plugin.TabView
11 | {
12 | [ContentProperty(nameof(Content))]
13 | public class TabItem : BindableObject
14 | {
15 | public TabItem()
16 | {
17 | //Parameterless constructor required for xaml instantiation.
18 | }
19 |
20 | public void TriggerPropertyChange(string propertyName = null)
21 | {
22 | base.OnPropertyChanged(propertyName);
23 | }
24 |
25 | public TabItem(string headerText, View content, ImageSource headerIcon = null)
26 | {
27 | HeaderText = headerText;
28 | Content = content;
29 | if (headerIcon != null)
30 | HeaderIcon = headerIcon;
31 | }
32 |
33 | public static readonly BindableProperty HeaderIconProperty = BindableProperty.Create(nameof(HeaderIcon), typeof(ImageSource), typeof(TabItem));
34 | public ImageSource HeaderIcon
35 | {
36 | get => (ImageSource)GetValue(HeaderIconProperty);
37 | set { SetValue(HeaderIconProperty, value); }
38 | }
39 |
40 | public readonly BindableProperty HeaderIconSizeProperty = BindableProperty.Create(nameof(HeaderIconSize), typeof(double), typeof(TabItem), 32.0);
41 | public double HeaderIconSize
42 | {
43 | get => (double)GetValue(HeaderIconSizeProperty);
44 | set { SetValue(HeaderIconSizeProperty, value); }
45 | }
46 |
47 | public static readonly BindableProperty HeaderTextProperty = BindableProperty.Create(nameof(HeaderText), typeof(string), typeof(TabItem), string.Empty);
48 | public string HeaderText
49 | {
50 | get => (string)GetValue(HeaderTextProperty);
51 | set { SetValue(HeaderTextProperty, value); }
52 | }
53 |
54 | public static readonly BindableProperty ContentProperty = BindableProperty.Create(nameof(Content), typeof(View), typeof(TabItem));
55 | public View Content
56 | {
57 | get => (View)GetValue(ContentProperty);
58 | set { SetValue(ContentProperty, value); }
59 | }
60 |
61 | public static readonly BindableProperty IsCurrentProperty = BindableProperty.Create(nameof(IsCurrent), typeof(bool), typeof(TabItem), false);
62 | public bool IsCurrent
63 | {
64 | get => (bool)GetValue(IsCurrentProperty);
65 | set { SetValue(IsCurrentProperty, value); }
66 | }
67 |
68 | public static readonly BindableProperty HeaderTextColorProperty = BindableProperty.Create(nameof(HeaderTextColor), typeof(Color), typeof(TabItem), Color.White);
69 | public Color HeaderTextColor
70 | {
71 | get => (Color)GetValue(HeaderTextColorProperty);
72 | set { SetValue(HeaderTextColorProperty, value); }
73 | }
74 |
75 | public static readonly BindableProperty HeaderSelectionUnderlineColorProperty = BindableProperty.Create(nameof(HeaderSelectionUnderlineColor), typeof(Color), typeof(TabItem), Color.Transparent);
76 | public Color HeaderSelectionUnderlineColor
77 | {
78 | get => (Color)GetValue(HeaderSelectionUnderlineColorProperty);
79 | set { SetValue(HeaderSelectionUnderlineColorProperty, value); }
80 | }
81 |
82 | public static readonly BindableProperty HeaderSelectionUnderlineThicknessProperty = BindableProperty.Create(nameof(HeaderSelectionUnderlineThickness), typeof(double), typeof(TabItem), (double)5);
83 | public double HeaderSelectionUnderlineThickness
84 | {
85 | get => (double)GetValue(HeaderSelectionUnderlineThicknessProperty);
86 | set { SetValue(HeaderSelectionUnderlineThicknessProperty, value); }
87 | }
88 |
89 | public static readonly BindableProperty HeaderSelectionUnderlineWidthProperty = BindableProperty.Create(nameof(HeaderSelectionUnderlineWidth), typeof(double), typeof(TabItem), (double)40);
90 | public double HeaderSelectionUnderlineWidth
91 | {
92 | get => (double)GetValue(HeaderSelectionUnderlineWidthProperty);
93 | set { SetValue(HeaderSelectionUnderlineWidthProperty, value); }
94 | }
95 |
96 | public static readonly BindableProperty HeaderTabTextFontSizeProperty = BindableProperty.Create(nameof(HeaderTabTextFontSize), typeof(double), typeof(TabItem), TabDefaults.DefaultTextSize);
97 | [TypeConverter(typeof(FontSizeConverter))]
98 | public double HeaderTabTextFontSize
99 | {
100 | get => (double)GetValue(HeaderTabTextFontSizeProperty);
101 | set { SetValue(HeaderTabTextFontSizeProperty, value); }
102 | }
103 |
104 | public static readonly BindableProperty HeaderTabTextFontFamilyProperty = BindableProperty.Create(nameof(HeaderTabTextFontFamily), typeof(string), typeof(TabItem));
105 | public string HeaderTabTextFontFamily
106 | {
107 | get => (string)GetValue(HeaderTabTextFontFamilyProperty);
108 | set { SetValue(HeaderTabTextFontFamilyProperty, value); }
109 | }
110 |
111 | public static readonly BindableProperty HeaderTabTextFontAttributesProperty = BindableProperty.Create(nameof(HeaderTabTextFontAttributes), typeof(FontAttributes), typeof(TabItem), FontAttributes.None);
112 | public FontAttributes HeaderTabTextFontAttributes
113 | {
114 | get => (FontAttributes)GetValue(HeaderTabTextFontAttributesProperty);
115 | set { SetValue(HeaderTabTextFontAttributesProperty, value); }
116 | }
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/Xam.Plugin.TabView.cs:
--------------------------------------------------------------------------------
1 | using CarouselView.FormsPlugin.Abstractions;
2 | using System;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 | using System.Collections.ObjectModel;
6 | using System.ComponentModel;
7 | using System.Linq;
8 | using Xam.Plugin.TabView.Converters;
9 | using Xamarin.Forms;
10 |
11 | namespace Xam.Plugin.TabView
12 | {
13 | public delegate void PositionChangingEventHandler(object sender, PositionChangingEventArgs e);
14 | public delegate void PositionChangedEventHandler(object sender, PositionChangedEventArgs e);
15 |
16 | public class PositionChangingEventArgs : EventArgs
17 | {
18 | public bool Canceled { get; set; }
19 | public int NewPosition { get; set; }
20 | public int OldPosition { get; set; }
21 | }
22 |
23 | public class PositionChangedEventArgs : EventArgs
24 | {
25 | public int NewPosition { get; set; }
26 | public int OldPosition { get; set; }
27 | }
28 |
29 | static class TabDefaults
30 | {
31 | public static readonly Color DefaultColor = Color.White;
32 | public const double DefaultThickness = 5;
33 | public const double DefaultTextSize = 14;
34 | }
35 |
36 | public class TabViewControl : ContentView
37 | {
38 | private StackLayout _mainContainerSL;
39 | private Grid _headerContainerGrid;
40 | private CarouselViewControl _carouselView;
41 | private ScrollView _tabHeadersContainerSv;
42 |
43 | public event PositionChangingEventHandler PositionChanging;
44 | public event PositionChangedEventHandler PositionChanged;
45 |
46 | protected virtual void OnPositionChanging(ref PositionChangingEventArgs e)
47 | {
48 | PositionChangingEventHandler handler = PositionChanging;
49 | handler?.Invoke(this, e);
50 | }
51 |
52 | protected virtual void OnPositionChanged(PositionChangedEventArgs e)
53 | {
54 | PositionChangedEventHandler handler = PositionChanged;
55 | handler?.Invoke(this, e);
56 | }
57 |
58 | public TabViewControl()
59 | {
60 | //Parameterless constructor required for xaml instantiation.
61 | Init();
62 | }
63 |
64 | public TabViewControl(IList tabItems, int selectedTabIndex = 0)
65 | {
66 | Init();
67 | foreach (var tab in tabItems)
68 | {
69 | ItemSource.Add(tab);
70 | }
71 | if (selectedTabIndex > 0)
72 | {
73 | SelectedTabIndex = selectedTabIndex;
74 | }
75 | }
76 |
77 | //refactor
78 | void ItemSource_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
79 | {
80 | if (e.NewItems != null)
81 | {
82 | foreach (var tab in e.NewItems)
83 | {
84 | if (tab is TabItem newTab)
85 | {
86 | SetTabProps(newTab);
87 | AddTabToView(newTab);
88 | }
89 | }
90 | }
91 | }
92 |
93 | private void SetTabProps(TabItem tab)
94 | {
95 | //Set the tab properties from the main control only if not set in xaml at the individual tab level.
96 | if (tab.HeaderTextColor == TabDefaults.DefaultColor && HeaderTabTextColor != TabDefaults.DefaultColor)
97 | tab.HeaderTextColor = HeaderTabTextColor;
98 | if (tab.HeaderSelectionUnderlineColor == TabDefaults.DefaultColor && HeaderSelectionUnderlineColor != TabDefaults.DefaultColor)
99 | tab.HeaderSelectionUnderlineColor = HeaderSelectionUnderlineColor;
100 | if (tab.HeaderSelectionUnderlineThickness.Equals(TabDefaults.DefaultThickness) && !HeaderSelectionUnderlineThickness.Equals(TabDefaults.DefaultThickness))
101 | tab.HeaderSelectionUnderlineThickness = HeaderSelectionUnderlineThickness;
102 | if (tab.HeaderSelectionUnderlineWidth > 0)
103 | tab.HeaderSelectionUnderlineWidth = HeaderSelectionUnderlineWidth;
104 | if (tab.HeaderTabTextFontSize.Equals(TabDefaults.DefaultTextSize) && !HeaderTabTextFontSize.Equals(TabDefaults.DefaultTextSize))
105 | tab.HeaderTabTextFontSize = HeaderTabTextFontSize;
106 | if (tab.HeaderTabTextFontFamily is null && !string.IsNullOrWhiteSpace(HeaderTabTextFontFamily))
107 | tab.HeaderTabTextFontFamily = HeaderTabTextFontFamily;
108 | if (tab.HeaderTabTextFontAttributes == FontAttributes.None && HeaderTabTextFontAttributes != FontAttributes.None)
109 | tab.HeaderTabTextFontAttributes = HeaderTabTextFontAttributes;
110 | }
111 |
112 | private bool _supressCarouselViewPositionChangedEvent;
113 | private void _carouselView_PropertyChanged(object sender, PropertyChangedEventArgs e)
114 | {
115 | if (e.PropertyName == nameof(_carouselView.Position) && !_supressCarouselViewPositionChangedEvent)
116 | {
117 | var positionChangingArgs = new PositionChangingEventArgs()
118 | {
119 | Canceled = false,
120 | NewPosition = _carouselView.Position,
121 | OldPosition = SelectedTabIndex
122 | };
123 |
124 | OnPositionChanging(ref positionChangingArgs);
125 |
126 | if (positionChangingArgs != null && positionChangingArgs.Canceled)
127 | {
128 | _supressCarouselViewPositionChangedEvent = true;
129 | _carouselView.PositionSelected -= _carouselView_PositionSelected;
130 | _carouselView.PropertyChanged -= _carouselView_PropertyChanged;
131 | _carouselView.Position = SelectedTabIndex;
132 | _carouselView.PositionSelected += _carouselView_PositionSelected;
133 | _carouselView.PropertyChanged += _carouselView_PropertyChanged;
134 | _supressCarouselViewPositionChangedEvent = false;
135 | }
136 |
137 | SetPosition(positionChangingArgs.NewPosition);
138 | }
139 | }
140 |
141 | private void Init()
142 | {
143 | ItemSource = new ObservableCollection();
144 |
145 | _headerContainerGrid = new Grid
146 | {
147 | HorizontalOptions = LayoutOptions.FillAndExpand,
148 | VerticalOptions = LayoutOptions.Start,
149 | // BackgroundColor = Color.White, // tab sepeartor color
150 | MinimumHeightRequest = 50,
151 | ColumnSpacing = 0, // seperator thickness
152 | };
153 |
154 | _tabHeadersContainerSv = new ScrollView()
155 | {
156 | HorizontalScrollBarVisibility = ScrollBarVisibility.Never,
157 | Orientation = ScrollOrientation.Horizontal,
158 | Content = _headerContainerGrid,
159 | BackgroundColor = HeaderBackgroundColor,
160 | HorizontalOptions = LayoutOptions.FillAndExpand
161 | };
162 |
163 | _carouselView = new CarouselViewControl
164 | {
165 | HorizontalOptions = LayoutOptions.FillAndExpand,
166 | VerticalOptions = LayoutOptions.FillAndExpand,
167 | HeightRequest = ContentHeight,
168 | ShowArrows = false,
169 | ShowIndicators = false,
170 | BindingContext = this
171 | };
172 | _carouselView.PropertyChanged += _carouselView_PropertyChanged;
173 | _carouselView.PositionSelected += _carouselView_PositionSelected;
174 |
175 | _mainContainerSL = new StackLayout
176 | {
177 | HorizontalOptions = LayoutOptions.FillAndExpand,
178 | VerticalOptions = LayoutOptions.FillAndExpand,
179 | Children = { _tabHeadersContainerSv, _carouselView },
180 | Spacing = 0
181 | };
182 |
183 | Content = _mainContainerSL;
184 | ItemSource.CollectionChanged += ItemSource_CollectionChanged;
185 | SetPosition(SelectedTabIndex, true);
186 | }
187 |
188 | protected override void OnBindingContextChanged()
189 | {
190 | base.OnBindingContextChanged();
191 | if (BindingContext != null && ItemSource != null && ItemTemplate == null)
192 | {
193 | foreach (var tab in ItemSource)
194 | {
195 | if (tab is TabItem view)
196 | {
197 | view.Content.BindingContext = BindingContext;
198 | }
199 | }
200 | }
201 | }
202 |
203 | private void _carouselView_PositionSelected(object sender, PositionSelectedEventArgs e)
204 | {
205 | if (_carouselView.Position != e.NewValue || SelectedTabIndex != e.NewValue)
206 | {
207 | SetPosition(e.NewValue);
208 | }
209 | }
210 |
211 | private void AddTabToView(TabItem tab)
212 | {
213 | var tabSize = (TabSizeOption.IsAbsolute && TabSizeOption.Value.Equals(0)) ? new GridLength(1, GridUnitType.Star) : TabSizeOption;
214 |
215 | _headerContainerGrid.ColumnDefinitions.Add(new ColumnDefinition { Width = tabSize });
216 |
217 | tab.IsCurrent = _headerContainerGrid.ColumnDefinitions.Count - 1 == SelectedTabIndex;
218 |
219 | var headerIcon = new Image
220 | {
221 | Margin = new Thickness(0, 8, 0, 0),
222 | BindingContext = tab,
223 | HorizontalOptions = LayoutOptions.CenterAndExpand,
224 | VerticalOptions = LayoutOptions.Center,
225 | WidthRequest = tab.HeaderIconSize,
226 | HeightRequest = tab.HeaderIconSize
227 | };
228 | headerIcon.SetBinding(Image.SourceProperty, nameof(TabItem.HeaderIcon));
229 | headerIcon.SetBinding(IsVisibleProperty, nameof(TabItem.HeaderIcon), converter: new NullToBoolConverter());
230 |
231 | var headerLabel = new Label
232 | {
233 | BindingContext = tab,
234 | VerticalTextAlignment = TextAlignment.Center,
235 | HorizontalTextAlignment = TextAlignment.Center,
236 | HorizontalOptions = LayoutOptions.Center,
237 | VerticalOptions = LayoutOptions.CenterAndExpand,
238 | Margin = new Thickness(5, 8, 5, 5)
239 | };
240 |
241 | headerLabel.SetBinding(Label.TextProperty, nameof(TabItem.HeaderText));
242 | headerLabel.SetBinding(Label.TextColorProperty, nameof(TabItem.HeaderTextColor));
243 | headerLabel.SetBinding(Label.FontSizeProperty, nameof(TabItem.HeaderTabTextFontSize));
244 | headerLabel.SetBinding(Label.FontFamilyProperty, nameof(TabItem.HeaderTabTextFontFamily));
245 | headerLabel.SetBinding(Label.FontAttributesProperty, nameof(TabItem.HeaderTabTextFontAttributes));
246 | headerLabel.SetBinding(IsVisibleProperty, nameof(TabItem.HeaderText), converter: new NullToBoolConverter());
247 |
248 | var selectionBarBoxView = new BoxView
249 | {
250 | VerticalOptions = LayoutOptions.End,
251 | BindingContext = tab,
252 | HeightRequest = HeaderSelectionUnderlineThickness,
253 | WidthRequest = HeaderSelectionUnderlineWidth
254 | };
255 | //selectionBarBoxView.SetBinding(IsVisibleProperty, nameof(TabItem.IsCurrent));
256 | var underlineColorBinding = new Binding(nameof(TabItem.IsCurrent), BindingMode.OneWay, new SelectedTabHeaderToTabBackgroundColorConverter(), this);
257 | //selectionBarBoxView.SetBinding(BoxView.ColorProperty, nameof(TabItem.HeaderSelectionUnderlineColor), BindingMode.OneWay, new SelectedTabHeaderToTabBackgroundColorConverter(), );
258 | selectionBarBoxView.SetBinding(BoxView.BackgroundColorProperty, underlineColorBinding);
259 |
260 | selectionBarBoxView.SetBinding(WidthRequestProperty, nameof(TabItem.HeaderSelectionUnderlineWidth));
261 | selectionBarBoxView.SetBinding(HeightRequestProperty, nameof(TabItem.HeaderSelectionUnderlineThickness));
262 | selectionBarBoxView.SetBinding(HorizontalOptionsProperty,
263 | nameof(TabItem.HeaderSelectionUnderlineWidth),
264 | converter: new DoubleToLayoutOptionsConverter());
265 |
266 | selectionBarBoxView.PropertyChanged += (object sender, PropertyChangedEventArgs e) =>
267 | {
268 | if (e.PropertyName == nameof(TabItem.IsCurrent))
269 | {
270 | SetPosition(ItemSource.IndexOf((TabItem)((BoxView)sender).BindingContext));
271 | }
272 | if (e.PropertyName == nameof(WidthRequest))
273 | {
274 | selectionBarBoxView.HorizontalOptions = tab.HeaderSelectionUnderlineWidth > 0 ? LayoutOptions.CenterAndExpand : LayoutOptions.FillAndExpand;
275 | }
276 | };
277 |
278 | View headerItemView;
279 | if (TabHeaderItemTemplate != null)
280 | {
281 | headerItemView = (View)TabHeaderItemTemplate.CreateContent();
282 | headerItemView.BindingContext = tab;
283 | }
284 | else
285 | {
286 | headerItemView = new StackLayout
287 | {
288 | VerticalOptions = LayoutOptions.FillAndExpand,
289 | Children = { headerIcon, headerLabel, selectionBarBoxView },
290 | BackgroundColor = HeaderBackgroundColor
291 | };
292 | }
293 |
294 | var tapRecognizer = new TapGestureRecognizer();
295 | tapRecognizer.Tapped += (object s, EventArgs e) =>
296 | {
297 | _supressCarouselViewPositionChangedEvent = true;
298 | var capturedIndex = _headerContainerGrid.Children.IndexOf((View)s);
299 | SetPosition(capturedIndex);
300 | _supressCarouselViewPositionChangedEvent = false;
301 | };
302 | headerItemView.GestureRecognizers.Add(tapRecognizer);
303 | _headerContainerGrid.Children.Add(headerItemView, _headerContainerGrid.ColumnDefinitions.Count - 1, 0);
304 | _carouselView.ItemsSource = ItemSource.Select(t => t.Content);
305 | }
306 |
307 | #region ItemTemplate
308 | public DataTemplate ItemTemplate
309 | {
310 | get { return (DataTemplate)GetValue(ItemTemplateProperty); }
311 | set { SetValue(ItemTemplateProperty, value); }
312 | }
313 | private static void ItemTemplateChanged(BindableObject bindable, object oldValue, object newValue)
314 | {
315 | if (bindable is TabViewControl tabViewControl)
316 | {
317 | tabViewControl.setTabViewItems();
318 | }
319 | }
320 | public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create(nameof(ItemTemplate), typeof(DataTemplate), typeof(TabViewControl), null, BindingMode.Default, null, ItemTemplateChanged);
321 | #endregion
322 |
323 | #region TabHeaderItemTemplate
324 | public DataTemplate TabHeaderItemTemplate
325 | {
326 | get { return (DataTemplate)GetValue(TabHeaderItemTemplateProperty); }
327 | set { SetValue(TabHeaderItemTemplateProperty, value); }
328 | }
329 | private static void TabHeaderItemTemplateChanged(BindableObject bindable, object oldValue, object newValue)
330 | {
331 | if (bindable is TabViewControl tabViewControl)
332 | {
333 | tabViewControl.setTabViewItems();
334 | }
335 | }
336 | public static readonly BindableProperty TabHeaderItemTemplateProperty = BindableProperty.Create(nameof(TabHeaderItemTemplate), typeof(DataTemplate), typeof(TabViewControl), null, BindingMode.Default, null, TabHeaderItemTemplateChanged);
337 | #endregion
338 |
339 | #region TemplatedItemSource
340 | public IEnumerable TemplatedItemSource
341 | {
342 | get => (IEnumerable)GetValue(TemplatedItemSourceProperty);
343 | set { SetValue(TemplatedItemSourceProperty, value); }
344 | }
345 | private static void TemplatedItemSourceChanged(BindableObject bindable, object oldValue, object newValue)
346 | {
347 | if (bindable is TabViewControl tabViewControl)
348 | {
349 | tabViewControl.setTabViewItems();
350 | }
351 | }
352 | public static readonly BindableProperty TemplatedItemSourceProperty = BindableProperty.Create(nameof(TemplatedItemSource), typeof(IEnumerable), typeof(TabViewControl), null, BindingMode.Default, null, TemplatedItemSourceChanged);
353 | #endregion
354 |
355 | private void setTabViewItems()
356 | {
357 | if (ItemTemplate == null || TemplatedItemSource == null || ItemSource == null)
358 | {
359 | return;
360 | }
361 |
362 | _headerContainerGrid.Children.Clear();
363 | _headerContainerGrid.ColumnDefinitions.Clear();
364 | ItemSource.Clear();
365 |
366 | foreach (var itm in TemplatedItemSource)
367 | {
368 | setTabViewItem(itm);
369 | }
370 | }
371 |
372 | private void setTabViewItem(ITabViewControlTabItem itm)
373 | {
374 | DataTemplate itemTemplate = ItemTemplate;
375 |
376 | if (itemTemplate == null)
377 | return;
378 |
379 | View carouselViewItem = (View)itemTemplate.CreateContent();
380 | carouselViewItem.BindingContext = itm;
381 |
382 | var newTabItem = new TabItem(itm.TabViewControlTabItemTitle, carouselViewItem, itm.TabViewControlTabItemIconSource);
383 | ItemSource.Add(newTabItem);
384 | }
385 |
386 | #region IsSwipeEnabled
387 | public bool IsSwipeEnabled
388 | {
389 | get { return (bool)GetValue(IsSwipeEnabledProperty); }
390 | set { SetValue(IsSwipeEnabledProperty, value); }
391 | }
392 | private static void IsSwipeEnabledChanged(BindableObject bindable, object oldValue, object newValue)
393 | {
394 | if (bindable is TabViewControl tabViewControl)
395 | {
396 | tabViewControl._carouselView.IsSwipeEnabled = (bool)newValue;
397 | }
398 | }
399 | public static readonly BindableProperty IsSwipeEnabledProperty = BindableProperty.Create(nameof(IsSwipeEnabled), typeof(bool), typeof(TabViewControl), true, BindingMode.Default, null, IsSwipeEnabledChanged);
400 | #endregion
401 |
402 | #region HeaderBackgroundColor
403 | public Color HeaderBackgroundColor
404 | {
405 | get { return (Color)GetValue(HeaderBackgroundColorProperty); }
406 | set { SetValue(HeaderBackgroundColorProperty, value); }
407 | }
408 | private static void HeaderBackgroundColorChanged(BindableObject bindable, object oldValue, object newValue)
409 | {
410 | if (bindable is TabViewControl tabViewControl)
411 | {
412 | tabViewControl._tabHeadersContainerSv.BackgroundColor = (Color)newValue;
413 | }
414 | }
415 | public static readonly BindableProperty HeaderBackgroundColorProperty = BindableProperty.Create(nameof(HeaderBackgroundColor), typeof(Color), typeof(TabViewControl), Color.SkyBlue, BindingMode.Default, null, HeaderBackgroundColorChanged);
416 | #endregion
417 |
418 | #region HeaderTabTextColor
419 | public Color HeaderTabTextColor
420 | {
421 | get { return (Color)GetValue(HeaderTabTextColorProperty); }
422 | set { SetValue(HeaderTabTextColorProperty, value); }
423 | }
424 | private static void HeaderTabTextColorChanged(BindableObject bindable, object oldValue, object newValue)
425 | {
426 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null)
427 | {
428 | foreach (var tab in tabViewControl.ItemSource)
429 | {
430 | tab.HeaderTextColor = (Color)newValue;
431 | }
432 | }
433 | }
434 | public static readonly BindableProperty HeaderTabTextColorProperty =
435 | BindableProperty.Create(nameof(HeaderTabTextColor), typeof(Color), typeof(TabViewControl), TabDefaults.DefaultColor, BindingMode.OneWay, null, HeaderTabTextColorChanged);
436 | #endregion
437 |
438 | #region ContentHeight
439 | public double ContentHeight
440 | {
441 | get { return (double)GetValue(ContentHeightProperty); }
442 | set { SetValue(ContentHeightProperty, value); }
443 | }
444 | private static void ContentHeightChanged(BindableObject bindable, object oldValue, object newValue)
445 | {
446 | if (bindable is TabViewControl tabViewControl && tabViewControl._carouselView != null)
447 | {
448 | tabViewControl._carouselView.HeightRequest = (double)newValue;
449 | }
450 | }
451 | public static readonly BindableProperty ContentHeightProperty = BindableProperty.Create(nameof(ContentHeight), typeof(double), typeof(TabViewControl), (double)200, BindingMode.Default, null, ContentHeightChanged);
452 | #endregion
453 |
454 | #region HeaderSelectionUnderlineColor
455 | public Color HeaderSelectionUnderlineColor
456 | {
457 | get { return (Color)GetValue(HeaderSelectionUnderlineColorProperty); }
458 | set { SetValue(HeaderSelectionUnderlineColorProperty, value); }
459 | }
460 | private static void HeaderSelectionUnderlineColorChanged(BindableObject bindable, object oldValue, object newValue)
461 | {
462 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null)
463 | {
464 | foreach (var tab in tabViewControl.ItemSource)
465 | {
466 | tab.HeaderSelectionUnderlineColor = (Color)newValue;
467 | tab.TriggerPropertyChange(nameof(tab.IsCurrent));
468 | }
469 | }
470 | }
471 | public static readonly BindableProperty HeaderSelectionUnderlineColorProperty = BindableProperty.Create(nameof(HeaderSelectionUnderlineColor), typeof(Color), typeof(TabViewControl), Color.White, BindingMode.Default, null, HeaderSelectionUnderlineColorChanged);
472 | #endregion
473 |
474 | #region HeaderSelectionUnderlineThickness
475 | public double HeaderSelectionUnderlineThickness
476 | {
477 | get { return (double)GetValue(HeaderSelectionUnderlineThicknessProperty); }
478 | set { SetValue(HeaderSelectionUnderlineThicknessProperty, value); }
479 | }
480 | private static void HeaderSelectionUnderlineThicknessChanged(BindableObject bindable, object oldValue, object newValue)
481 | {
482 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null)
483 | {
484 | foreach (var tab in tabViewControl.ItemSource)
485 | {
486 | tab.HeaderSelectionUnderlineThickness = (double)newValue;
487 | }
488 | }
489 | }
490 | public static readonly BindableProperty HeaderSelectionUnderlineThicknessProperty = BindableProperty.Create(nameof(HeaderSelectionUnderlineThickness), typeof(double), typeof(TabViewControl), TabDefaults.DefaultThickness, BindingMode.Default, null, HeaderSelectionUnderlineThicknessChanged);
491 | #endregion
492 |
493 | #region HeaderSelectionUnderlineWidth
494 | public double HeaderSelectionUnderlineWidth
495 | {
496 | get { return (double)GetValue(HeaderSelectionUnderlineWidthProperty); }
497 | set { SetValue(HeaderSelectionUnderlineWidthProperty, value); }
498 | }
499 | private static void HeaderSelectionUnderlineWidthChanged(BindableObject bindable, object oldValue, object newValue)
500 | {
501 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null)
502 | {
503 | foreach (var tab in tabViewControl.ItemSource)
504 | {
505 | tab.HeaderSelectionUnderlineWidth = (double)newValue;
506 | }
507 | }
508 | }
509 | public static readonly BindableProperty HeaderSelectionUnderlineWidthProperty = BindableProperty.Create(nameof(HeaderSelectionUnderlineWidth), typeof(double), typeof(TabViewControl), (double)0, BindingMode.Default, null, HeaderSelectionUnderlineWidthChanged);
510 | #endregion
511 |
512 | #region HeaderTabTextFontSize
513 | [Xamarin.Forms.TypeConverter(typeof(FontSizeConverter))]
514 | public double HeaderTabTextFontSize
515 | {
516 | get { return (double)GetValue(HeaderTabTextFontSizeProperty); }
517 | set { SetValue(HeaderTabTextFontSizeProperty, value); }
518 | }
519 | private static void HeaderTabTextFontSizeChanged(BindableObject bindable, object oldValue, object newValue)
520 | {
521 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null)
522 | {
523 | foreach (var tab in tabViewControl.ItemSource)
524 | {
525 | tab.HeaderTabTextFontSize = (double)newValue;
526 | }
527 | }
528 | }
529 | public static readonly BindableProperty HeaderTabTextFontSizeProperty = BindableProperty.Create(nameof(HeaderTabTextFontSize), typeof(double), typeof(TabViewControl), (double)14, BindingMode.Default, null, HeaderTabTextFontSizeChanged);
530 | #endregion
531 |
532 | #region TabHeaderSpacing
533 | [Xamarin.Forms.TypeConverter(typeof(FontSizeConverter))]
534 | public double TabHeaderSpacing
535 | {
536 | get { return (double)GetValue(TabHeaderSpacingProperty); }
537 | set { SetValue(TabHeaderSpacingProperty, value); }
538 | }
539 | private static void TabHeaderSpacingChanged(BindableObject bindable, object oldValue, object newValue)
540 | {
541 | if (bindable is TabViewControl tabViewControl)
542 | {
543 | double colSpacing;
544 | double.TryParse(oldValue?.ToString(), out colSpacing);
545 | tabViewControl._headerContainerGrid.ColumnSpacing = colSpacing;
546 | }
547 | }
548 | public static readonly BindableProperty TabHeaderSpacingProperty = BindableProperty.Create(nameof(TabHeaderSpacing), typeof(double), typeof(TabViewControl), (double)14, BindingMode.Default, null, TabHeaderSpacingChanged);
549 | #endregion
550 |
551 | #region HeaderTabTextFontFamily
552 | public string HeaderTabTextFontFamily
553 | {
554 | get { return (string)GetValue(HeaderTabTextFontFamilyProperty); }
555 | set { SetValue(HeaderTabTextFontFamilyProperty, value); }
556 | }
557 | private static void HeaderTabTextFontFamilyChanged(BindableObject bindable, object oldValue, object newValue)
558 | {
559 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null)
560 | {
561 | foreach (var tab in tabViewControl.ItemSource)
562 | {
563 | tab.HeaderTabTextFontFamily = (string)newValue;
564 | }
565 | }
566 | }
567 | public static readonly BindableProperty HeaderTabTextFontFamilyProperty = BindableProperty.Create(nameof(HeaderTabTextFontFamily), typeof(string), typeof(TabViewControl), null, BindingMode.Default, null, HeaderTabTextFontFamilyChanged);
568 | #endregion
569 |
570 | #region HeaderTabTextFontAttributes
571 | public FontAttributes HeaderTabTextFontAttributes
572 | {
573 | get { return (FontAttributes)GetValue(HeaderTabTextFontAttributesProperty); }
574 | set { SetValue(HeaderTabTextFontAttributesProperty, value); }
575 | }
576 | private static void HeaderTabTextFontAttributesChanged(BindableObject bindable, object oldValue, object newValue)
577 | {
578 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null)
579 | {
580 | foreach (var tab in tabViewControl.ItemSource)
581 | {
582 | tab.HeaderTabTextFontAttributes = (FontAttributes)newValue;
583 | }
584 | }
585 | }
586 | public static readonly BindableProperty HeaderTabTextFontAttributesProperty = BindableProperty.Create(nameof(HeaderTabTextFontAttributes), typeof(FontAttributes), typeof(TabViewControl), FontAttributes.None, BindingMode.Default, null, HeaderTabTextFontAttributesChanged);
587 | #endregion
588 |
589 | #region ItemSource
590 | public static readonly BindableProperty ItemSourceProperty = BindableProperty.Create(nameof(ItemSource), typeof(ObservableCollection), typeof(TabViewControl));
591 | public ObservableCollection ItemSource
592 | {
593 | get => (ObservableCollection)GetValue(ItemSourceProperty);
594 | set { SetValue(ItemSourceProperty, value); }
595 | }
596 | #endregion
597 |
598 | #region TabSizeOption
599 | public static readonly BindableProperty TabSizeOptionProperty = BindableProperty.Create(nameof(TabSizeOption), typeof(GridLength), typeof(TabViewControl), default(GridLength), propertyChanged: OnTabSizeOptionChanged);
600 | private static void OnTabSizeOptionChanged(BindableObject bindable, object oldValue, object newValue)
601 | {
602 | if (bindable is TabViewControl tabViewControl && tabViewControl._headerContainerGrid != null && tabViewControl.ItemSource != null)
603 | {
604 | foreach (var tabContainer in tabViewControl._headerContainerGrid.ColumnDefinitions)
605 | {
606 | tabContainer.Width = (GridLength)newValue;
607 | }
608 | }
609 | }
610 | public GridLength TabSizeOption
611 | {
612 | get => (GridLength)GetValue(TabSizeOptionProperty);
613 | set { SetValue(TabSizeOptionProperty, value); }
614 | }
615 | #endregion
616 |
617 | #region SelectedTabIndex
618 | public static readonly BindableProperty SelectedTabIndexProperty = BindableProperty.Create(nameof(SelectedTabIndex), typeof(int), typeof(TabViewControl), 0, propertyChanged: OnSelectedTabIndexChanged);
619 | private static void OnSelectedTabIndexChanged(BindableObject bindable, object oldValue, object newValue)
620 | {
621 | if (bindable is TabViewControl tabViewControl && tabViewControl.ItemSource != null &&
622 | tabViewControl._carouselView.Position != (int)newValue)
623 | {
624 | tabViewControl.SetPosition((int)newValue, true);
625 | }
626 | }
627 | public int SelectedTabIndex
628 | {
629 | get => (int)GetValue(SelectedTabIndexProperty);
630 | set { SetValue(SelectedTabIndexProperty, value); }
631 | }
632 | #endregion
633 |
634 | public void SetPosition(int position, bool forced = false)
635 | {
636 | if (SelectedTabIndex == position && !forced || ItemSource.Count == 0)
637 | {
638 | return;
639 | }
640 | int oldPosition = SelectedTabIndex;
641 |
642 | var positionChangingArgs = new PositionChangingEventArgs()
643 | {
644 | Canceled = false,
645 | NewPosition = position,
646 | OldPosition = oldPosition
647 | };
648 | OnPositionChanging(ref positionChangingArgs);
649 |
650 | if (positionChangingArgs != null && positionChangingArgs.Canceled)
651 | {
652 | return;
653 | }
654 |
655 | if ((position >= 0 && position < ItemSource.Count) || forced)
656 | {
657 | if (_carouselView.Position != position || forced)
658 | {
659 | _carouselView.PositionSelected -= _carouselView_PositionSelected;
660 | _carouselView.Position = position;
661 | _carouselView.PositionSelected += _carouselView_PositionSelected;
662 | }
663 | if (oldPosition != position || forced)
664 | {
665 | for (int i = 0; i < ItemSource.Count; i++)
666 | {
667 | ItemSource[i].IsCurrent = i == position;
668 | }
669 |
670 | if (ItemSource[position].Content?.BindingContext is ITabViewControlTabItem tabViewItem)
671 | {
672 | tabViewItem.TabViewControlTabItemFocus();
673 | }
674 | SelectedTabIndex = position;
675 |
676 | Device.BeginInvokeOnMainThread(async () => await _tabHeadersContainerSv.ScrollToAsync(_headerContainerGrid.Children[position], ScrollToPosition.MakeVisible, false));
677 | }
678 | }
679 |
680 | var positionChangedArgs = new PositionChangedEventArgs()
681 | {
682 | NewPosition = SelectedTabIndex,
683 | OldPosition = oldPosition
684 | };
685 | OnPositionChanged(positionChangedArgs);
686 | }
687 |
688 | public void SelectNext()
689 | {
690 | SetPosition(SelectedTabIndex + 1);
691 | }
692 |
693 | public void SelectPrevious()
694 | {
695 | SetPosition(SelectedTabIndex - 1);
696 | }
697 |
698 | public void SelectFirst()
699 | {
700 | SetPosition(0);
701 | }
702 |
703 | public void SelectLast()
704 | {
705 | SetPosition(ItemSource.Count - 1);
706 | }
707 |
708 | public void AddTab(TabItem tab, int position = -1, bool selectNewPosition = false)
709 | {
710 | if (position > -1)
711 | {
712 | ItemSource.Insert(position, tab);
713 | }
714 | else
715 | {
716 | ItemSource.Add(tab);
717 | }
718 | if (selectNewPosition)
719 | {
720 | SelectedTabIndex = position;
721 | }
722 | }
723 |
724 | public void RemoveTab(int position = -1)
725 | {
726 | if (position > -1)
727 | {
728 | ItemSource.RemoveAt(position);
729 | _headerContainerGrid.Children.RemoveAt(position);
730 | _headerContainerGrid.ColumnDefinitions.RemoveAt(position);
731 | }
732 | else
733 | {
734 | ItemSource.Remove(ItemSource.Last());
735 | _headerContainerGrid.Children.RemoveAt(_headerContainerGrid.Children.Count - 1);
736 | _headerContainerGrid.ColumnDefinitions.Remove(_headerContainerGrid.ColumnDefinitions.Last());
737 | }
738 | _carouselView.ItemsSource = ItemSource.Select(t => t.Content);
739 | SelectedTabIndex = position >= 0 && position < ItemSource.Count ? position : ItemSource.Count - 1;
740 | }
741 | }
742 | }
743 |
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/Xam.Plugin.TabView.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | 1.1.1
6 | Sagar Dahal
7 |
8 | TabView Control for Xamarin.Forms.
9 |
10 |
11 | https://github.com/chaosifier/TabView
12 |
13 | https://github.com/chaosifier/TabView
14 | git
15 | xamarin forms android ios uwp tabview tab control plugin chaosifier xam
16 | - Added support for header header and body item templates binding
17 | - Added tabs header scroll behavior when tabs overflow
18 | - Added IsSwipingEnabled bindable property
19 | - Updated to .NET Standard 2.0
20 | - Delayed tab header change issue fixed
21 | - Issues related to inconsistent header heights fixed
22 | true
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Xam.Plugin.TabView/Xam.Plugin.TabView.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $id$
5 | $version$
6 | $title$
7 | $author$
8 | $author$
9 | false
10 | MIT
11 | https://github.com/chaosifier/TabView
12 | https://sagardahal.info.np/images/sd.png
13 | $description$
14 | TabView Control for Xamarin.Forms.
15 |
16 | - Added support for header header and body item templates binding
17 | - Added tabs header scroll behavior when tabs overflow
18 | - Added IsSwipingEnabled bindable property
19 | - Updated to .NET Standard 2.0
20 | - Delayed tab header change issue fixed
21 | - Issues related to inconsistent header heights fixed
22 |
23 | Copyright 2020
24 | xamarin forms android ios uwp tabview tab control plugin chaosifier xam
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------