├── .gitignore
├── CrossCardViewSample.sln
├── CrossCardViewSample
├── CrossCardViewSample.Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── CrossCardViewSample.Droid.csproj
│ ├── CustomCardRenderer
│ │ └── AndroidCustomCardRenderer.cs
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.Designer.cs
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ └── drawable
│ │ │ └── icon.png
│ └── packages.config
├── CrossCardViewSample.iOS
│ ├── AppDelegate.cs
│ ├── CrossCardViewSample.iOS.csproj
│ ├── CustomAppleCard
│ │ └── AppleCardView.cs
│ ├── CustomCardRenderer
│ │ └── AppleCustomCardRenderer.cs
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-76.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-Small-40.png
│ │ ├── Icon-Small-40@2x.png
│ │ ├── Icon-Small-40@3x.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Small@3x.png
│ │ └── LaunchScreen.storyboard
│ ├── iTunesArtwork
│ ├── iTunesArtwork@2x
│ └── packages.config
└── CrossCardViewSample
│ ├── App.cs
│ ├── CrossCardViewSample.projitems
│ ├── CrossCardViewSample.shproj
│ ├── CustomCardView
│ └── CustomCard.cs
│ ├── GettingStarted.Xamarin
│ └── Pages
│ ├── CrossCardView.xaml
│ └── CrossCardView.xaml.cs
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | build/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studo 2015 cache/options directory
26 | .vs/
27 |
28 | # MSTest test Results
29 | [Tt]est[Rr]esult*/
30 | [Bb]uild[Ll]og.*
31 |
32 | # NUNIT
33 | *.VisualState.xml
34 | TestResult.xml
35 |
36 | # Build Results of an ATL Project
37 | [Dd]ebugPS/
38 | [Rr]eleasePS/
39 | dlldata.c
40 |
41 | *_i.c
42 | *_p.c
43 | *_i.h
44 | *.ilk
45 | *.meta
46 | *.obj
47 | *.pch
48 | *.pdb
49 | *.pgc
50 | *.pgd
51 | *.rsp
52 | *.sbr
53 | *.tlb
54 | *.tli
55 | *.tlh
56 | *.tmp
57 | *.tmp_proj
58 | *.log
59 | *.vspscc
60 | *.vssscc
61 | .builds
62 | *.pidb
63 | *.svclog
64 | *.scc
65 |
66 | # Chutzpah Test files
67 | _Chutzpah*
68 |
69 | # Visual C++ cache files
70 | ipch/
71 | *.aps
72 | *.ncb
73 | *.opensdf
74 | *.sdf
75 | *.cachefile
76 |
77 | # Visual Studio profiler
78 | *.psess
79 | *.vsp
80 | *.vspx
81 |
82 | # TFS 2012 Local Workspace
83 | $tf/
84 |
85 | # Guidance Automation Toolkit
86 | *.gpState
87 |
88 | # ReSharper is a .NET coding add-in
89 | _ReSharper*/
90 | *.[Rr]e[Ss]harper
91 | *.DotSettings.user
92 |
93 | # JustCode is a .NET coding addin-in
94 | .JustCode
95 |
96 | # TeamCity is a build add-in
97 | _TeamCity*
98 |
99 | # DotCover is a Code Coverage Tool
100 | *.dotCover
101 |
102 | # NCrunch
103 | _NCrunch_*
104 | .*crunch*.local.xml
105 |
106 | # MightyMoose
107 | *.mm.*
108 | AutoTest.Net/
109 |
110 | # Web workbench (sass)
111 | .sass-cache/
112 |
113 | # Installshield output folder
114 | [Ee]xpress/
115 |
116 | # DocProject is a documentation generator add-in
117 | DocProject/buildhelp/
118 | DocProject/Help/*.HxT
119 | DocProject/Help/*.HxC
120 | DocProject/Help/*.hhc
121 | DocProject/Help/*.hhk
122 | DocProject/Help/*.hhp
123 | DocProject/Help/Html2
124 | DocProject/Help/html
125 |
126 | # Click-Once directory
127 | publish/
128 |
129 | # Publish Web Output
130 | *.[Pp]ublish.xml
131 | *.azurePubxml
132 | # TODO: Comment the next line if you want to checkin your web deploy settings
133 | # but database connection strings (with potential passwords) will be unencrypted
134 | *.pubxml
135 | *.publishproj
136 |
137 | # NuGet Packages
138 | *.nupkg
139 | # The packages folder can be ignored because of Package Restore
140 | **/packages/*
141 | # except build/, which is used as an MSBuild target.
142 | !**/packages/build/
143 | # Uncomment if necessary however generally it will be regenerated when needed
144 | #!**/packages/repositories.config
145 |
146 | # Windows Azure Build Output
147 | csx/
148 | *.build.csdef
149 |
150 | # Windows Store app package directory
151 | AppPackages/
152 |
153 | # Others
154 | *.[Cc]ache
155 | ClientBin/
156 | [Ss]tyle[Cc]op.*
157 | ~$*
158 | *~
159 | *.dbmdl
160 | *.dbproj.schemaview
161 | *.pfx
162 | *.publishsettings
163 | node_modules/
164 | bower_components/
165 |
166 | # RIA/Silverlight projects
167 | Generated_Code/
168 |
169 | # Backup & report files from converting an old project file
170 | # to a newer Visual Studio version. Backup files are not needed,
171 | # because we have git ;-)
172 | _UpgradeReport_Files/
173 | Backup*/
174 | UpgradeLog*.XML
175 | UpgradeLog*.htm
176 |
177 | # SQL Server files
178 | *.mdf
179 | *.ldf
180 |
181 | # Business Intelligence projects
182 | *.rdl.data
183 | *.bim.layout
184 | *.bim_*.settings
185 |
186 | # Microsoft Fakes
187 | FakesAssemblies/
188 |
189 | # Node.js Tools for Visual Studio
190 | .ntvs_analysis.dat
191 |
192 | # Visual Studio 6 build log
193 | *.plg
194 |
195 | # Visual Studio 6 workspace options file
196 | *.opt
197 |
--------------------------------------------------------------------------------
/CrossCardViewSample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CrossCardViewSample", "CrossCardViewSample\CrossCardViewSample\CrossCardViewSample.shproj", "{2C9989F4-888E-4A79-948E-F9F919220D4B}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrossCardViewSample.iOS", "CrossCardViewSample\CrossCardViewSample.iOS\CrossCardViewSample.iOS.csproj", "{40B36386-4798-4595-B7D3-08AE62369087}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrossCardViewSample.Droid", "CrossCardViewSample\CrossCardViewSample.Droid\CrossCardViewSample.Droid.csproj", "{956AD1D8-9429-4AB8-9085-A2DF0031129F}"
11 | EndProject
12 | Global
13 | GlobalSection(SharedMSBuildProjectFiles) = preSolution
14 | CrossCardViewSample\CrossCardViewSample\CrossCardViewSample.projitems*{956ad1d8-9429-4ab8-9085-a2df0031129f}*SharedItemsImports = 4
15 | CrossCardViewSample\CrossCardViewSample\CrossCardViewSample.projitems*{40b36386-4798-4595-b7d3-08ae62369087}*SharedItemsImports = 4
16 | CrossCardViewSample\CrossCardViewSample\CrossCardViewSample.projitems*{2c9989f4-888e-4a79-948e-f9f919220d4b}*SharedItemsImports = 13
17 | EndGlobalSection
18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
19 | Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
20 | Ad-Hoc|ARM = Ad-Hoc|ARM
21 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
22 | Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
23 | Ad-Hoc|x86 = Ad-Hoc|x86
24 | AppStore|Any CPU = AppStore|Any CPU
25 | AppStore|ARM = AppStore|ARM
26 | AppStore|iPhone = AppStore|iPhone
27 | AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
28 | AppStore|x86 = AppStore|x86
29 | Debug|Any CPU = Debug|Any CPU
30 | Debug|ARM = Debug|ARM
31 | Debug|iPhone = Debug|iPhone
32 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
33 | Debug|x86 = Debug|x86
34 | Release|Any CPU = Release|Any CPU
35 | Release|ARM = Release|ARM
36 | Release|iPhone = Release|iPhone
37 | Release|iPhoneSimulator = Release|iPhoneSimulator
38 | Release|x86 = Release|x86
39 | EndGlobalSection
40 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
41 | {40B36386-4798-4595-B7D3-08AE62369087}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
42 | {40B36386-4798-4595-B7D3-08AE62369087}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
43 | {40B36386-4798-4595-B7D3-08AE62369087}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
44 | {40B36386-4798-4595-B7D3-08AE62369087}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
45 | {40B36386-4798-4595-B7D3-08AE62369087}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
46 | {40B36386-4798-4595-B7D3-08AE62369087}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
47 | {40B36386-4798-4595-B7D3-08AE62369087}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
48 | {40B36386-4798-4595-B7D3-08AE62369087}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
49 | {40B36386-4798-4595-B7D3-08AE62369087}.AppStore|ARM.ActiveCfg = AppStore|iPhone
50 | {40B36386-4798-4595-B7D3-08AE62369087}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
51 | {40B36386-4798-4595-B7D3-08AE62369087}.AppStore|iPhone.Build.0 = AppStore|iPhone
52 | {40B36386-4798-4595-B7D3-08AE62369087}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
53 | {40B36386-4798-4595-B7D3-08AE62369087}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
54 | {40B36386-4798-4595-B7D3-08AE62369087}.AppStore|x86.ActiveCfg = AppStore|iPhone
55 | {40B36386-4798-4595-B7D3-08AE62369087}.Debug|Any CPU.ActiveCfg = Debug|iPhone
56 | {40B36386-4798-4595-B7D3-08AE62369087}.Debug|ARM.ActiveCfg = Debug|iPhone
57 | {40B36386-4798-4595-B7D3-08AE62369087}.Debug|iPhone.ActiveCfg = Debug|iPhone
58 | {40B36386-4798-4595-B7D3-08AE62369087}.Debug|iPhone.Build.0 = Debug|iPhone
59 | {40B36386-4798-4595-B7D3-08AE62369087}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
60 | {40B36386-4798-4595-B7D3-08AE62369087}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
61 | {40B36386-4798-4595-B7D3-08AE62369087}.Debug|x86.ActiveCfg = Debug|iPhone
62 | {40B36386-4798-4595-B7D3-08AE62369087}.Release|Any CPU.ActiveCfg = Release|iPhone
63 | {40B36386-4798-4595-B7D3-08AE62369087}.Release|ARM.ActiveCfg = Release|iPhone
64 | {40B36386-4798-4595-B7D3-08AE62369087}.Release|iPhone.ActiveCfg = Release|iPhone
65 | {40B36386-4798-4595-B7D3-08AE62369087}.Release|iPhone.Build.0 = Release|iPhone
66 | {40B36386-4798-4595-B7D3-08AE62369087}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
67 | {40B36386-4798-4595-B7D3-08AE62369087}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
68 | {40B36386-4798-4595-B7D3-08AE62369087}.Release|x86.ActiveCfg = Release|iPhone
69 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
70 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
71 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
72 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
73 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
74 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
75 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
76 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
77 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
78 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
79 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
80 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
81 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
82 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|x86.Build.0 = Release|Any CPU
83 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
84 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
85 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|Any CPU.Build.0 = Release|Any CPU
86 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
87 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|ARM.ActiveCfg = Release|Any CPU
88 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|ARM.Build.0 = Release|Any CPU
89 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|ARM.Deploy.0 = Release|Any CPU
90 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|iPhone.ActiveCfg = Release|Any CPU
91 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|iPhone.Build.0 = Release|Any CPU
92 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|iPhone.Deploy.0 = Release|Any CPU
93 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
94 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
95 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
96 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|x86.ActiveCfg = Release|Any CPU
97 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|x86.Build.0 = Release|Any CPU
98 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.AppStore|x86.Deploy.0 = Release|Any CPU
99 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
100 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|Any CPU.Build.0 = Debug|Any CPU
101 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
102 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|ARM.ActiveCfg = Debug|Any CPU
103 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|ARM.Build.0 = Debug|Any CPU
104 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|ARM.Deploy.0 = Debug|Any CPU
105 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
106 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|iPhone.Build.0 = Debug|Any CPU
107 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|iPhone.Deploy.0 = Debug|Any CPU
108 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
109 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
110 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
111 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|x86.ActiveCfg = Debug|Any CPU
112 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|x86.Build.0 = Debug|Any CPU
113 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Debug|x86.Deploy.0 = Debug|Any CPU
114 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|Any CPU.ActiveCfg = Release|Any CPU
115 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|Any CPU.Build.0 = Release|Any CPU
116 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|Any CPU.Deploy.0 = Release|Any CPU
117 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|ARM.ActiveCfg = Release|Any CPU
118 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|ARM.Build.0 = Release|Any CPU
119 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|ARM.Deploy.0 = Release|Any CPU
120 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|iPhone.ActiveCfg = Release|Any CPU
121 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|iPhone.Build.0 = Release|Any CPU
122 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|iPhone.Deploy.0 = Release|Any CPU
123 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
124 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
125 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
126 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|x86.ActiveCfg = Release|Any CPU
127 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|x86.Build.0 = Release|Any CPU
128 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}.Release|x86.Deploy.0 = Release|Any CPU
129 | EndGlobalSection
130 | GlobalSection(SolutionProperties) = preSolution
131 | HideSolutionNode = FALSE
132 | EndGlobalSection
133 | EndGlobal
134 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/CrossCardViewSample.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {956AD1D8-9429-4AB8-9085-A2DF0031129F}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | CrossCardViewSample.Droid
13 | CrossCardViewSample
14 | 512
15 | true
16 | Resources\Resource.Designer.cs
17 | Off
18 | Properties\AndroidManifest.xml
19 | true
20 | armeabi,armeabi-v7a,x86
21 |
22 |
23 |
24 |
25 | v6.0
26 |
27 |
28 |
29 |
30 | true
31 | full
32 | false
33 | bin\Debug\
34 | DEBUG;TRACE
35 | prompt
36 | 4
37 | True
38 | None
39 |
40 |
41 | pdbonly
42 | true
43 | bin\Release\
44 | TRACE
45 | prompt
46 | 4
47 | False
48 | SdkOnly
49 |
50 |
51 |
52 | ..\..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\FormsViewGroup.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | ..\..\packages\Xamarin.Android.Support.v4.23.0.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
63 | True
64 |
65 |
66 | ..\..\packages\Xamarin.Android.Support.v7.CardView.23.0.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
67 | True
68 |
69 |
70 | ..\..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Core.dll
71 | True
72 |
73 |
74 | ..\..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
75 | True
76 |
77 |
78 | ..\..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
79 | True
80 |
81 |
82 | ..\..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
83 | True
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | Designer
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
111 |
112 |
113 |
114 |
121 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/CustomCardRenderer/AndroidCustomCardRenderer.cs:
--------------------------------------------------------------------------------
1 | using Android.Support.V7.Widget;
2 | using Android.Views;
3 | using CrossCardViewSample.CustomCardView;
4 | using CrossCardViewSample.Droid.CustomCardRenderer;
5 | using System;
6 | using Xamarin.Forms;
7 | using Xamarin.Forms.Platform.Android;
8 |
9 | [assembly: ExportRenderer(typeof(CustomCard), typeof(AndroidCustomCardRenderer))]
10 | namespace CrossCardViewSample.Droid.CustomCardRenderer
11 | {
12 | public class AndroidCustomCardRenderer : CardView, IVisualElementRenderer
13 | {
14 | public AndroidCustomCardRenderer() : base(Forms.Context) { }
15 |
16 | public event EventHandler ElementChanged;
17 | ViewGroup packed;
18 | public void SetElement(VisualElement element)
19 | {
20 | var oldElement = this.Element;
21 |
22 | if (oldElement != null)
23 | oldElement.PropertyChanged -= HandlePropertyChanged;
24 |
25 | this.Element = element;
26 | if (this.Element != null)
27 | {
28 |
29 | this.Element.PropertyChanged += HandlePropertyChanged;
30 | }
31 |
32 | ViewGroup.RemoveAllViews();
33 | Tracker = new VisualElementTracker(this);
34 |
35 | Packager = new VisualElementPackager(this);
36 | Packager.Load();
37 |
38 | UseCompatPadding = true;
39 |
40 | SetContentPadding((int)TheView.Padding.Left, (int)TheView.Padding.Top,
41 | (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
42 |
43 | Radius = TheView.CornerRadius;
44 | SetCardBackgroundColor(TheView.BackgroundColor.ToAndroid());
45 |
46 | if (ElementChanged != null)
47 | ElementChanged(this, new VisualElementChangedEventArgs(oldElement, this.Element));
48 | }
49 |
50 | public CustomCard TheView
51 | {
52 | get { return this.Element == null ? null : (CustomCard)Element; }
53 | }
54 |
55 | void HandlePropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
56 | {
57 | if (e.PropertyName == "Content")
58 | {
59 | Tracker.UpdateLayout();
60 | }
61 | else if (e.PropertyName == CustomCard.PaddingProperty.PropertyName)
62 | {
63 | SetContentPadding((int)TheView.Padding.Left, (int)TheView.Padding.Top,
64 | (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
65 | }
66 | else if (e.PropertyName == CustomCard.CornerRadiusProperty.PropertyName)
67 | {
68 | this.Radius = TheView.CornerRadius;
69 | }
70 | else if (e.PropertyName == CustomCard.BackgroundColorProperty.PropertyName)
71 | {
72 | if (TheView.BackgroundColor != null)
73 | SetCardBackgroundColor(TheView.BackgroundColor.ToAndroid());
74 | }
75 | }
76 |
77 | public SizeRequest GetDesiredSize(int widthConstraint, int heightConstraint)
78 | {
79 | packed.Measure(widthConstraint, heightConstraint);
80 | return new SizeRequest(new Size(packed.MeasuredWidth, packed.MeasuredHeight));
81 | }
82 |
83 | public void UpdateLayout()
84 | {
85 | if (Tracker == null)
86 | return;
87 |
88 | Tracker.UpdateLayout();
89 | }
90 |
91 | public VisualElementTracker Tracker { get; private set; }
92 |
93 | public VisualElementPackager Packager { get; private set; }
94 |
95 | public Android.Views.ViewGroup ViewGroup { get { return this; } }
96 |
97 | public VisualElement Element { get; private set; }
98 | }
99 | }
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.OS;
4 |
5 | namespace CrossCardViewSample.Droid
6 | {
7 | [Activity (Label = "CrossCardViewSample", Icon = "@drawable/icon", MainLauncher = true, ScreenOrientation = ScreenOrientation.Portrait, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
8 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
9 | {
10 | protected override void OnCreate (Bundle bundle)
11 | {
12 | base.OnCreate (bundle);
13 | global::Xamarin.Forms.Forms.Init (this, bundle);
14 | LoadApplication (new CrossCardViewSample.App ());
15 | }
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("CrossCardViewSample.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("CrossCardViewSample.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Resources/Resource.Designer.cs:
--------------------------------------------------------------------------------
1 | #pragma warning disable 1591
2 | //------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Runtime Version:4.0.30319.42000
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | [assembly: global::Android.Runtime.ResourceDesignerAttribute("CrossCardViewSample.Droid.Resource", IsApplication=true)]
13 |
14 | namespace CrossCardViewSample.Droid
15 | {
16 |
17 |
18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
19 | public partial class Resource
20 | {
21 |
22 | static Resource()
23 | {
24 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
25 | }
26 |
27 | public static void UpdateIdValues()
28 | {
29 | global::Xamarin.Forms.Platform.Resource.String.ApplicationName = global::CrossCardViewSample.Droid.Resource.String.ApplicationName;
30 | global::Xamarin.Forms.Platform.Resource.String.Hello = global::CrossCardViewSample.Droid.Resource.String.Hello;
31 | }
32 |
33 | public partial class Attribute
34 | {
35 |
36 | // aapt resource value: 0x7f010000
37 | public const int cardBackgroundColor = 2130771968;
38 |
39 | // aapt resource value: 0x7f010001
40 | public const int cardCornerRadius = 2130771969;
41 |
42 | // aapt resource value: 0x7f010002
43 | public const int cardElevation = 2130771970;
44 |
45 | // aapt resource value: 0x7f010003
46 | public const int cardMaxElevation = 2130771971;
47 |
48 | // aapt resource value: 0x7f010005
49 | public const int cardPreventCornerOverlap = 2130771973;
50 |
51 | // aapt resource value: 0x7f010004
52 | public const int cardUseCompatPadding = 2130771972;
53 |
54 | // aapt resource value: 0x7f010006
55 | public const int contentPadding = 2130771974;
56 |
57 | // aapt resource value: 0x7f01000a
58 | public const int contentPaddingBottom = 2130771978;
59 |
60 | // aapt resource value: 0x7f010007
61 | public const int contentPaddingLeft = 2130771975;
62 |
63 | // aapt resource value: 0x7f010008
64 | public const int contentPaddingRight = 2130771976;
65 |
66 | // aapt resource value: 0x7f010009
67 | public const int contentPaddingTop = 2130771977;
68 |
69 | static Attribute()
70 | {
71 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
72 | }
73 |
74 | private Attribute()
75 | {
76 | }
77 | }
78 |
79 | public partial class Color
80 | {
81 |
82 | // aapt resource value: 0x7f030000
83 | public const int cardview_dark_background = 2130903040;
84 |
85 | // aapt resource value: 0x7f030001
86 | public const int cardview_light_background = 2130903041;
87 |
88 | // aapt resource value: 0x7f030002
89 | public const int cardview_shadow_end_color = 2130903042;
90 |
91 | // aapt resource value: 0x7f030003
92 | public const int cardview_shadow_start_color = 2130903043;
93 |
94 | static Color()
95 | {
96 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
97 | }
98 |
99 | private Color()
100 | {
101 | }
102 | }
103 |
104 | public partial class Dimension
105 | {
106 |
107 | // aapt resource value: 0x7f040000
108 | public const int cardview_compat_inset_shadow = 2130968576;
109 |
110 | // aapt resource value: 0x7f040001
111 | public const int cardview_default_elevation = 2130968577;
112 |
113 | // aapt resource value: 0x7f040002
114 | public const int cardview_default_radius = 2130968578;
115 |
116 | static Dimension()
117 | {
118 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
119 | }
120 |
121 | private Dimension()
122 | {
123 | }
124 | }
125 |
126 | public partial class Drawable
127 | {
128 |
129 | // aapt resource value: 0x7f020000
130 | public const int Icon = 2130837504;
131 |
132 | static Drawable()
133 | {
134 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
135 | }
136 |
137 | private Drawable()
138 | {
139 | }
140 | }
141 |
142 | public partial class String
143 | {
144 |
145 | // aapt resource value: 0x7f060001
146 | public const int ApplicationName = 2131099649;
147 |
148 | // aapt resource value: 0x7f060000
149 | public const int Hello = 2131099648;
150 |
151 | static String()
152 | {
153 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
154 | }
155 |
156 | private String()
157 | {
158 | }
159 | }
160 |
161 | public partial class Style
162 | {
163 |
164 | // aapt resource value: 0x7f050000
165 | public const int CardView = 2131034112;
166 |
167 | // aapt resource value: 0x7f050001
168 | public const int CardView_Dark = 2131034113;
169 |
170 | // aapt resource value: 0x7f050002
171 | public const int CardView_Light = 2131034114;
172 |
173 | static Style()
174 | {
175 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
176 | }
177 |
178 | private Style()
179 | {
180 | }
181 | }
182 |
183 | public partial class Styleable
184 | {
185 |
186 | public static int[] CardView = new int[] {
187 | 2130771968,
188 | 2130771969,
189 | 2130771970,
190 | 2130771971,
191 | 2130771972,
192 | 2130771973,
193 | 2130771974,
194 | 2130771975,
195 | 2130771976,
196 | 2130771977,
197 | 2130771978};
198 |
199 | // aapt resource value: 0
200 | public const int CardView_cardBackgroundColor = 0;
201 |
202 | // aapt resource value: 1
203 | public const int CardView_cardCornerRadius = 1;
204 |
205 | // aapt resource value: 2
206 | public const int CardView_cardElevation = 2;
207 |
208 | // aapt resource value: 3
209 | public const int CardView_cardMaxElevation = 3;
210 |
211 | // aapt resource value: 5
212 | public const int CardView_cardPreventCornerOverlap = 5;
213 |
214 | // aapt resource value: 4
215 | public const int CardView_cardUseCompatPadding = 4;
216 |
217 | // aapt resource value: 6
218 | public const int CardView_contentPadding = 6;
219 |
220 | // aapt resource value: 10
221 | public const int CardView_contentPaddingBottom = 10;
222 |
223 | // aapt resource value: 7
224 | public const int CardView_contentPaddingLeft = 7;
225 |
226 | // aapt resource value: 8
227 | public const int CardView_contentPaddingRight = 8;
228 |
229 | // aapt resource value: 9
230 | public const int CardView_contentPaddingTop = 9;
231 |
232 | static Styleable()
233 | {
234 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
235 | }
236 |
237 | private Styleable()
238 | {
239 | }
240 | }
241 | }
242 | }
243 | #pragma warning restore 1591
244 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace CrossCardViewSample.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init ();
26 | LoadApplication (new CrossCardViewSample.App ());
27 |
28 | return base.FinishedLaunching (app, options);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/CrossCardViewSample.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {40B36386-4798-4595-B7D3-08AE62369087}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Exe
11 | CrossCardViewSample.iOS
12 | Resources
13 | CrossCardViewSample
14 |
15 |
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\iPhoneSimulator\Debug
22 | DEBUG
23 | prompt
24 | 4
25 | false
26 | i386, x86_64
27 | None
28 | true
29 |
30 |
31 | none
32 | true
33 | bin\iPhoneSimulator\Release
34 | prompt
35 | 4
36 | None
37 | i386, x86_64
38 | false
39 |
40 |
41 | true
42 | full
43 | false
44 | bin\iPhone\Debug
45 | DEBUG
46 | prompt
47 | 4
48 | false
49 | ARMv7, ARM64
50 | iPhone Developer
51 | true
52 | Entitlements.plist
53 |
54 |
55 | none
56 | true
57 | bin\iPhone\Release
58 | prompt
59 | 4
60 | ARMv7, ARM64
61 | false
62 | iPhone Developer
63 | Entitlements.plist
64 |
65 |
66 | none
67 | True
68 | bin\iPhone\Ad-Hoc
69 | prompt
70 | 4
71 | False
72 | ARMv7, ARM64
73 | True
74 | Automatic:AdHoc
75 | iPhone Distribution
76 | Entitlements.plist
77 |
78 |
79 | none
80 | True
81 | bin\iPhone\AppStore
82 | prompt
83 | 4
84 | False
85 | ARMv7, ARM64
86 | Automatic:AppStore
87 | iPhone Distribution
88 | Entitlements.plist
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
126 | True
127 |
128 |
129 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
130 | True
131 |
132 |
133 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
134 | True
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/CustomAppleCard/AppleCardView.cs:
--------------------------------------------------------------------------------
1 | using CoreGraphics;
2 | using System;
3 | using UIKit;
4 |
5 | namespace CrossCardViewSample.iOS.CustomAppleCard
6 | {
7 | public class AppleCardView : UIView
8 | {
9 | public CGRect ZeroFrame { get; set; }
10 |
11 | public override CGRect Frame
12 | {
13 | get
14 | {
15 | return base.Frame;
16 | }
17 | set
18 | {
19 | base.Frame = value;
20 | this.DrawBorder(base.Frame, 0.0f);
21 | }
22 | }
23 |
24 | public AppleCardView() : base(){}
25 |
26 | public AppleCardView(CGRect frame) : base(frame)
27 | {
28 | this.DrawBorder(frame, 0.0f);
29 | }
30 |
31 | protected void DrawBorder(CGRect rect, nfloat radius)
32 | {
33 | this.ZeroFrame = this.Frame;
34 | this.Layer.MasksToBounds = false;
35 | this.Layer.ShadowColor = UIColor.Black.CGColor;
36 | this.Layer.ShadowOffset = new CGSize(0.0f, 0.0f);
37 | this.Layer.ShadowOpacity = 0.1f;
38 | this.Layer.BorderColor = UIColor.LightGray.CGColor;
39 | this.Layer.BorderWidth = 0.1f;
40 | this.Layer.CornerRadius = radius;
41 | }
42 |
43 | protected override void Dispose(bool disposing) { }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/CustomCardRenderer/AppleCustomCardRenderer.cs:
--------------------------------------------------------------------------------
1 | using CrossCardViewSample.CustomCardView;
2 | using CrossCardViewSample.iOS.CustomAppleCard;
3 | using CrossCardViewSample.iOS.CustomCardRenderer;
4 | using System;
5 | using UIKit;
6 | using Xamarin.Forms;
7 | using Xamarin.Forms.Platform.iOS;
8 |
9 | [assembly: ExportRenderer(typeof(CustomCard), typeof(AppleCustomCardRenderer))]
10 | namespace CrossCardViewSample.iOS.CustomCardRenderer
11 | {
12 | public class AppleCustomCardRenderer : AppleCardView, IVisualElementRenderer
13 | {
14 | public event EventHandler ElementChanged;
15 |
16 | public CustomCard TheView { get { return this.Element == null ? null : (CustomCard)Element; } }
17 |
18 | public VisualElementTracker Tracker { get; private set; }
19 |
20 | public VisualElementPackager Packager { get; private set; }
21 |
22 | public VisualElement Element { get; private set; }
23 |
24 | public UIView NativeView { get { return this as UIView; } }
25 |
26 | public UIViewController ViewController { get { return null; } }
27 |
28 | public void SetElement(VisualElement element)
29 | {
30 | var oldElement = this.Element;
31 |
32 | if (oldElement != null)
33 | {
34 | oldElement.PropertyChanged -= this.HandlePropertyChanged;
35 | }
36 |
37 | this.Element = element;
38 |
39 | if (this.Element != null)
40 | {
41 | this.Element.PropertyChanged += this.HandlePropertyChanged;
42 | }
43 |
44 | this.RemoveAllSubviews();
45 | this.Tracker = new VisualElementTracker(this);
46 |
47 | this.Packager = new VisualElementPackager(this);
48 | this.Packager.Load();
49 |
50 | this.SetContentPadding((int)TheView.Padding.Left, (int)TheView.Padding.Top, (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
51 |
52 | this.SetCardBackgroundColor(this.TheView.BackgroundColor.ToUIColor());
53 |
54 | if (ElementChanged != null)
55 | {
56 | this.ElementChanged(this, new VisualElementChangedEventArgs(oldElement, this.Element));
57 | }
58 | }
59 |
60 | public SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
61 | {
62 | var size = UIViewExtensions.GetSizeRequest(this.NativeView, widthConstraint, heightConstraint, 44.0, 44.0);
63 |
64 | return size;
65 | }
66 |
67 | public void SetElementSize(Size size)
68 | {
69 | this.Element.Layout(new Rectangle(this.Element.X, this.Element.Y, size.Width, size.Height));
70 | }
71 |
72 | protected override void Dispose(bool disposing){}
73 |
74 | private void HandlePropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
75 | {
76 | if (e.PropertyName == "Content")
77 | {
78 | //Tracker.UpdateLayout ();
79 | }
80 | else if (
81 | e.PropertyName == CustomCard.WidthProperty.PropertyName ||
82 | e.PropertyName == CustomCard.HeightProperty.PropertyName ||
83 | e.PropertyName == CustomCard.XProperty.PropertyName ||
84 | e.PropertyName == CustomCard.YProperty.PropertyName ||
85 | e.PropertyName == CustomCard.CornerRadiusProperty.PropertyName)
86 | {
87 | this.Element.Layout(this.Element.Bounds);
88 |
89 | var radius = (this.Element as CustomCard).CornerRadius;
90 | var bound = this.Element.Bounds;
91 | this.DrawBorder(new CoreGraphics.CGRect(bound.X, bound.Y, bound.Width, bound.Height), (nfloat)radius);
92 | }
93 | else if (e.PropertyName == CustomCard.PaddingProperty.PropertyName)
94 | {
95 | SetContentPadding((int)TheView.Padding.Left, (int)TheView.Padding.Top, (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
96 | }
97 | else if (e.PropertyName == CustomCard.BackgroundColorProperty.PropertyName)
98 | {
99 | if (TheView.BackgroundColor != null)
100 | {
101 | SetCardBackgroundColor(TheView.BackgroundColor.ToUIColor());
102 | }
103 | }
104 | }
105 |
106 | private void SetCardBackgroundColor(UIColor color)
107 | {
108 | this.BackgroundColor = color;
109 | }
110 |
111 | private void SetContentPadding(int left, int top, int right, int bottom) { }
112 | }
113 |
114 | internal static class Extensions
115 | {
116 | internal static void RemoveAllSubviews(this UIView super)
117 | {
118 | if (super == null)
119 | {
120 | return;
121 | }
122 | for (int i = 0; i < super.Subviews.Length; i++)
123 | {
124 | var subview = super.Subviews[i];
125 | subview.RemoveFromSuperview();
126 | }
127 | }
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.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 | 6.0
25 | CFBundleDisplayName
26 | CrossCardViewSample
27 | CFBundleIdentifier
28 | com.yourcompany.CrossCardViewSample
29 | CFBundleVersion
30 | 1.0
31 | CFBundleIconFiles
32 |
33 | Icon-60@2x.png
34 | Icon-60@3x.png
35 | Icon-76.png
36 | Icon-76@2x.png
37 | Default.png
38 | Default@2x.png
39 | Default-568h@2x.png
40 | Default-Portrait.png
41 | Default-Portrait@2x.png
42 | Icon-Small-40.png
43 | Icon-Small-40@2x.png
44 | Icon-Small-40@3x.png
45 | Icon-Small.png
46 | Icon-Small@2x.png
47 | Icon-Small@3x.png
48 |
49 | UILaunchStoryboardName
50 | LaunchScreen.storyboard
51 |
52 |
53 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.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 CrossCardViewSample.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 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.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("CrossCardViewSample.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("CrossCardViewSample.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 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.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 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/iTunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/iTunesArtwork
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/iTunesArtwork@2x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesartomatis/Xamarin-Forms-CardView/fefd45d82db99b08a26c67562a2fc95e91757d74/CrossCardViewSample/CrossCardViewSample.iOS/iTunesArtwork@2x
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample/App.cs:
--------------------------------------------------------------------------------
1 | using CrossCardViewSample.Pages;
2 | using Xamarin.Forms;
3 |
4 | namespace CrossCardViewSample
5 | {
6 | public class App : Application
7 | {
8 | public App ()
9 | {
10 | // The root page of your application
11 | MainPage = new CrossCardView();
12 | }
13 |
14 | protected override void OnStart ()
15 | {
16 | // Handle when your app starts
17 | }
18 |
19 | protected override void OnSleep ()
20 | {
21 | // Handle when your app sleeps
22 | }
23 |
24 | protected override void OnResume ()
25 | {
26 | // Handle when your app resumes
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample/CrossCardViewSample.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 2c9989f4-888e-4a79-948e-f9f919220d4b
7 |
8 |
9 | CrossCardViewSample
10 |
11 |
12 |
13 |
14 |
15 | CrossCardView.xaml
16 | Code
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Designer
25 | MSBuild:UpdateDesignTimeXaml
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample/CrossCardViewSample.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2c9989f4-888e-4a79-948e-f9f919220d4b
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample/CustomCardView/CustomCard.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace CrossCardViewSample.CustomCardView
4 | {
5 | public class CustomCard : ContentView
6 | {
7 | public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(p => p.CornerRadius, 3.0F);
8 | public new static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(p => p.BackgroundColor, Color.White);
9 |
10 | public float CornerRadius
11 | {
12 | get { return (float)GetValue(CornerRadiusProperty); }
13 | set { SetValue(CornerRadiusProperty, value); }
14 | }
15 |
16 | public new Color BackgroundColor
17 | {
18 | get { return (Color)GetValue(BackgroundColorProperty); }
19 | set { SetValue(BackgroundColorProperty, value); }
20 | }
21 |
22 | protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
23 | {
24 | if (Content == null)
25 | return new SizeRequest(new Size(100, 100));
26 |
27 | return Content.GetSizeRequest(widthConstraint, heightConstraint);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample/GettingStarted.Xamarin:
--------------------------------------------------------------------------------
1 |
2 | GS\XF\CS\App\GettingStarted.html
3 | false
4 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample/Pages/CrossCardView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
10 |
11 |
12 |
16 |
17 |
18 |
21 |
22 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CrossCardViewSample/CrossCardViewSample/Pages/CrossCardView.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace CrossCardViewSample.Pages
4 | {
5 | public partial class CrossCardView : ContentPage
6 | {
7 | public CrossCardView ()
8 | {
9 | InitializeComponent ();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Xamarin.Forms CardView
2 | This is a simple sample to do cross platform (Android and iOS) CardView on Xamarin using Shared Project
3 |
4 | The card was made using custom renderers for each platform
5 |
6 | Android:
7 | Used CardView NuGet package
8 |
9 | iOS:
10 | Created a custom card using UIView
11 |
--------------------------------------------------------------------------------