├── .gitattributes ├── .gitignore ├── Directory.Build.props ├── LICENSE ├── README.md ├── appveyor.yml ├── bootbuild.ps1 ├── build.cake ├── samples ├── Iconize.Sample.Android │ ├── Assets │ │ └── AboutAssets.txt │ ├── Iconize.Sample.Android.csproj │ ├── 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 │ │ ├── layout │ │ ├── tabs.axml │ │ └── toolbar.axml │ │ ├── values-v21 │ │ └── style.xml │ │ └── values │ │ ├── colors.xml │ │ └── style.xml ├── Iconize.Sample.UWP │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-100.png │ │ ├── LockScreenLogo.scale-125.png │ │ ├── LockScreenLogo.scale-150.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── LockScreenLogo.scale-400.png │ │ ├── SplashScreen.scale-100.png │ │ ├── SplashScreen.scale-125.png │ │ ├── SplashScreen.scale-150.png │ │ ├── SplashScreen.scale-200.png │ │ ├── SplashScreen.scale-400.png │ │ ├── Square150x150Logo.scale-100.png │ │ ├── Square150x150Logo.scale-125.png │ │ ├── Square150x150Logo.scale-150.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-400.png │ │ ├── Square44x44Logo.scale-100.png │ │ ├── Square44x44Logo.scale-125.png │ │ ├── Square44x44Logo.scale-150.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.scale-400.png │ │ ├── Square44x44Logo.targetsize-16_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-256_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-32_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-48_altform-unplated.png │ │ ├── StoreLogo.png │ │ ├── Wide310x150Logo.scale-100.png │ │ ├── Wide310x150Logo.scale-125.png │ │ ├── Wide310x150Logo.scale-150.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── Wide310x150Logo.scale-400.png │ ├── Iconize.Sample.UWP.csproj │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ └── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml ├── Iconize.Sample.WPF │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── Iconize.Sample.WPF.csproj │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── iconize-entypoplus.ttf │ ├── iconize-fontawesome-brands.ttf │ ├── iconize-fontawesome-regular.ttf │ ├── iconize-fontawesome-solid.ttf │ ├── iconize-ionicons.ttf │ ├── iconize-jam-icons.ttf │ ├── iconize-material.ttf │ ├── iconize-materialdesignicons.ttf │ ├── iconize-meteocons.ttf │ ├── iconize-simplelineicons.ttf │ ├── iconize-typicons.ttf │ └── iconize-weathericons.ttf ├── Iconize.Sample.iOS │ ├── AppDelegate.cs │ ├── Entitlements.plist │ ├── Iconize.Sample.iOS.csproj │ ├── Info.plist │ ├── Main.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── 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 ├── Iconize.Sample │ ├── App.xaml │ ├── App.xaml.cs │ ├── Iconize.Sample.csproj │ ├── ModuleWrapper.cs │ ├── Page1.xaml │ └── Page1.xaml.cs └── IconizeSamples.sln └── src ├── .editorconfig ├── Directory.Build.props ├── Fonts ├── Directory.Build.props ├── Plugin.Iconize.EntypoPlus │ ├── EntypoPlusCollection.cs │ ├── EntypoPlusModule.cs │ ├── Plugin.Iconize.EntypoPlus.csproj │ ├── Resources │ │ └── Resource.Designer.cs │ └── iconize-entypoplus.ttf ├── Plugin.Iconize.FontAwesome │ ├── FontAwesomeBrandsModule.cs │ ├── FontAwesomeCollection.cs │ ├── FontAwesomeRegularModule.cs │ ├── FontAwesomeSolidModule.cs │ ├── Plugin.Iconize.FontAwesome.csproj │ ├── Resources │ │ └── Resource.Designer.cs │ ├── iconize-fontawesome-brands.ttf │ ├── iconize-fontawesome-regular.ttf │ └── iconize-fontawesome-solid.ttf ├── Plugin.Iconize.FontAwesomePro │ ├── FontAwesomeProBrandsModule.cs │ ├── FontAwesomeProCollection.cs │ ├── FontAwesomeProLightModule.cs │ ├── FontAwesomeProRegularModule.cs │ ├── FontAwesomeProSolidModule.cs │ ├── Plugin.Iconize.FontAwesomePro.csproj │ └── Resources │ │ └── Resource.designer.cs ├── Plugin.Iconize.Ionicons │ ├── IoniconsCollection.cs │ ├── IoniconsModule.cs │ ├── Plugin.Iconize.Ionicons.csproj │ ├── Resources │ │ └── Resource.Designer.cs │ └── iconize-ionicons.ttf ├── Plugin.Iconize.JamIcons │ ├── JamIconsCollection.cs │ ├── JamIconsModule.cs │ ├── Plugin.Iconize.JamIcons.csproj │ ├── Resources │ │ └── Resource.designer.cs │ └── iconize-jam-icons.ttf ├── Plugin.Iconize.Material │ ├── MaterialCollection.cs │ ├── MaterialModule.cs │ ├── Plugin.Iconize.Material.csproj │ ├── Resources │ │ └── Resource.Designer.cs │ └── iconize-material.ttf ├── Plugin.Iconize.MaterialDesignIcons │ ├── MaterialDesignIconsCollection.cs │ ├── MaterialDesignIconsModule.cs │ ├── Plugin.Iconize.MaterialDesignIcons.csproj │ ├── Resources │ │ └── Resource.designer.cs │ └── iconize-materialdesignicons.ttf ├── Plugin.Iconize.Meteocons │ ├── MeteoconsCollection.cs │ ├── MeteoconsModule.cs │ ├── Plugin.Iconize.Meteocons.csproj │ ├── Resources │ │ └── Resource.Designer.cs │ └── iconize-meteocons.ttf ├── Plugin.Iconize.SimpleLineIcons │ ├── Plugin.Iconize.SimpleLineIcons.csproj │ ├── Resources │ │ └── Resource.Designer.cs │ ├── SimpleLineIconsCollection.cs │ ├── SimpleLineIconsModule.cs │ └── iconize-simplelineicons.ttf ├── Plugin.Iconize.Typicons │ ├── Plugin.Iconize.Typicons.csproj │ ├── Resources │ │ └── Resource.Designer.cs │ ├── TypiconsCollection.cs │ ├── TypiconsModule.cs │ └── iconize-typicons.ttf └── Plugin.Iconize.WeatherIcons │ ├── Plugin.Iconize.WeatherIcons.csproj │ ├── Resources │ └── Resource.Designer.cs │ ├── WeatherIconsCollection.cs │ ├── WeatherIconsModule.cs │ └── iconize-weathericons.ttf ├── Iconize.sln ├── Plugin.Iconize ├── Icon.cs ├── IconButton.cs ├── IconCarouselPage.cs ├── IconImage.cs ├── IconLabel.cs ├── IconModule.cs ├── IconNavigationPage.cs ├── IconTabbedPage.cs ├── IconToolbarItem.cs ├── Iconize.cs ├── IconizeExtensions.cs ├── Platform │ ├── Android │ │ ├── IconDrawable.cs │ │ ├── MenuClickListener.cs │ │ ├── PlatformExtensions.cs │ │ └── Renderers │ │ │ ├── IconButtonRenderer.cs │ │ │ ├── IconImageRenderer.cs │ │ │ ├── IconLabelRenderer.cs │ │ │ ├── IconNavigationRenderer.cs │ │ │ └── IconTabbedPageRenderer.cs │ ├── UWP │ │ ├── PlatformExtensions.cs │ │ └── Renderers │ │ │ ├── IconButtonRenderer.cs │ │ │ ├── IconImageRenderer.cs │ │ │ ├── IconLabelRenderer.cs │ │ │ ├── IconNavigationPageRenderer.cs │ │ │ └── IconTabbedPageRenderer.cs │ ├── WPF │ │ ├── PlatformExtensions.cs │ │ └── Renderers │ │ │ ├── IconButtonRenderer.cs │ │ │ ├── IconImageRenderer.cs │ │ │ └── IconLabelRenderer.cs │ ├── iOS │ │ ├── PlatformExtensions.cs │ │ └── Renderers │ │ │ ├── IconButtonRenderer.cs │ │ │ ├── IconImageRenderer.cs │ │ │ ├── IconLabelRenderer.cs │ │ │ ├── IconNavigationRenderer.cs │ │ │ └── IconTabbedPageRenderer.cs │ └── macOS │ │ ├── PlatformExtensions.cs │ │ └── Renderers │ │ ├── IconButtonRenderer.cs │ │ ├── IconImageRenderer.cs │ │ ├── IconLabelRenderer.cs │ │ └── IconTabbedPageRenderer.cs ├── Plugin.Iconize.csproj └── Resources │ └── Resource.Designer.cs └── global.json /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) Jeremy Marcus 4 | https://github.com/jsmarcus/Iconize/blob/master/LICENSE 5 | https://github.com/jsmarcus/Iconize 6 | Jeremy Marcus 7 | Jeremy Marcus 8 | xamarin;android;ios;mac;forms;monodroid;monotouch;xamarin.android;xamarin.ios;xamarin.forms;xamarin.mac;uwp 9 | false 10 | Easily add icon fonts to your Xamarin.Forms applications! 11 | https://github.com/jsmarcus/Iconize 12 | git 13 | Xam.$(MSBuildProjectName) 14 | $(AssemblyName) ($(TargetFramework)) 15 | en 16 | 3.5.0 17 | 18 | 19 | 20 | latest 21 | $(NoWarn);1587;1591;1701;1702;1705;VSX1000;NU1603 22 | true 23 | true 24 | True 25 | True 26 | $(MSBuildThisFileDirectory)artifacts 27 | $(Build_ArtifactStagingDirectory) 28 | 29 | 30 | 31 | full 32 | $(MSBuildProjectName.Contains('Sample')) 33 | $(MSBuildProjectName.Contains('Test')) 34 | 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | %% Iconize Plugin for Xamarin 2 | 3 | Copyright (c) Jeremy Marcus 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | ==== 12 | 13 | The Iconize Plugin for Xamarin is a .NET for Xamarin port of the android-iconify project, which itself is located at https://github.com/JoanZapata/android-iconify. 14 | 15 | %% android-iconify 16 | 17 | Copyright 2015 Joan Zapata 18 | 19 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 20 | 21 | http://www.apache.org/licenses/LICENSE-2.0 22 | 23 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 24 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 3.5.0.{build} 2 | image: Visual Studio 2017 3 | dotnet_csproj: 4 | patch: true 5 | file: '**\*.csproj;**\*.props' 6 | version: '{version}' 7 | package_version: '{version}' 8 | assembly_version: '{version}' 9 | file_version: '{version}' 10 | informational_version: '{version}' 11 | nuget: 12 | project_feed: true 13 | build_script: 14 | - ps: ./bootbuild.ps1 15 | artifacts: 16 | - path: ./artifacts/*.nupkg 17 | name: NuGet -------------------------------------------------------------------------------- /bootbuild.ps1: -------------------------------------------------------------------------------- 1 | Invoke-WebRequest http://cakebuild.net/download/bootstrapper/windows -OutFile build.ps1 2 | ./build.ps1 -------------------------------------------------------------------------------- /build.cake: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // ARGUMENTS 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | var target = Argument("target", "Default"); 6 | var configuration = Argument("configuration", "Release"); 7 | var version = EnvironmentVariable("APPVEYOR_BUILD_VERSION") ?? Argument("version", "3.5.0"); 8 | 9 | ////////////////////////////////////////////////////////////////////// 10 | // PREPARATION 11 | ////////////////////////////////////////////////////////////////////// 12 | 13 | var solution = "./src/Iconize.sln"; 14 | 15 | ////////////////////////////////////////////////////////////////////// 16 | // TASKS 17 | ////////////////////////////////////////////////////////////////////// 18 | 19 | Task("Clean") 20 | .Does(() => 21 | { 22 | CleanDirectories("./artifacts/"); 23 | 24 | CleanDirectories("./**/bin"); 25 | CleanDirectories("./**/obj"); 26 | }); 27 | 28 | Task("Restore") 29 | .IsDependentOn("Clean") 30 | .Does(() => 31 | { 32 | MSBuild(solution, settings => settings 33 | .SetConfiguration(configuration) 34 | .SetVerbosity(Verbosity.Minimal) 35 | .UseToolVersion(MSBuildToolVersion.VS2017) 36 | .SetMSBuildPlatform(MSBuildPlatform.x86) 37 | .SetPlatformTarget(PlatformTarget.MSIL) 38 | .SetMaxCpuCount(0) 39 | .WithTarget("restore")); 40 | }); 41 | 42 | Task("Build") 43 | .IsDependentOn("Restore") 44 | .Does(() => 45 | { 46 | MSBuild(solution, settings => settings 47 | .SetConfiguration(configuration) 48 | .SetVerbosity(Verbosity.Minimal) 49 | .UseToolVersion(MSBuildToolVersion.VS2017) 50 | .SetMSBuildPlatform(MSBuildPlatform.x86) 51 | .SetPlatformTarget(PlatformTarget.MSIL) 52 | .SetMaxCpuCount(0) 53 | .WithTarget("build")); 54 | }); 55 | 56 | Task("Pack") 57 | .IsDependentOn("Build") 58 | .Does(() => 59 | { 60 | MSBuild(solution, settings => settings 61 | .SetConfiguration(configuration) 62 | .SetVerbosity(Verbosity.Minimal) 63 | .UseToolVersion(MSBuildToolVersion.VS2017) 64 | .SetMSBuildPlatform(MSBuildPlatform.x86) 65 | .SetPlatformTarget(PlatformTarget.MSIL) 66 | .SetMaxCpuCount(0) 67 | .WithTarget("pack")); 68 | }); 69 | 70 | ////////////////////////////////////////////////////////////////////// 71 | // TASK TARGETS 72 | ////////////////////////////////////////////////////////////////////// 73 | 74 | Task("Default") 75 | .IsDependentOn("Pack"); 76 | 77 | ////////////////////////////////////////////////////////////////////// 78 | // EXECUTION 79 | ////////////////////////////////////////////////////////////////////// 80 | 81 | RunTarget(target); -------------------------------------------------------------------------------- /samples/Iconize.Sample.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 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 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Android.OS; 4 | 5 | namespace Iconize.Sample.Droid 6 | { 7 | [Activity(Label = "Iconize Sample", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 8 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 9 | { 10 | protected override void OnCreate(Bundle savedInstanceState) 11 | { 12 | base.OnCreate(savedInstanceState); 13 | 14 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState); 15 | 16 | ToolbarResource = Resource.Layout.toolbar; 17 | TabLayoutResource = Resource.Layout.tabs; 18 | Plugin.Iconize.Iconize.Init(Resource.Id.toolbar, Resource.Id.tabs); 19 | LoadApplication(new App()); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following set of attributes. 5 | // Change these attribute values to modify the information associated with an assembly. 6 | [assembly: AssemblyTitle("Iconize.Sample.Android")] 7 | [assembly: AssemblyDescription("")] 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("Iconize.Sample.Android")] 11 | [assembly: AssemblyCopyright("Copyright © 2017")] 12 | [assembly: AssemblyTrademark("")] 13 | [assembly: AssemblyCulture("")] 14 | [assembly: ComVisible(false)] 15 | 16 | // Version information for an assembly consists of the following four values: 17 | // 18 | // Major Version Minor Version Build Number Revision 19 | // 20 | // You can specify all the values or you can default the Build and Revision Numbers by using the '*' 21 | // as shown below: [assembly: AssemblyVersion("1.0.*")] 22 | [assembly: AssemblyVersion("2.0.0")] 23 | [assembly: AssemblyFileVersion("2.0.0")] -------------------------------------------------------------------------------- /samples/Iconize.Sample.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 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.Android/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.Android/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.Android/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.Android/Resources/drawable/icon.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/layout/tabs.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/layout/toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/values-v21/style.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | #2196F3 4 | #1976D2 5 | #FFC107 6 | #F5F5F5 7 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.Android/Resources/values/style.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | 11 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Windows.ApplicationModel; 3 | using Windows.ApplicationModel.Activation; 4 | using Windows.UI.Xaml; 5 | using Windows.UI.Xaml.Controls; 6 | using Windows.UI.Xaml.Navigation; 7 | 8 | namespace Iconize.Sample.UWP 9 | { 10 | /// 11 | /// Provides application-specific behavior to supplement the default Application class. 12 | /// 13 | sealed partial class App 14 | { 15 | /// 16 | /// Initializes the singleton application object. This is the first line of authored code 17 | /// executed, and as such is the logical equivalent of main() or WinMain(). 18 | /// 19 | public App() 20 | { 21 | this.InitializeComponent(); 22 | this.Suspending += OnSuspending; 23 | } 24 | 25 | /// 26 | /// Invoked when the application is launched normally by the end user. Other entry points 27 | /// will be used such as when the application is launched to open a specific file. 28 | /// 29 | /// Details about the launch request and process. 30 | protected override void OnLaunched(LaunchActivatedEventArgs e) 31 | { 32 | 33 | #if DEBUG 34 | if (System.Diagnostics.Debugger.IsAttached) 35 | { 36 | this.DebugSettings.EnableFrameRateCounter = true; 37 | } 38 | #endif 39 | 40 | Frame rootFrame = Window.Current.Content as Frame; 41 | 42 | // Do not repeat app initialization when the Window already has content, 43 | // just ensure that the window is active 44 | if (rootFrame == null) 45 | { 46 | // Create a Frame to act as the navigation context and navigate to the first page 47 | rootFrame = new Frame(); 48 | 49 | rootFrame.NavigationFailed += OnNavigationFailed; 50 | 51 | Xamarin.Forms.Forms.Init(e); 52 | 53 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 54 | { 55 | //TODO: Load state from previously suspended application 56 | } 57 | 58 | // Place the frame in the current Window 59 | Window.Current.Content = rootFrame; 60 | } 61 | 62 | if (rootFrame.Content == null) 63 | { 64 | // When the navigation stack isn't restored navigate to the first page, 65 | // configuring the new page by passing required information as a navigation 66 | // parameter 67 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 68 | } 69 | // Ensure the current window is active 70 | Window.Current.Activate(); 71 | } 72 | 73 | /// 74 | /// Invoked when Navigation to a certain page fails 75 | /// 76 | /// The Frame which failed navigation 77 | /// Details about the navigation failure 78 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 79 | { 80 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 81 | } 82 | 83 | /// 84 | /// Invoked when application execution is being suspended. Application state is saved 85 | /// without knowing whether the application will be terminated or resumed with the contents 86 | /// of memory still intact. 87 | /// 88 | /// The source of the suspend request. 89 | /// Details about the suspend request. 90 | private void OnSuspending(object sender, SuspendingEventArgs e) 91 | { 92 | var deferral = e.SuspendingOperation.GetDeferral(); 93 | //TODO: Save application state and stop any background activity 94 | deferral.Complete(); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-100.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-125.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-150.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/LockScreenLogo.scale-400.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/StoreLogo.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.UWP/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 2 | 3 | namespace Iconize.Sample.UWP 4 | { 5 | /// 6 | /// An empty page that can be used on its own or navigated to within a Frame. 7 | /// 8 | public sealed partial class MainPage 9 | { 10 | public MainPage() 11 | { 12 | this.InitializeComponent(); 13 | 14 | LoadApplication(new Sample.App()); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | Iconize.Sample.UWP 18 | Jeremy 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 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following set of attributes. 5 | // Change these attribute values to modify the information associated with an assembly. 6 | [assembly: AssemblyTitle("Iconize.Sample.UWP")] 7 | [assembly: AssemblyDescription("")] 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("Iconize.Sample.UWP")] 11 | [assembly: AssemblyCopyright("Copyright © 2017")] 12 | [assembly: AssemblyTrademark("")] 13 | [assembly: AssemblyCulture("")] 14 | 15 | // Version information for an assembly consists of the following four values: 16 | // 17 | // Major Version Minor Version Build Number Revision 18 | // 19 | // You can specify all the values or you can default the Build and Revision Numbers by using the '*' 20 | // as shown below: [assembly: AssemblyVersion("1.0.*")] 21 | [assembly: AssemblyVersion("2.0.0")] 22 | [assembly: AssemblyFileVersion("2.0.0")] 23 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /samples/Iconize.Sample.UWP/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Iconize.Sample.WPF 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Platform.WPF; 3 | 4 | namespace Iconize.Sample.WPF 5 | { 6 | /// 7 | /// Interaction logic for MainWindow.xaml 8 | /// 9 | public partial class MainWindow : FormsApplicationPage 10 | { 11 | public MainWindow() 12 | { 13 | InitializeComponent(); 14 | 15 | Forms.Init(); 16 | Plugin.Iconize.Iconize.Init(); 17 | 18 | LoadApplication(new Sample.App()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("Iconize.Sample.WPF")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("Iconize.Sample.WPF")] 15 | [assembly: AssemblyCopyright("Copyright © 2019")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Iconize.Sample.WPF.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | public static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Iconize.Sample.WPF.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Iconize.Sample.WPF.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-entypoplus.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-entypoplus.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-fontawesome-brands.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-fontawesome-brands.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-fontawesome-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-fontawesome-regular.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-fontawesome-solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-fontawesome-solid.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-ionicons.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-jam-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-jam-icons.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-material.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-material.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-materialdesignicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-materialdesignicons.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-meteocons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-meteocons.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-simplelineicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-simplelineicons.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-typicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-typicons.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.WPF/iconize-weathericons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.WPF/iconize-weathericons.ttf -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Linq; 3 | using Foundation; 4 | using UIKit; 5 | 6 | namespace Iconize.Sample.iOS 7 | { 8 | // The UIApplicationDelegate for the application. This class is responsible for launching the 9 | // User Interface of the application, as well as listening (and optionally responding) to 10 | // application events from iOS. 11 | [Register("AppDelegate")] 12 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 13 | { 14 | // 15 | // This method is invoked when the application has loaded and is ready to run. In this 16 | // method you should instantiate the window, load the UI into it and then make the window 17 | // visible. 18 | // 19 | // You have 17 seconds to return from this method, or iOS will terminate your application. 20 | // 21 | public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) 22 | { 23 | global::Xamarin.Forms.Forms.Init(); 24 | 25 | foreach (var familyName in UIFont.FamilyNames.OrderBy(x => x)) 26 | { 27 | System.Console.WriteLine($"Family: {familyName}"); 28 | foreach (var name in UIFont.FontNamesForFamilyName(familyName).OrderBy(y => y)) 29 | { 30 | System.Console.WriteLine(name); 31 | } 32 | } 33 | 34 | LoadApplication(new App()); 35 | 36 | return base.FinishedLaunching(uiApplication, launchOptions); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.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 | 7.0 25 | CFBundleDisplayName 26 | Iconize Sample 27 | CFBundleVersion 28 | 1.0 29 | CFBundleIconFiles 30 | 31 | Icon-60@2x.png 32 | Icon-76.png 33 | Icon-76@2x.png 34 | Default.png 35 | Default@2x.png 36 | Default-568h@2x.png 37 | Default-Portrait.png 38 | Default-Portrait@2x.png 39 | Icon-Small-40.png 40 | Icon-Small-40@2x.png 41 | Icon-Small.png 42 | Icon-Small@2x.png 43 | 44 | UILaunchStoryboardName 45 | LaunchScreen 46 | UIAppFonts 47 | 48 | iconize-entypoplus.ttf 49 | iconize-fontawesome-regular.ttf 50 | iconize-fontawesome-solid.ttf 51 | iconize-fontawesome-brands.ttf 52 | iconize-ionicons.ttf 53 | iconize-material.ttf 54 | iconize-meteocons.ttf 55 | iconize-simplelineicons.ttf 56 | iconize-typicons.ttf 57 | iconize-weathericons.ttf 58 | 59 | CFBundleShortVersionString 60 | 61 | CFBundleIdentifier 62 | com.iconize.Sample 63 | 64 | 65 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace Iconize.Sample.iOS 4 | { 5 | public class Application 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, "AppDelegate"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following set of attributes. 5 | // Change these attribute values to modify the information associated with an assembly. 6 | [assembly: AssemblyTitle("Iconize.Sample.iOS")] 7 | [assembly: AssemblyDescription("")] 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("Iconize.Sample.iOS")] 11 | [assembly: AssemblyCopyright("Copyright © 2017")] 12 | [assembly: AssemblyTrademark("")] 13 | [assembly: AssemblyCulture("")] 14 | 15 | // Setting ComVisible to false makes the types in this assembly not visible to COM components. If you 16 | // need to access a type in this assembly from COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version Minor Version Build Number Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers by using the '*' 27 | // as shown below: [assembly: AssemblyVersion("1.0.*")] 28 | [assembly: AssemblyVersion("2.0.0")] 29 | [assembly: AssemblyFileVersion("2.0.0")] -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Default.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-60@2x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-60@3x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-76.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-76@2x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-Small-40.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-Small.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-Small@2x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/Resources/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/Resources/Icon-Small@3x.png -------------------------------------------------------------------------------- /samples/Iconize.Sample.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 | -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/iTunesArtwork -------------------------------------------------------------------------------- /samples/Iconize.Sample.iOS/iTunesArtwork@2x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/samples/Iconize.Sample.iOS/iTunesArtwork@2x -------------------------------------------------------------------------------- /samples/Iconize.Sample/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /samples/Iconize.Sample/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Plugin.Iconize; 4 | using Xamarin.Forms.PlatformConfiguration.AndroidSpecific; 5 | using Xamarin.Forms.Xaml; 6 | 7 | namespace Iconize.Sample 8 | { 9 | /// 10 | /// 11 | /// 12 | /// 13 | [XamlCompilation(XamlCompilationOptions.Compile)] 14 | public partial class App : Xamarin.Forms.Application 15 | { 16 | /// 17 | /// Initializes a new instance of the class. 18 | /// 19 | public App() 20 | { 21 | InitializeComponent(); 22 | 23 | Plugin.Iconize.Iconize 24 | .With(new Plugin.Iconize.Fonts.EntypoPlusModule()) 25 | .With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule()) 26 | .With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule()) 27 | .With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule()) 28 | .With(new Plugin.Iconize.Fonts.IoniconsModule()) 29 | .With(new Plugin.Iconize.Fonts.JamIconsModule()) 30 | .With(new Plugin.Iconize.Fonts.MaterialModule()) 31 | .With(new Plugin.Iconize.Fonts.MeteoconsModule()) 32 | .With(new Plugin.Iconize.Fonts.SimpleLineIconsModule()) 33 | .With(new Plugin.Iconize.Fonts.TypiconsModule()) 34 | .With(new Plugin.Iconize.Fonts.WeatherIconsModule()); 35 | 36 | // The root page of your application 37 | var tabbedPage = new IconTabbedPage { Title = "Iconize" }; 38 | tabbedPage.On().SetBarItemColor(Xamarin.Forms.Color.Yellow); 39 | tabbedPage.On().SetBarSelectedItemColor(Xamarin.Forms.Color.Black); 40 | tabbedPage.On().SetToolbarPlacement(ToolbarPlacement.Bottom); 41 | 42 | for (int i = 0; i < Math.Min(Plugin.Iconize.Iconize.Modules.Count, 5); i++) 43 | { 44 | var module = Plugin.Iconize.Iconize.Modules[i]; 45 | var bc = new ModuleWrapper(module); 46 | var icon = module.Keys.FirstOrDefault(); 47 | tabbedPage.Children.Add(new Page1 48 | { 49 | BindingContext = bc, 50 | Icon = icon 51 | }); 52 | } 53 | 54 | //foreach (var module in Plugin.Iconize.Iconize.Modules) 55 | //{ 56 | // var bc = new ModuleWrapper(module); 57 | // var icon = module.Keys.FirstOrDefault(); 58 | // tabbedPage.Children.Add(new Page1 59 | // { 60 | // BindingContext = bc, 61 | // Icon = icon 62 | // }); 63 | //} 64 | 65 | MainPage = new IconNavigationPage(tabbedPage); 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /samples/Iconize.Sample/Iconize.Sample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | latest 6 | https://ci.appveyor.com/nuget/iconize; 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/Iconize.Sample/ModuleWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Runtime.CompilerServices; 5 | using System.Windows.Input; 6 | using Plugin.Iconize; 7 | using Xamarin.Forms; 8 | 9 | namespace Iconize.Sample 10 | { 11 | public class ModuleWrapper : INotifyPropertyChanged 12 | { 13 | #region Commands 14 | 15 | private Command _modalTestCommand; 16 | public ICommand ModalTestCommand => _modalTestCommand ?? (_modalTestCommand = new Command(ExecuteModalTest)); 17 | 18 | private Command _visibleTestCommand; 19 | public ICommand VisibleTestCommand => _visibleTestCommand ?? (_visibleTestCommand = new Command(ExecuteVisibleTest)); 20 | 21 | #endregion Commands 22 | 23 | #region Events 24 | 25 | public event PropertyChangedEventHandler PropertyChanged; 26 | 27 | #endregion Events 28 | 29 | #region Members 30 | 31 | private IIconModule _module; 32 | 33 | #endregion Members 34 | 35 | #region Properties 36 | 37 | public ICollection Characters => _module.Characters; 38 | 39 | public String FontFamily => _module.FontFamily; 40 | 41 | private Boolean _visibleTest; 42 | public Boolean VisibleTest 43 | { 44 | get 45 | { 46 | return _visibleTest; 47 | } 48 | set 49 | { 50 | _visibleTest = value; 51 | NotifyPropertyChanged(); 52 | } 53 | } 54 | 55 | #endregion Properties 56 | 57 | public ModuleWrapper(IIconModule module) 58 | { 59 | _module = module; 60 | } 61 | 62 | public void ExecuteModalTest() 63 | { 64 | Application.Current.MainPage.Navigation.PushModalAsync(new IconNavigationPage(new Page1 { BindingContext = this })); 65 | } 66 | 67 | public void ExecuteVisibleTest() 68 | { 69 | VisibleTest = !VisibleTest; 70 | } 71 | 72 | protected virtual void NotifyPropertyChanged([CallerMemberName] String propertyName = "") => OnPropertyChanged(new PropertyChangedEventArgs(propertyName)); 73 | 74 | protected virtual void OnPropertyChanged(PropertyChangedEventArgs e) => PropertyChanged?.Invoke(this, e); 75 | } 76 | } -------------------------------------------------------------------------------- /samples/Iconize.Sample/Page1.xaml: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 10 | 14 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 41 | 46 | 51 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /samples/Iconize.Sample/Page1.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using Xamarin.Forms.Xaml; 4 | 5 | namespace Iconize.Sample 6 | { 7 | /// 8 | /// 9 | /// 10 | /// 11 | [XamlCompilation(XamlCompilationOptions.Compile)] 12 | public partial class Page1 : ContentPage 13 | { 14 | /// 15 | /// Initializes a new instance of the class. 16 | /// 17 | public Page1() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private void ClickTest(object sender, EventArgs e) 23 | { 24 | (BindingContext as ModuleWrapper)?.ExecuteVisibleTest(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/.editorconfig: -------------------------------------------------------------------------------- 1 | # Rules in this file were initially inferred by Visual Studio IntelliCode from the D:\Projects\Enterprise360\Manager360 codebase based on best match to current usage at 8/15/2018 2 | # You can modify the rules from these initially generated values to suit your own policies 3 | # You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference 4 | [*.cs] 5 | 6 | #Core editorconfig formatting - indentation 7 | 8 | #use soft tabs (spaces) for indentation 9 | indent_style = space 10 | 11 | #Formatting - indentation options 12 | 13 | #indent switch case contents. 14 | csharp_indent_case_contents = true 15 | #indent switch labels 16 | csharp_indent_switch_labels = true 17 | 18 | #Formatting - new line options 19 | 20 | #place catch statements on a new line 21 | csharp_new_line_before_catch = true 22 | #place else statements on a new line 23 | csharp_new_line_before_else = true 24 | #require finally statements to be on a new line after the closing brace 25 | csharp_new_line_before_finally = true 26 | #require braces to be on a new line for types, methods, control_blocks, object_collection, accessors, and properties (also known as "Allman" style) 27 | csharp_new_line_before_open_brace = all 28 | 29 | #Formatting - organize using options 30 | 31 | #sort System.* using directives alphabetically, and place them before other usings 32 | dotnet_sort_system_directives_first = true 33 | 34 | #Formatting - spacing options 35 | 36 | #require a space before the colon for bases or interfaces in a type declaration 37 | csharp_space_after_colon_in_inheritance_clause = true 38 | #require a space after a keyword in a control flow statement such as a for loop 39 | csharp_space_after_keywords_in_control_flow_statements = true 40 | #require a space before the colon for bases or interfaces in a type declaration 41 | csharp_space_before_colon_in_inheritance_clause = true 42 | #remove space within empty argument list parentheses 43 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 44 | #remove space between method call name and opening parenthesis 45 | csharp_space_between_method_call_name_and_opening_parenthesis = false 46 | #do not place space characters after the opening parenthesis and before the closing parenthesis of a method call 47 | csharp_space_between_method_call_parameter_list_parentheses = false 48 | #remove space within empty parameter list parentheses for a method declaration 49 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 50 | #place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list. 51 | csharp_space_between_method_declaration_parameter_list_parentheses = false 52 | 53 | #Formatting - wrapping options 54 | 55 | #leave code block on single line 56 | csharp_preserve_single_line_blocks = true 57 | 58 | #Style - expression bodied member options 59 | 60 | #prefer expression-bodied members for accessors 61 | csharp_style_expression_bodied_accessors = true:suggestion 62 | #prefer block bodies for constructors 63 | csharp_style_expression_bodied_constructors = false:suggestion 64 | #prefer expression-bodied members for methods 65 | csharp_style_expression_bodied_methods = false:suggestion 66 | #prefer expression-bodied members for properties 67 | csharp_style_expression_bodied_properties = true:suggestion 68 | 69 | #Style - expression level options 70 | 71 | #prefer out variables to be declared inline in the argument list of a method call when possible 72 | csharp_style_inlined_variable_declaration = true:suggestion 73 | #prefer the type name for member access expressions, instead of the language keyword 74 | dotnet_style_predefined_type_for_member_access = false:suggestion 75 | 76 | #Style - implicit and explicit types 77 | 78 | #prefer var is used to declare variables with built-in system types such as int 79 | csharp_style_var_for_built_in_types = true:suggestion 80 | #prefer var when the type is already mentioned on the right-hand side of a declaration expression 81 | csharp_style_var_when_type_is_apparent = true:suggestion 82 | #prefer var in all cases unless overridden by another code style rule 83 | csharp_style_var_elsewhere = true:suggestion 84 | 85 | #Style - language keyword and framework type options 86 | 87 | #prefer the type name for local variables, method parameters, and class members, instead of the language keyword 88 | dotnet_style_predefined_type_for_locals_parameters_members = false:suggestion 89 | 90 | #Style - qualification options 91 | 92 | #prefer fields not to be prefaced with this. or Me. in Visual Basic 93 | dotnet_style_qualification_for_field = false:suggestion 94 | #prefer methods not to be prefaced with this. or Me. in Visual Basic 95 | dotnet_style_qualification_for_method = false:suggestion 96 | #prefer properties not to be prefaced with this. or Me. in Visual Basic 97 | dotnet_style_qualification_for_property = false:suggestion 98 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | netstandard1.3;netstandard2.0;MonoAndroid90;Xamarin.iOS10;uap10.0.16299;net472 8 | netstandard1.3;netstandard2.0;MonoAndroid90;Xamarin.iOS10;Xamarin.Mac20 9 | 10 | 11 | 12 | true 13 | true 14 | $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb 15 | 16 | 17 | 18 | Resources 19 | Resource 20 | Resources\Resource.designer.cs 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | $(ProgramFiles)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\PresentationCore.dll 32 | 33 | 34 | $(ProgramFiles)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\PresentationFramework.dll 35 | 36 | 37 | $(ProgramFiles)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\WindowsBase.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | Windows Mobile Extensions for the UWP 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/Fonts/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.EntypoPlus/EntypoPlusModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class EntypoPlusModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public EntypoPlusModule() 13 | : base("entypo-plus", "entypo-plus", "iconize-entypoplus.ttf", EntypoPlusCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.EntypoPlus/Plugin.Iconize.EntypoPlus.csproj: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.EntypoPlus/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.EntypoPlus/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.EntypoPlus/iconize-entypoplus.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.EntypoPlus/iconize-entypoplus.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/FontAwesomeBrandsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class FontAwesomeBrandsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public FontAwesomeBrandsModule() 13 | : base("Font Awesome 5 Brands", "FontAwesome5Brands-Regular", "iconize-fontawesome-brands.ttf", FontAwesomeCollection.BrandIcons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/FontAwesomeRegularModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class FontAwesomeRegularModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public FontAwesomeRegularModule() 13 | : base("Font Awesome 5 Free Regular", "FontAwesome5Free-Regular", "iconize-fontawesome-regular.ttf", FontAwesomeCollection.RegularIcons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/FontAwesomeSolidModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class FontAwesomeSolidModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public FontAwesomeSolidModule() 13 | : base("Font Awesome 5 Free Solid", "FontAwesome5Free-Solid", "iconize-fontawesome-solid.ttf", FontAwesomeCollection.SolidIcons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/Plugin.Iconize.FontAwesome.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.FontAwesome/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/iconize-fontawesome-brands.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.FontAwesome/iconize-fontawesome-brands.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/iconize-fontawesome-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.FontAwesome/iconize-fontawesome-regular.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesome/iconize-fontawesome-solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.FontAwesome/iconize-fontawesome-solid.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesomePro/FontAwesomeProBrandsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class FontAwesomeProBrandsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public FontAwesomeProBrandsModule() 13 | : base("Font Awesome 5 Pro Brands", "FontAwesome5ProBrands-Regular", "iconize-fontawesome-pro-brands.ttf", FontAwesomeProCollection.BrandIcons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesomePro/FontAwesomeProLightModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class FontAwesomeProLightModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public FontAwesomeProLightModule() 13 | : base("Font Awesome 5 Pro Light", "FontAwesome5Pro-Light", "iconize-fontawesome-pro-light.ttf", FontAwesomeProCollection.LightIcons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesomePro/FontAwesomeProRegularModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class FontAwesomeProRegularModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public FontAwesomeProRegularModule() 13 | : base("Font Awesome 5 Pro Regular", "FontAwesome5Pro-Regular", "iconize-fontawesome-pro-regular.ttf", FontAwesomeProCollection.RegularIcons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesomePro/FontAwesomeProSolidModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class FontAwesomeProSolidModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public FontAwesomeProSolidModule() 13 | : base("Font Awesome 5 Pro Solid", "FontAwesome5Pro-Solid", "iconize-fontawesome-pro-solid.ttf", FontAwesomeProCollection.SolidIcons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesomePro/Plugin.Iconize.FontAwesomePro.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.FontAwesomePro/Resources/Resource.designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.FontAwesomePro/Resources/Resource.designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Ionicons/IoniconsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class IoniconsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public IoniconsModule() 13 | : base("Ionicons", "Ionicons", "iconize-ionicons.ttf", IoniconsCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Ionicons/Plugin.Iconize.Ionicons.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Ionicons/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Ionicons/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Ionicons/iconize-ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Ionicons/iconize-ionicons.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.JamIcons/JamIconsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class JamIconsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public JamIconsModule() 13 | : base("Jam-icons", "Jam-icons", "iconize-jam-icons.ttf", JamIconsCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.JamIcons/Plugin.Iconize.JamIcons.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.JamIcons/Resources/Resource.designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.JamIcons/Resources/Resource.designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.JamIcons/iconize-jam-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.JamIcons/iconize-jam-icons.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Material/MaterialModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class MaterialModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public MaterialModule() 13 | : base("Material Icons", "MaterialIcons-Regular", "iconize-material.ttf", MaterialCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Material/Plugin.Iconize.Material.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Material/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Material/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Material/iconize-material.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Material/iconize-material.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.MaterialDesignIcons/MaterialDesignIconsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class MaterialDesignIconsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public MaterialDesignIconsModule() 13 | : base("Material Design Icons", "Material-Design-Icons", "iconize-materialdesignicons.ttf", MaterialDesignIconsCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.MaterialDesignIcons/Plugin.Iconize.MaterialDesignIcons.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.MaterialDesignIcons/Resources/Resource.designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.MaterialDesignIcons/Resources/Resource.designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.MaterialDesignIcons/iconize-materialdesignicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.MaterialDesignIcons/iconize-materialdesignicons.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Meteocons/MeteoconsCollection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Plugin.Iconize.Fonts 4 | { 5 | /// 6 | /// Defines the icon collection. 7 | /// 8 | public static class MeteoconsCollection 9 | { 10 | /// 11 | /// Gets the icons. 12 | /// 13 | /// 14 | /// The icons. 15 | /// 16 | public static IList Icons { get; } = new List(); 17 | 18 | /// 19 | /// Initializes the class. 20 | /// 21 | static MeteoconsCollection() 22 | { 23 | Icons.Add("mc-sunrise-o", 'A'); 24 | Icons.Add("mc-sun-o", 'B'); 25 | Icons.Add("mc-moon-o", 'C'); 26 | Icons.Add("mc-eclipse-o", 'D'); 27 | Icons.Add("mc-cloudy-o", 'E'); 28 | Icons.Add("mc-wind-o", 'F'); 29 | Icons.Add("mc-snow-o", 'G'); 30 | Icons.Add("mc-sun-cloud-o", 'H'); 31 | Icons.Add("mc-moon-cloud-o", 'I'); 32 | Icons.Add("mc-sunrise-sea-o", 'J'); 33 | Icons.Add("mc-moonrise-sea-o", 'K'); 34 | Icons.Add("mc-cloud-sea-o", 'L'); 35 | Icons.Add("mc-sea-o", 'M'); 36 | Icons.Add("mc-cloud-o", 'N'); 37 | Icons.Add("mc-cloud-thunder-o", 'O'); 38 | Icons.Add("mc-cloud-thunder2-o", 'P'); 39 | Icons.Add("mc-cloud-drop-o", 'Q'); 40 | Icons.Add("mc-cloud-rain-o", 'R'); 41 | Icons.Add("mc-cloud-wind-o", 'S'); 42 | Icons.Add("mc-cloud-wind-rain-o", 'T'); 43 | Icons.Add("mc-cloud-snow-o", 'U'); 44 | Icons.Add("mc-cloud-snow2-o", 'V'); 45 | Icons.Add("mc-cloud-snow3-o", 'W'); 46 | Icons.Add("mc-cloud-rain2-o", 'X'); 47 | Icons.Add("mc-cloud-double-o", 'Y'); 48 | Icons.Add("mc-cloud-double-thunder-o", 'Z'); 49 | Icons.Add("mc-cloud-double-thunder2-o", '0'); 50 | Icons.Add("mc-sun", '1'); 51 | Icons.Add("mc-moon", '2'); 52 | Icons.Add("mc-sun-cloud", '3'); 53 | Icons.Add("mc-moon-cloud", '4'); 54 | Icons.Add("mc-cloud", '5'); 55 | Icons.Add("mc-cloud-thunder", '6'); 56 | Icons.Add("mc-cloud-drop", '7'); 57 | Icons.Add("mc-cloud-rain", '8'); 58 | Icons.Add("mc-cloud-wind", '9'); 59 | Icons.Add("mc-cloud-wind-rain", '!'); 60 | Icons.Add("mc-cloud-snow", '"'); 61 | Icons.Add("mc-cloud-snow2", '#'); 62 | Icons.Add("mc-cloud-rain2", '$'); 63 | Icons.Add("mc-cloud-double", '%'); 64 | Icons.Add("mc-cloud-double-thunder", '&'); 65 | Icons.Add("mc-thermometer", '\''); 66 | Icons.Add("mc-compass", '('); 67 | Icons.Add("mc-not-applicable", ')'); 68 | Icons.Add("mc-celsius", '*'); 69 | Icons.Add("mc-fahrenheit", '+'); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Meteocons/MeteoconsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class MeteoconsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public MeteoconsModule() 13 | : base("Meteocons", "Meteocons", "iconize-meteocons.ttf", MeteoconsCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Meteocons/Plugin.Iconize.Meteocons.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Meteocons/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Meteocons/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Meteocons/iconize-meteocons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Meteocons/iconize-meteocons.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.SimpleLineIcons/Plugin.Iconize.SimpleLineIcons.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.SimpleLineIcons/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.SimpleLineIcons/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.SimpleLineIcons/SimpleLineIconsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class SimpleLineIconsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public SimpleLineIconsModule() 13 | : base("simple-line-icons", "simple-line-icons", "iconize-simplelineicons.ttf", SimpleLineIconsCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.SimpleLineIcons/iconize-simplelineicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.SimpleLineIcons/iconize-simplelineicons.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Typicons/Plugin.Iconize.Typicons.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Typicons/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Typicons/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Typicons/TypiconsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class TypiconsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public TypiconsModule() 13 | : base("Typicons", "typicons", "iconize-typicons.ttf", TypiconsCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.Typicons/iconize-typicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.Typicons/iconize-typicons.ttf -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.WeatherIcons/Plugin.Iconize.WeatherIcons.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.WeatherIcons/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.WeatherIcons/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.WeatherIcons/WeatherIconsModule.cs: -------------------------------------------------------------------------------- 1 | namespace Plugin.Iconize.Fonts 2 | { 3 | /// 4 | /// Defines the icon module. 5 | /// 6 | /// 7 | public sealed class WeatherIconsModule : IconModule 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public WeatherIconsModule() 13 | : base("Weather Icons", "WeatherIcons-Regular", "iconize-weathericons.ttf", WeatherIconsCollection.Icons) 14 | { 15 | // Intentionally left blank 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Fonts/Plugin.Iconize.WeatherIcons/iconize-weathericons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsmarcus/Iconize/bae776de22a72a3acaf534b162f01d2b05fc5e8e/src/Fonts/Plugin.Iconize.WeatherIcons/iconize-weathericons.ttf -------------------------------------------------------------------------------- /src/Plugin.Iconize/Icon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Plugin.Iconize 4 | { 5 | /// 6 | /// Icon represents one icon in an icon font. 7 | /// 8 | public interface IIcon 9 | { 10 | /// 11 | /// The key of icon, for example 'fa-ok' 12 | /// 13 | /// 14 | String Key { get; } 15 | 16 | /// 17 | /// The character matching the key in the font, for example '\u4354' 18 | /// 19 | /// 20 | Char Character { get; } 21 | } 22 | 23 | /// 24 | /// Defines the type. 25 | /// 26 | /// 27 | public class Icon : IIcon 28 | { 29 | /// 30 | /// The character matching the key in the font, for example '\u4354' 31 | /// 32 | public Char Character { get; } 33 | 34 | /// 35 | /// The key of icon, for example 'fa-ok' 36 | /// 37 | public String Key { get; } 38 | 39 | /// 40 | /// Initializes a new instance of the class. 41 | /// 42 | /// The key. 43 | /// The character. 44 | public Icon(String key, Char character) 45 | { 46 | Character = character; 47 | Key = key; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconButton.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace Plugin.Iconize 4 | { 5 | /// 6 | /// Defines the control. 7 | /// 8 | /// 9 | public class IconButton : Button 10 | { 11 | // Intentionally left blank 12 | } 13 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconCarouselPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace Plugin.Iconize 5 | { 6 | /// 7 | /// Defines the page. 8 | /// 9 | /// 10 | public class IconCarouselPage : CarouselPage 11 | { 12 | /// 13 | /// Initializes a new instance of the class. 14 | /// 15 | public IconCarouselPage() 16 | { 17 | CurrentPageChanged += OnCurrentPageChanged; 18 | } 19 | 20 | /// 21 | /// Called when [current page changed]. 22 | /// 23 | /// The sender. 24 | /// The instance containing the event data. 25 | private void OnCurrentPageChanged(Object sender, EventArgs e) 26 | { 27 | MessagingCenter.Send(sender, IconToolbarItem.UpdateToolbarItemsMessage); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconImage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace Plugin.Iconize 5 | { 6 | /// 7 | /// Defines the control. 8 | /// 9 | /// 10 | public class IconImage : Image 11 | { 12 | #region Constants 13 | 14 | /// 15 | /// When the property is set to this value, the icon size will match the Image Size. 16 | /// 17 | public const Double AutoSize = -1.0; 18 | 19 | #endregion Constants 20 | 21 | #region Bindables 22 | 23 | /// 24 | /// Property definition for the Property 25 | /// 26 | public static BindableProperty IconProperty = BindableProperty.Create(nameof(Icon), typeof(String), typeof(IconImage), default(String)); 27 | 28 | /// 29 | /// Property definition for the Property 30 | /// 31 | public static BindableProperty IconColorProperty = BindableProperty.Create(nameof(IconColor), typeof(Color), typeof(IconImage), default(Color)); 32 | 33 | /// 34 | /// Property definition for the Property 35 | /// 36 | public static BindableProperty IconSizeProperty = BindableProperty.Create(nameof(IconSize), typeof(Double), typeof(IconImage), AutoSize); 37 | 38 | #endregion Bindables 39 | 40 | #region Properties 41 | 42 | /// 43 | /// Gets or sets the icon. 44 | /// 45 | /// 46 | /// The icon. 47 | /// 48 | public String Icon { get => (String)GetValue(IconProperty); set => SetValue(IconProperty, value); } 49 | 50 | /// 51 | /// Gets or sets the color of the icon. 52 | /// 53 | /// 54 | /// The color of the icon. 55 | /// 56 | public Color IconColor { get => (Color)GetValue(IconColorProperty); set => SetValue(IconColorProperty, value); } 57 | 58 | /// 59 | /// Gets or sets the size of the icon. 60 | /// 61 | /// 62 | /// The size of the icon. 63 | /// 64 | public Double IconSize { get => (Double)GetValue(IconSizeProperty); set => SetValue(IconSizeProperty, value); } 65 | 66 | #endregion Properties 67 | } 68 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconLabel.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace Plugin.Iconize 4 | { 5 | /// 6 | /// Defines the control. 7 | /// 8 | /// 9 | public class IconLabel : Label 10 | { 11 | // Intentionally left blank 12 | } 13 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconModule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Plugin.Iconize 5 | { 6 | /// 7 | /// Defines the interface. 8 | /// 9 | public interface IIconModule 10 | { 11 | /// 12 | /// The characters in the font. 13 | /// 14 | ICollection Characters { get; } 15 | 16 | /// 17 | /// Gets the font family. 18 | /// 19 | /// 20 | /// The font family. 21 | /// 22 | String FontFamily { get; } 23 | 24 | /// 25 | /// Gets the name of the font. 26 | /// 27 | /// 28 | /// The name of the font. 29 | /// 30 | String FontName { get; } 31 | 32 | /// 33 | /// Gets the font path. 34 | /// 35 | /// 36 | /// The font path. 37 | /// 38 | String FontPath { get; } 39 | 40 | /// 41 | /// Gets or sets the keys. 42 | /// 43 | /// 44 | /// The keys. 45 | /// 46 | ICollection Keys { get; } 47 | 48 | /// 49 | /// Gets the icon. 50 | /// 51 | /// The icon key. 52 | /// 53 | IIcon GetIcon(String iconKey); 54 | 55 | /// 56 | /// Determines whether the specified icon is in the set. 57 | /// 58 | /// The icon. 59 | /// 60 | Boolean HasIcon(IIcon icon); 61 | } 62 | 63 | /// 64 | /// Defines the type. 65 | /// 66 | /// 67 | public abstract class IconModule : IIconModule 68 | { 69 | /// 70 | /// The characters in the font. 71 | /// 72 | public ICollection Characters => Icons.Values; 73 | 74 | /// 75 | /// Gets the font family. 76 | /// 77 | /// 78 | /// The font family. 79 | /// 80 | public String FontFamily { get; } 81 | 82 | /// 83 | /// Gets the name of the font. 84 | /// 85 | /// 86 | /// The name of the font. 87 | /// 88 | public String FontName { get; } 89 | 90 | /// 91 | /// Gets the font path. 92 | /// 93 | /// 94 | /// The font path. 95 | /// 96 | public String FontPath { get; } 97 | 98 | /// 99 | /// Gets the icons. 100 | /// 101 | /// 102 | /// The icons. 103 | /// 104 | private Dictionary Icons { get; } = new Dictionary(); 105 | 106 | /// 107 | /// Gets or sets the keys. 108 | /// 109 | /// 110 | /// The keys. 111 | /// 112 | public ICollection Keys => Icons.Keys; 113 | 114 | /// 115 | /// Initializes a new instance of the class. 116 | /// 117 | /// The font family. 118 | /// Name of the font. 119 | /// The font path. 120 | /// The icons. 121 | protected IconModule(String fontFamily, String fontName, String fontPath, IEnumerable icons) 122 | { 123 | FontFamily = fontFamily; 124 | FontName = fontName; 125 | FontPath = fontPath; 126 | 127 | foreach (var icon in icons) 128 | { 129 | Icons.Add(icon.Key, icon); 130 | } 131 | } 132 | 133 | /// 134 | /// Gets the icon. 135 | /// 136 | /// The key. 137 | /// 138 | public IIcon GetIcon(String iconKey) 139 | { 140 | return Icons.ContainsKey(iconKey) ? Icons[iconKey] : null; 141 | } 142 | 143 | /// 144 | /// Determines whether the specified icon is in the set. 145 | /// 146 | /// The icon. 147 | /// 148 | public Boolean HasIcon(IIcon icon) 149 | { 150 | return Icons.ContainsValue(icon); 151 | } 152 | } 153 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconNavigationPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace Plugin.Iconize 5 | { 6 | /// 7 | /// Defines the page. 8 | /// 9 | /// 10 | public class IconNavigationPage : NavigationPage 11 | { 12 | /// 13 | /// Initializes a new instance of the class. 14 | /// 15 | public IconNavigationPage() 16 | { 17 | InitListeners(); 18 | } 19 | 20 | /// 21 | /// Initializes a new instance of the class. 22 | /// 23 | /// The root page. 24 | public IconNavigationPage(Page root) 25 | : base(root) 26 | { 27 | InitListeners(); 28 | } 29 | 30 | /// 31 | /// Initializes the event listeners. 32 | /// 33 | private void InitListeners() 34 | { 35 | Popped += OnNavigation; 36 | PoppedToRoot += OnNavigation; 37 | Pushed += OnNavigation; 38 | } 39 | 40 | /// 41 | /// Called when [navigation]. 42 | /// 43 | /// The sender. 44 | /// The instance containing the event data. 45 | /// 46 | private void OnNavigation(Object sender, NavigationEventArgs e) 47 | { 48 | MessagingCenter.Send(sender, IconToolbarItem.UpdateToolbarItemsMessage); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconTabbedPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace Plugin.Iconize 5 | { 6 | /// 7 | /// Defines the page. 8 | /// 9 | /// 10 | public class IconTabbedPage : TabbedPage 11 | { 12 | /// 13 | /// Initializes a new instance of the class. 14 | /// 15 | public IconTabbedPage() 16 | { 17 | CurrentPageChanged += OnCurrentPageChanged; 18 | } 19 | 20 | /// 21 | /// Called when [current page changed]. 22 | /// 23 | /// The sender. 24 | /// The instance containing the event data. 25 | private void OnCurrentPageChanged(Object sender, EventArgs e) 26 | { 27 | MessagingCenter.Send(sender, IconToolbarItem.UpdateToolbarItemsMessage); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconToolbarItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using Xamarin.Forms; 4 | 5 | namespace Plugin.Iconize 6 | { 7 | /// 8 | /// Defines the control. 9 | /// 10 | /// 11 | public class IconToolbarItem : ToolbarItem 12 | { 13 | /// 14 | /// The update toolbar items message 15 | /// 16 | public const String UpdateToolbarItemsMessage = "Iconize.UpdateToolbarItems"; 17 | 18 | /// 19 | /// Backing store for the property. 20 | /// 21 | public static BindableProperty IconColorProperty = BindableProperty.Create(nameof(IconColor), typeof(Color), typeof(IconToolbarItem), default(Color)); 22 | 23 | /// 24 | /// Backing store for the property. 25 | /// 26 | public static BindableProperty IsVisibleProperty = BindableProperty.Create(nameof(IsVisible), typeof(Boolean), typeof(IconToolbarItem), true); 27 | 28 | /// 29 | /// Gets or sets the color of the icon. 30 | /// 31 | /// 32 | /// The color of the icon. 33 | /// 34 | public Color IconColor 35 | { 36 | get => (Color)GetValue(IconColorProperty); 37 | set => SetValue(IconColorProperty, value); 38 | } 39 | 40 | /// 41 | /// Gets or sets a value indicating whether this toolbar item is visible. 42 | /// 43 | /// 44 | /// true if this toolbar item is visible; otherwise, false. 45 | /// 46 | public Boolean IsVisible 47 | { 48 | get => (Boolean)GetValue(IsVisibleProperty); 49 | set => SetValue(IsVisibleProperty, value); 50 | } 51 | 52 | /// 53 | /// Initializes a new instance of the class. 54 | /// 55 | public IconToolbarItem() 56 | { 57 | PropertyChanged += OnPropertyChanged; 58 | } 59 | 60 | /// 61 | /// Called when [can execute changed]. 62 | /// 63 | /// The sender. 64 | /// The instance containing the event data. 65 | private void OnCanExecuteChanged(object sender, EventArgs e) 66 | { 67 | MessagingCenter.Send(sender, UpdateToolbarItemsMessage); 68 | } 69 | 70 | /// 71 | /// Called when [property changed]. 72 | /// 73 | /// The sender. 74 | /// The instance containing the event data. 75 | private void OnPropertyChanged(Object sender, PropertyChangedEventArgs e) 76 | { 77 | MessagingCenter.Send(sender, UpdateToolbarItemsMessage); 78 | 79 | if (e.PropertyName == nameof(Command) && Command != null) 80 | { 81 | Command.CanExecuteChanged += OnCanExecuteChanged; 82 | } 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/Iconize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Plugin.Iconize 6 | { 7 | /// 8 | /// Defines the type. 9 | /// 10 | public static class Iconize 11 | { 12 | /// 13 | /// Gets the tab layout identifier. 14 | /// 15 | /// 16 | /// The tab layout identifier. 17 | /// 18 | public static Int32 TabLayoutId { get; private set; } 19 | 20 | /// 21 | /// Gets the toolbar identifier. 22 | /// 23 | /// 24 | /// The toolbar identifier. 25 | /// 26 | public static Int32 ToolbarId { get; private set; } 27 | 28 | /// 29 | /// Initializes the control library. android only 30 | /// 31 | /// The toolbar identifier. 32 | /// The tab layout identifier. 33 | public static void Init(Int32 toolbarId = 0, Int32 tabLayoutId = 0) 34 | { 35 | TabLayoutId = tabLayoutId; 36 | ToolbarId = toolbarId; 37 | } 38 | 39 | /// 40 | /// List of icon font descriptors 41 | /// 42 | public static IList Modules { get; } = new List(); 43 | 44 | /// 45 | /// Add support for a new icon font. 46 | /// 47 | /// The Icon Module holding the ttf file reference and its mappings. 48 | /// An initializer instance for chain calls. 49 | public static IconizeInitializer With(IIconModule module) 50 | { 51 | return new IconizeInitializer(module); 52 | } 53 | 54 | /// 55 | /// Adds the icon module. 56 | /// 57 | /// The module. 58 | private static void AddModule(IIconModule module) 59 | { 60 | // Prevent duplicates 61 | foreach (var wrapper in Modules) 62 | { 63 | if (wrapper.FontName.Equals(module.FontName)) 64 | { 65 | return; 66 | } 67 | } 68 | 69 | // Add to the list 70 | Modules.Add(module); 71 | } 72 | 73 | /// 74 | /// Allows chain calls on . 75 | /// 76 | public sealed class IconizeInitializer 77 | { 78 | /// 79 | /// Initializes a new instance of the class. 80 | /// 81 | /// The icon font descriptor. 82 | public IconizeInitializer(IIconModule iconFontDescriptor) 83 | { 84 | AddModule(iconFontDescriptor); 85 | } 86 | 87 | /// 88 | /// Add support for a new icon font. 89 | /// 90 | /// The IconDescriptor holding the ttf file reference and its mappings. 91 | /// An initializer instance for chain calls. 92 | public IconizeInitializer With(IIconModule iconFontDescriptor) 93 | { 94 | AddModule(iconFontDescriptor); 95 | return this; 96 | } 97 | } 98 | 99 | /// 100 | /// Finds the Typeface to apply for a given icon. 101 | /// 102 | /// The icon for which you need the typeface. 103 | /// 104 | /// The font descriptor which contains info about the typeface to apply, or null 105 | /// if the icon cannot be found. In that case, check that you properly added the modules 106 | /// using prior to calling this method. 107 | /// 108 | public static IIconModule FindModuleOf(IIcon icon) 109 | { 110 | foreach (var module in Modules) 111 | { 112 | if (module.HasIcon(icon)) 113 | { 114 | return module; 115 | } 116 | } 117 | 118 | return null; 119 | } 120 | 121 | /// 122 | /// Retrieve an icon from a key. 123 | /// 124 | /// The icon key. 125 | /// The icon, or null if no icon matches the key 126 | public static IIcon FindIconForKey(String iconKey) 127 | { 128 | if (String.IsNullOrWhiteSpace(iconKey)) 129 | return null; 130 | 131 | return Modules?.FirstOrDefault(x => x.Keys.Contains(iconKey))?.GetIcon(iconKey); 132 | } 133 | } 134 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/IconizeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Xamarin.Forms; 4 | 5 | namespace Plugin.Iconize 6 | { 7 | /// 8 | /// Global extension methods for Iconize 9 | /// 10 | public static class IconizeExtensions 11 | { 12 | /// 13 | /// Adds the icon to the list. 14 | /// 15 | /// The list. 16 | /// The key. 17 | /// The character. 18 | public static void Add(this IList list, String key, Char character) => list.Add(new Icon(key, character)); 19 | 20 | /// 21 | /// Gets the toolbar items. 22 | /// 23 | /// The page. 24 | /// 25 | public static IList GetToolbarItems(this Page page) 26 | { 27 | var list = new List(page.ToolbarItems); 28 | 29 | if (page is MasterDetailPage masterDetailPage) 30 | { 31 | if (masterDetailPage.IsPresented && masterDetailPage.Master != null) 32 | { 33 | list.AddRange(masterDetailPage.Master.GetToolbarItems()); 34 | } 35 | else if (masterDetailPage.Detail != null) 36 | { 37 | list.AddRange(masterDetailPage.Detail.GetToolbarItems()); 38 | } 39 | } 40 | else if (page is IPageContainer pageContainer && pageContainer.CurrentPage != null) 41 | { 42 | list.AddRange(pageContainer.CurrentPage.GetToolbarItems()); 43 | } 44 | 45 | return list; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/Platform/Android/MenuClickListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.Runtime; 3 | using Android.Views; 4 | 5 | namespace Plugin.Iconize 6 | { 7 | /// 8 | /// Defines the type. 9 | /// 10 | /// 11 | /// 12 | /// 13 | /// 14 | public class MenuClickListener : Java.Lang.Object, IMenuItemOnMenuItemClickListener, IJavaObject, IDisposable 15 | { 16 | private readonly Action _callback; 17 | 18 | /// 19 | /// Initializes a new instance of the class. 20 | /// 21 | /// The callback. 22 | public MenuClickListener(Action callback) 23 | { 24 | _callback = callback; 25 | } 26 | 27 | /// 28 | /// Called when a menu item has been invoked. 29 | /// 30 | /// The menu item that was invoked. 31 | /// 32 | /// To be added. 33 | /// 34 | /// 35 | /// Called when a menu item has been invoked. This is the first code 36 | /// that is executed; if it returns true, no other callbacks will be 37 | /// executed. 38 | /// 39 | /// 40 | /// [Android Documentation] 41 | /// 42 | /// 43 | /// 44 | /// 45 | public bool OnMenuItemClick(IMenuItem item) 46 | { 47 | _callback?.Invoke(); 48 | return true; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/Platform/Android/PlatformExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Android.Content; 4 | using Android.Graphics; 5 | using Android.Graphics.Drawables; 6 | using Xamarin.Forms; 7 | using Xamarin.Forms.Platform.Android; 8 | 9 | namespace Plugin.Iconize 10 | { 11 | /// 12 | /// Defines the extensions. 13 | /// 14 | public static class PlatformExtensions 15 | { 16 | private static readonly Dictionary _fontCache = new Dictionary(); 17 | 18 | /// 19 | /// To the bitmap. 20 | /// 21 | /// The drawable. 22 | /// 23 | public static Bitmap ToBitmap(this Drawable drawable) 24 | { 25 | Bitmap bitmap = null; 26 | 27 | if (drawable is BitmapDrawable bitmapDrawable && bitmapDrawable.Bitmap != null) 28 | { 29 | return bitmapDrawable.Bitmap; 30 | } 31 | 32 | if (drawable.IntrinsicWidth <= 0 || drawable.IntrinsicHeight <= 0) 33 | { 34 | bitmap = Bitmap.CreateBitmap(1, 1, Bitmap.Config.Argb8888); // Single color bitmap will be created of 1x1 pixel 35 | } 36 | else 37 | { 38 | bitmap = Bitmap.CreateBitmap(drawable.IntrinsicWidth, drawable.IntrinsicHeight, Bitmap.Config.Argb8888); 39 | } 40 | 41 | var canvas = new Canvas(bitmap); 42 | drawable.SetBounds(0, 0, canvas.Width, canvas.Height); 43 | drawable.Draw(canvas); 44 | return bitmap; 45 | } 46 | 47 | /// 48 | /// To the typeface. 49 | /// 50 | /// The module. 51 | /// The context. 52 | /// 53 | public static Typeface ToTypeface(this IIconModule module, Context context) 54 | { 55 | var moduleType = module.GetType(); 56 | if (!_fontCache.ContainsKey(moduleType)) 57 | { 58 | _fontCache.Add(moduleType, Typeface.CreateFromAsset(context.Assets, module.FontPath)); 59 | } 60 | return _fontCache[moduleType]; 61 | } 62 | 63 | /// 64 | /// Gets the toolbar item drawable. 65 | /// 66 | /// The toolbar item. 67 | /// The context. 68 | /// 69 | internal static Drawable GetToolbarItemDrawable(this ToolbarItem toolbarItem, Context context) 70 | { 71 | if (String.IsNullOrWhiteSpace(toolbarItem.Icon)) 72 | return null; 73 | 74 | if (!(toolbarItem is IconToolbarItem iconItem)) 75 | return context.GetDrawable(toolbarItem.Icon); 76 | 77 | var drawable = new IconDrawable(context, iconItem.Icon); 78 | if (drawable is null) 79 | return null; 80 | 81 | if (iconItem.IconColor != Xamarin.Forms.Color.Default) 82 | drawable = drawable.Color(iconItem.IconColor.ToAndroid()); 83 | 84 | return drawable.ActionBarSize(); 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /src/Plugin.Iconize/Platform/Android/Renderers/IconButtonRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using Android.Content; 4 | using Android.OS; 5 | using Plugin.Iconize; 6 | using Xamarin.Forms; 7 | using Xamarin.Forms.Platform.Android; 8 | #if USE_FASTRENDERERS 9 | using ButtonRenderer = Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer; 10 | #else 11 | using ButtonRenderer = Xamarin.Forms.Platform.Android.AppCompat.ButtonRenderer; 12 | #endif 13 | 14 | [assembly: ExportRenderer(typeof(IconButton), typeof(IconButtonRenderer))] 15 | 16 | namespace Plugin.Iconize 17 | { 18 | /// 19 | /// Defines the renderer. 20 | /// 21 | #if USE_FASTRENDERERS 22 | /// 23 | #else 24 | /// 25 | #endif 26 | public class IconButtonRenderer : ButtonRenderer 27 | { 28 | /// 29 | /// Gets the button. 30 | /// 31 | /// 32 | /// The button. 33 | /// 34 | private IconButton Button => Element as IconButton; 35 | 36 | /// 37 | /// Initializes a new instance of the class. 38 | /// 39 | /// The context. 40 | public IconButtonRenderer(Context context) 41 | : base(context) 42 | { 43 | // Intentionally left blank 44 | } 45 | 46 | /// 47 | protected override void OnElementChanged(ElementChangedEventArgs