├── Arts ├── AllThemes.png ├── DashboardPage.png ├── MyProfilePage.png └── ThemeSelectionPage.png ├── XFThemes ├── XFThemes.UWP │ ├── monkey.jpg │ ├── theme.png │ ├── editprofile.png │ ├── monkeyprofile.jpg │ ├── Assets │ │ ├── StoreLogo.backup.png │ │ ├── LargeTile.scale-100.png │ │ ├── LargeTile.scale-200.png │ │ ├── LargeTile.scale-400.png │ │ ├── SmallTile.scale-100.png │ │ ├── SmallTile.scale-200.png │ │ ├── SmallTile.scale-400.png │ │ ├── StoreLogo.scale-100.png │ │ ├── StoreLogo.scale-200.png │ │ ├── StoreLogo.scale-400.png │ │ ├── SplashScreen.scale-100.png │ │ ├── SplashScreen.scale-200.png │ │ ├── SplashScreen.scale-400.png │ │ ├── Square44x44Logo.scale-100.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.scale-400.png │ │ ├── Wide310x150Logo.scale-100.png │ │ ├── Wide310x150Logo.scale-200.png │ │ ├── Wide310x150Logo.scale-400.png │ │ ├── Square150x150Logo.scale-100.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-400.png │ │ ├── Square44x44Logo.targetsize-16.png │ │ ├── Square44x44Logo.targetsize-256.png │ │ ├── Square44x44Logo.targetsize-48.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ │ └── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── App.xaml │ ├── MainPage.xaml.cs │ ├── Dependencies │ │ └── NativeServices.cs │ ├── MainPage.xaml │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── Package.appxmanifest │ ├── App.xaml.cs │ └── XFThemes.UWP.csproj ├── XFThemes.iOS │ ├── iTunesArtwork │ ├── iTunesArtwork@2x │ ├── Resources │ │ ├── Default.png │ │ ├── Icon-76.png │ │ ├── monkey.jpg │ │ ├── theme.png │ │ ├── theme@2x.png │ │ ├── theme@3x.png │ │ ├── Default@2x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Small.png │ │ ├── editprofile.png │ │ ├── Icon-Small-40.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ ├── editprofile@2x.png │ │ ├── editprofile@3x.png │ │ ├── monkeyprofile.jpg │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Icon-Small-40@2x.png │ │ ├── Icon-Small-40@3x.png │ │ ├── Default-Portrait@2x.png │ │ └── LaunchScreen.storyboard │ ├── Entitlements.plist │ ├── packages.config │ ├── Main.cs │ ├── Renderers │ │ └── ListViewCellICustomRenderer.cs │ ├── AppDelegate.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Info.plist │ └── XFThemes.iOS.csproj ├── XFThemes.Android │ ├── Resources │ │ ├── drawable │ │ │ ├── icon.png │ │ │ ├── monkey.jpg │ │ │ ├── theme.png │ │ │ ├── editprofile.png │ │ │ └── monkeyprofile.jpg │ │ ├── drawable-hdpi │ │ │ └── icon.png │ │ ├── drawable-xhdpi │ │ │ └── icon.png │ │ ├── drawable-xxhdpi │ │ │ └── icon.png │ │ ├── values │ │ │ ├── attr.xml │ │ │ ├── styles_toolbarpopup_themes.xml │ │ │ ├── styles_toolbar_themes.xml │ │ │ ├── styles_app_themes.xml │ │ │ └── styles.xml │ │ ├── layout │ │ │ ├── Tabbar.axml │ │ │ └── Toolbar.axml │ │ └── AboutResources.txt │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── Renderers │ │ └── DroidContentPageRenderer.cs │ ├── Dependencies │ │ └── NativeServices.cs │ ├── packages.config │ └── XFThemes.Android.csproj └── XFThemes │ ├── Dependencies │ └── INativeServices.cs │ ├── ThemeResources │ ├── BlueTheme.xaml.cs │ ├── DarkTheme.xaml.cs │ ├── LightTheme.xaml.cs │ ├── WhiteTheme.xaml.cs │ ├── OrangeTheme.xaml.cs │ ├── BlueTheme.xaml │ ├── DarkTheme.xaml │ ├── LightTheme.xaml │ ├── OrangeTheme.xaml │ └── WhiteTheme.xaml │ ├── ViewModels │ ├── MyProfileViewModel.cs │ ├── BaseViewModel.cs │ ├── ObservableObject.cs │ ├── DashboardViewModel.cs │ └── ThemeSelectionViewModel.cs │ ├── Pages │ ├── DashboardPage.xaml.cs │ ├── ThemeSelectionPage.xaml.cs │ ├── MyProfilePage.xaml.cs │ ├── ThemeSelectionPage.xaml │ ├── DashboardPage.xaml │ └── MyProfilePage.xaml │ ├── Models │ └── AppTheme.cs │ ├── XFThemes.csproj │ ├── App.xaml.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── App.xaml │ └── ThemeManager.cs ├── .gitignore ├── README.md └── XFThemes.sln /Arts/AllThemes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/Arts/AllThemes.png -------------------------------------------------------------------------------- /Arts/DashboardPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/Arts/DashboardPage.png -------------------------------------------------------------------------------- /Arts/MyProfilePage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/Arts/MyProfilePage.png -------------------------------------------------------------------------------- /Arts/ThemeSelectionPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/Arts/ThemeSelectionPage.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/monkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/monkey.jpg -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/theme.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/iTunesArtwork -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/editprofile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/editprofile.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/iTunesArtwork@2x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/iTunesArtwork@2x -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/monkeyprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/monkeyprofile.jpg -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Default.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-76.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/monkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/monkey.jpg -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/theme.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/theme@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/theme@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/theme@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/theme@3x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-60@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-60@3x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-76@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-Small.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/editprofile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/editprofile.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/StoreLogo.backup.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-Small-40.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-Small@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-Small@3x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/editprofile@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/editprofile@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/editprofile@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/editprofile@3x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/monkeyprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/monkeyprofile.jpg -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable/icon.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable/monkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable/monkey.jpg -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable/theme.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable/editprofile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable/editprofile.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/drawable/monkeyprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.Android/Resources/drawable/monkeyprofile.jpg -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MGohil/XFThemesSample/HEAD/XFThemes/XFThemes.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /XFThemes/XFThemes/Dependencies/INativeServices.cs: -------------------------------------------------------------------------------- 1 | namespace XFThemes.Dependencies 2 | { 3 | public interface INativeServices 4 | { 5 | void OnThemeChanged(ThemeManager.Themes theme); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/values/attr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/BlueTheme.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | namespace XFThemes.ThemeResources 3 | { 4 | public partial class BlueTheme : ResourceDictionary 5 | { 6 | public BlueTheme() 7 | { 8 | InitializeComponent (); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/DarkTheme.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | namespace XFThemes.ThemeResources 3 | { 4 | public partial class DarkTheme : ResourceDictionary 5 | { 6 | public DarkTheme() 7 | { 8 | InitializeComponent (); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/LightTheme.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | namespace XFThemes.ThemeResources 3 | { 4 | public partial class LightTheme : ResourceDictionary 5 | { 6 | public LightTheme() 7 | { 8 | InitializeComponent (); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/WhiteTheme.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | namespace XFThemes.ThemeResources 3 | { 4 | public partial class WhiteTheme : ResourceDictionary 5 | { 6 | public WhiteTheme() 7 | { 8 | InitializeComponent (); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/OrangeTheme.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | namespace XFThemes.ThemeResources 3 | { 4 | public partial class OrangeTheme : ResourceDictionary 5 | { 6 | public OrangeTheme() 7 | { 8 | InitializeComponent (); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes/ViewModels/MyProfileViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XFThemes.ViewModels 2 | { 3 | public class MyProfileViewModel : BaseViewModel 4 | { 5 | public MyProfileViewModel() 6 | { 7 | Title = "My Profile"; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/Pages/DashboardPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Xaml; 3 | 4 | namespace XFThemes 5 | { 6 | [XamlCompilation(XamlCompilationOptions.Compile)] 7 | public partial class DashboardPage : ContentPage 8 | { 9 | public DashboardPage() 10 | { 11 | InitializeComponent(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/Pages/ThemeSelectionPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Xaml; 3 | 4 | namespace XFThemes 5 | { 6 | [XamlCompilation(XamlCompilationOptions.Compile)] 7 | public partial class ThemeSelectionPage : ContentPage 8 | { 9 | public ThemeSelectionPage() 10 | { 11 | InitializeComponent(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms.Platform.UWP; 2 | 3 | namespace XFThemes.UWP 4 | { 5 | public sealed partial class MainPage 6 | { 7 | public MainPage() 8 | { 9 | this.InitializeComponent(); 10 | 11 | LoadApplication(new XFThemes.App()); 12 | 13 | App.ApplyThemedColors(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/ 2 | packages/ 3 | XFThemes/XFThemes.Android/obj/ 4 | XFThemes/XFThemes.Android/bin/ 5 | XFThemes/XFThemes.iOS/obj/ 6 | XFThemes/XFThemes.UWP/obj/ 7 | XFThemes/XFThemes/bin/ 8 | XFThemes/XFThemes/obj/ 9 | XFThemes/XFThemes.iOS/bin/ 10 | /XFThemes/XFThemes.Android/XFThemes.Android.csproj.user 11 | /XFThemes/XFThemes.iOS/XFThemes.iOS.csproj.user 12 | /XFThemes/XFThemes.UWP/bin 13 | /XFThemes/XFThemes.UWP/XFThemes.UWP.csproj.user 14 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Dependencies/NativeServices.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using XFThemes.Dependencies; 3 | using XFThemes.UWP.Dependencies; 4 | 5 | [assembly: Dependency(typeof(NativeServices))] 6 | namespace XFThemes.UWP.Dependencies 7 | { 8 | class NativeServices : INativeServices 9 | { 10 | public void OnThemeChanged(ThemeManager.Themes theme) 11 | { 12 | App.ApplyThemedColors(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XFThemesSample 2 | The sample demonstrates on how to themify your Xamarin.Forms app 3 | 4 | Find detailed description at https://medium.com/@milan.gohil/adding-themes-to-your-xamarin-forms-app-3da3032cc3a1 5 | 6 | All Themes 7 | 8 | ![alt text](https://github.com/MGohil/XFThemesSample/blob/master/Arts/AllThemes.png) 9 | 10 | Theme Selection Page: 11 | 12 | ![alt text](https://github.com/MGohil/XFThemesSample/blob/master/Arts/ThemeSelectionPage.png) 13 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace XFThemes.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 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/Models/AppTheme.cs: -------------------------------------------------------------------------------- 1 | using XFThemes.ViewModels; 2 | 3 | namespace XFThemes.Models 4 | { 5 | public class AppTheme : ObservableObject 6 | { 7 | public ThemeManager.Themes ThemeId { get; set; } 8 | public string Title { get; set; } 9 | public string Description { get; set; } 10 | bool _isSelected = false; 11 | public bool IsSelected 12 | { 13 | get { return _isSelected; } 14 | set { SetProperty(ref _isSelected, value); } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ViewModels/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XFThemes.ViewModels 2 | { 3 | public class BaseViewModel : ObservableObject 4 | { 5 | bool isBusy = false; 6 | public bool IsBusy 7 | { 8 | get { return isBusy; } 9 | set { SetProperty(ref isBusy, value); } 10 | } 11 | 12 | string title = string.Empty; 13 | public string Title 14 | { 15 | get { return title; } 16 | set { SetProperty(ref title, value); } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/values/styles_toolbarpopup_themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.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 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/XFThemes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netstandard2.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | WhiteTheme.xaml 16 | 17 | 18 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Renderers/ListViewCellICustomRenderer.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | using Xamarin.Forms; 3 | using Xamarin.Forms.Platform.iOS; 4 | using XFThemes.iOS.Renderers; 5 | 6 | [assembly: ExportRenderer(typeof(ViewCell), typeof(ListViewCellICustomRenderer))] 7 | namespace XFThemes.iOS.Renderers 8 | { 9 | public class ListViewCellICustomRenderer : ViewCellRenderer 10 | { 11 | public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv) 12 | { 13 | var cell = base.GetCell(item, reusableCell, tv); 14 | 15 | //For iOS, when we select any ListView item, we dont' want to display any selection color for that item. 16 | //So, following line sets the selectionstyle to None 17 | cell.SelectionStyle = UITableViewCellSelectionStyle.None; 18 | 19 | return cell; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace XFThemes 4 | { 5 | public partial class App : Application 6 | { 7 | public App() 8 | { 9 | InitializeComponent(); 10 | 11 | //It is necessary to load the theme when the app launches. It identifies the last selected/stored theme and based on that, it loads the proper theme resources. 12 | ThemeManager.LoadTheme(); 13 | 14 | MainPage = new NavigationPage(new DashboardPage()); 15 | } 16 | 17 | protected override void OnStart() 18 | { 19 | // Handle when your app starts 20 | } 21 | 22 | protected override void OnSleep() 23 | { 24 | // Handle when your app sleeps 25 | } 26 | 27 | protected override void OnResume() 28 | { 29 | // Handle when your app resumes 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("XFThemes.UWP")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("XFThemes.UWP")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /XFThemes/XFThemes/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("XFThemes")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("XFThemes")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ViewModels/ObservableObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Runtime.CompilerServices; 5 | 6 | namespace XFThemes.ViewModels 7 | { 8 | public class ObservableObject : INotifyPropertyChanged 9 | { 10 | protected bool SetProperty(ref T backingStore, T value, 11 | [CallerMemberName]string propertyName = "", 12 | Action onChanged = null) 13 | { 14 | if (EqualityComparer.Default.Equals(backingStore, value)) 15 | return false; 16 | 17 | backingStore = value; 18 | onChanged?.Invoke(); 19 | OnPropertyChanged(propertyName); 20 | return true; 21 | } 22 | 23 | #region INotifyPropertyChanged 24 | public event PropertyChangedEventHandler PropertyChanged; 25 | protected void OnPropertyChanged([CallerMemberName] string propertyName = "") 26 | { 27 | var changed = PropertyChanged; 28 | if (changed == null) 29 | return; 30 | 31 | changed.Invoke(this, new PropertyChangedEventArgs(propertyName)); 32 | } 33 | #endregion 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ViewModels/DashboardViewModel.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace XFThemes.ViewModels 4 | { 5 | public class DashboardViewModel : BaseViewModel 6 | { 7 | public DashboardViewModel() 8 | { 9 | Title = "Dashboard"; 10 | ThemeSelectionPageCommand = new Command(ThemeSelectionPageCommandExecute); 11 | GoToProfilePageCommand = new Command(GoToProfilePageCommandExecute); 12 | } 13 | 14 | /// 15 | /// Command to invoke when you want to navigate to the ThemeSelection page 16 | /// 17 | public Command ThemeSelectionPageCommand { get; set; } 18 | private void ThemeSelectionPageCommandExecute() 19 | { 20 | Application.Current.MainPage.Navigation.PushAsync(new ThemeSelectionPage()); 21 | } 22 | 23 | /// 24 | /// Command to invoke when you want to navigate to Profile page 25 | /// 26 | public Command GoToProfilePageCommand { get; set; } 27 | private void GoToProfilePageCommandExecute() 28 | { 29 | Application.Current.MainPage.Navigation.PushAsync(new MyProfilePage()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using ImageCircle.Forms.Plugin.iOS; 3 | using UIKit; 4 | 5 | namespace XFThemes.iOS 6 | { 7 | // The UIApplicationDelegate for the application. This class is responsible for launching the 8 | // User Interface of the application, as well as listening (and optionally responding) to 9 | // application events from iOS. 10 | [Register("AppDelegate")] 11 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 12 | { 13 | // 14 | // This method is invoked when the application has loaded and is ready to run. In this 15 | // method you should instantiate the window, load the UI into it and then make the window 16 | // visible. 17 | // 18 | // You have 17 seconds to return from this method, or iOS will terminate your application. 19 | // 20 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 21 | { 22 | global::Xamarin.Forms.Forms.Init(); 23 | ImageCircleRenderer.Init(); 24 | LoadApplication(new App()); 25 | 26 | return base.FinishedLaunching(app, options); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/BlueTheme.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | #120064 8 | 9 | 10 | #090030 11 | 12 | 13 | #FFFFFF 14 | 15 | 16 | #120064 17 | 18 | 19 | #FFFFFF 20 | 21 | 22 | #3f3f3f 23 | 24 | 25 | #6e6e6e 26 | 27 | 28 | #969696 29 | 30 | 31 | #FFFFFF 32 | 33 | 34 | #56000000 35 | 36 | 37 | #ececec 38 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/DarkTheme.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | #dd004e 8 | 9 | 10 | #b70042 11 | 12 | 13 | #FFFFFF 14 | 15 | 16 | #141414 17 | 18 | 19 | #dd004e 20 | 21 | 22 | #ffffff 23 | 24 | 25 | #bdbdbd 26 | 27 | 28 | #a5a5a5 29 | 30 | 31 | #FFFFFF 32 | 33 | 34 | #56000000 35 | 36 | 37 | #464646 38 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/LightTheme.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | #2acd09 8 | 9 | 10 | #22a009 11 | 12 | 13 | #FFFFFF 14 | 15 | 16 | #FFFFFF 17 | 18 | 19 | #2acd09 20 | 21 | 22 | #3f3f3f 23 | 24 | 25 | #6e6e6e 26 | 27 | 28 | #969696 29 | 30 | 31 | #FFFFFF 32 | 33 | 34 | #56000000 35 | 36 | 37 | #ececec 38 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/OrangeTheme.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | #f44100 8 | 9 | 10 | #c63500 11 | 12 | 13 | #FFFFFF 14 | 15 | 16 | #141414 17 | 18 | 19 | #f44100 20 | 21 | 22 | #ffffff 23 | 24 | 25 | #bdbdbd 26 | 27 | 28 | #a5a5a5 29 | 30 | 31 | #FFFFFF 32 | 33 | 34 | #56000000 35 | 36 | 37 | #464646 38 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeResources/WhiteTheme.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | #f0f0f0 8 | 9 | 10 | #d2d2d2 11 | 12 | 13 | #1d1d1d 14 | 15 | 16 | #FFFFFF 17 | 18 | 19 | #f0f0f0 20 | 21 | 22 | #3f3f3f 23 | 24 | 25 | #6e6e6e 26 | 27 | 28 | #969696 29 | 30 | 31 | #FFFFFF 32 | 33 | 34 | #56000000 35 | 36 | 37 | #ececec 38 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("XFThemes.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("XFThemes.Android")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | 32 | // Add some common permissions, these can be removed if not needed 33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 35 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/Pages/MyProfilePage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Xaml; 3 | 4 | namespace XFThemes 5 | { 6 | [XamlCompilation(XamlCompilationOptions.Compile)] 7 | public partial class MyProfilePage : ContentPage 8 | { 9 | public MyProfilePage () 10 | { 11 | InitializeComponent (); 12 | 13 | //Primary Toolbar buttons 14 | //1. Edit (as Icon) 15 | var editProfileToolbarItem = new ToolbarItem { Text = "EDIT", IconImageSource = "editprofile" }; 16 | //2. SAVE (as Text) 17 | var saveProfileToolbarItem = new ToolbarItem { Text = "SAVE" }; 18 | ToolbarItems.Add(editProfileToolbarItem); 19 | ToolbarItems.Add(saveProfileToolbarItem); 20 | 21 | //Android Only : Secondary Toolbar Items 22 | if (Device.RuntimePlatform == Device.Android) 23 | { 24 | var toolbarItem1 = new ToolbarItem { Text = "Item 1", Priority = 1, Order = ToolbarItemOrder.Secondary }; 25 | var toolbarItem2 = new ToolbarItem { Text = "Item 2", Priority = 1, Order = ToolbarItemOrder.Secondary }; 26 | var toolbarItem3 = new ToolbarItem { Text = "Item 3", Priority = 1, Order = ToolbarItemOrder.Secondary }; 27 | ToolbarItems.Add(toolbarItem1); 28 | ToolbarItems.Add(toolbarItem2); 29 | ToolbarItems.Add(toolbarItem3); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("XFThemes.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("XFThemes.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/values/styles_toolbar_themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 17 | 18 | 23 | 24 | 29 | 30 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/values/styles_app_themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 19 | 20 | 26 | 27 | 33 | 34 | 40 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 8.0 25 | CFBundleDisplayName 26 | XFThemes 27 | CFBundleIdentifier 28 | com.yourcompany.XFThemes 29 | CFBundleVersion 30 | 1.0 31 | CFBundleIconFiles 32 | 33 | Icon-60@2x 34 | Icon-60@3x 35 | Icon-76 36 | Icon-76@2x 37 | Default 38 | Default@2x 39 | Default-568h@2x 40 | Default-Portrait 41 | Default-Portrait@2x 42 | Icon-Small-40 43 | Icon-Small-40@2x 44 | Icon-Small-40@3x 45 | Icon-Small 46 | Icon-Small@2x 47 | Icon-Small@3x 48 | 49 | UILaunchStoryboardName 50 | LaunchScreen 51 | UIViewControllerBasedStatusBarAppearance 52 | 53 | CFBundleName 54 | XFThemes 55 | 56 | 57 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.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 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #00000000 5 | #00000000 6 | 7 | 34 | 35 | 38 | 39 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | PIN Login 18 | 74bfbaa5-9d07-42f0-ae32-d1b8e6d6ca67 19 | Assets\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Android.OS; 4 | using ImageCircle.Forms.Plugin.Droid; 5 | using static XFThemes.ThemeManager; 6 | 7 | namespace XFThemes.Droid 8 | { 9 | [Activity(Label = "XFThemes", Icon = "@drawable/icon", Theme = "@style/lightAppTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 10 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 11 | { 12 | //Used to get the Toolbar and then themify the Toolbar icons from this 13 | public static MainActivity Instance = null; 14 | 15 | protected override void OnCreate(Bundle bundle) 16 | { 17 | TabLayoutResource = Resource.Layout.Tabbar; 18 | ToolbarResource = Resource.Layout.Toolbar; 19 | 20 | //Set Native Android theme as per the Current Theme selection. 21 | var theme = ThemeManager.CurrentTheme(); 22 | switch (theme) 23 | { 24 | case Themes.Light: 25 | { 26 | SetTheme(Resource.Style.lightAppTheme); 27 | break; 28 | } 29 | case Themes.Dark: 30 | { 31 | SetTheme(Resource.Style.darkAppTheme); 32 | break; 33 | } 34 | case Themes.Blue: 35 | { 36 | SetTheme(Resource.Style.blueAppTheme); 37 | break; 38 | } 39 | case Themes.Orange: 40 | { 41 | SetTheme(Resource.Style.orangeAppTheme); 42 | break; 43 | } 44 | case Themes.White: 45 | { 46 | SetTheme(Resource.Style.whiteAppTheme); 47 | break; 48 | } 49 | default: 50 | SetTheme(Resource.Style.lightAppTheme); 51 | break; 52 | } 53 | 54 | base.OnCreate(bundle); 55 | 56 | global::Xamarin.Forms.Forms.Init(this, bundle); 57 | ImageCircleRenderer.Init(); 58 | LoadApplication(new App()); 59 | Instance = this; 60 | } 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Renderers/DroidContentPageRenderer.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using Android.Graphics; 3 | using Android.Views; 4 | using System.Linq; 5 | using Xamarin.Forms; 6 | using Xamarin.Forms.Platform.Android; 7 | using XFThemes.Droid.Renderers; 8 | 9 | [assembly: ExportRenderer(typeof(ContentPage), typeof(DroidContentPageRenderer))] 10 | namespace XFThemes.Droid.Renderers 11 | { 12 | /// 13 | /// This renderer is created to handle the theming of the Android Toolbar 14 | /// On Constructor, it calls the method which does theme specific settings for Toolbar icons 15 | /// 16 | public class DroidContentPageRenderer : PageRenderer 17 | { 18 | public DroidContentPageRenderer(Context context) : base(context) 19 | { 20 | if (context == null) context = MainActivity.Instance; 21 | 22 | var toolbar = (context as MainActivity).FindViewById(Resource.Id.toolbar); 23 | if (toolbar != null) 24 | { 25 | var color = (Xamarin.Forms.Color)Xamarin.Forms.Application.Current.Resources.MergedDictionaries.ToList()[0]["PrimaryTintColor"]; 26 | PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(color.ToAndroid(), PorterDuff.Mode.Multiply); 27 | 28 | //1. Changing Tint color for the Toolbar icons 29 | var menu = toolbar.Menu; 30 | if (menu != null && menu.HasVisibleItems) 31 | { 32 | var i = 0; 33 | while (true) 34 | { 35 | IMenuItem item = null; 36 | try 37 | { 38 | item = menu.GetItem(i++); 39 | } 40 | catch (Java.Lang.IndexOutOfBoundsException) 41 | { 42 | break; 43 | } 44 | item.Icon?.SetColorFilter(colorFilter); 45 | } 46 | } 47 | } 48 | } 49 | 50 | protected override void OnElementChanged(ElementChangedEventArgs e) 51 | { 52 | base.OnElementChanged(e); 53 | 54 | if (e.OldElement != null || Element == null) 55 | { 56 | if (Element == null) 57 | return; 58 | } 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /XFThemes/XFThemes/Pages/ThemeSelectionPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 24 | 25 | 26 | 27 | 28 | 37 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.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 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/Dependencies/NativeServices.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Xamarin.Forms; 4 | using XFThemes.Dependencies; 5 | using XFThemes.Droid.Dependencies; 6 | 7 | [assembly: Dependency(typeof(NativeServices))] 8 | namespace XFThemes.Droid.Dependencies 9 | { 10 | public class NativeServices : INativeServices 11 | { 12 | public void OnThemeChanged(ThemeManager.Themes theme) 13 | { 14 | //Some attempts to restart activity without loosing Fragments inside it. 15 | //currently all options restarts the app from Main DashboardPage. 16 | 17 | /* 18 | var f = GetVisibleFragment(); 19 | f.Activity.Recreate(); 20 | */ 21 | 22 | /* 23 | Intent intent = new Intent(f.Context, typeof(MainActivity)); 24 | intent.SetFlags(ActivityFlags.ClearTask); 25 | f.Context.StartActivity(intent); 26 | */ 27 | 28 | /* 29 | Android.Support.V4.App.FragmentTransaction ft = MainActivity.Instance.SupportFragmentManager.BeginTransaction(); 30 | ft.Detach(f); 31 | ft.Attach(f); 32 | ft.Commit(); 33 | */ 34 | 35 | MainActivity activity = MainActivity.Instance; 36 | var intent = MainActivity.Instance.Intent; 37 | activity.Finish(); 38 | activity.StartActivity(intent); 39 | 40 | 41 | /*Bundle savedInstanceState = new Bundle(); 42 | ////this is important to save all your open states/fragment states 43 | MainActivity.Instance.OnSaveInstanceState(savedInstanceState); 44 | MainActivity.Instance.Recreate(); 45 | MainActivity.Instance.OnCreate(savedInstanceState, null); 46 | */ 47 | 48 | /*Intent i = MainActivity.Instance.Intent; 49 | MainActivity.Instance.OverridePendingTransition(0, 0); 50 | i.AddFlags(ActivityFlags.NoAnimation); 51 | MainActivity.Instance.Finish(); 52 | //restart the activity without animation 53 | MainActivity.Instance.OverridePendingTransition(0, 0); 54 | MainActivity.Instance.StartActivity(i);*/ 55 | } 56 | 57 | 58 | public Android.Support.V4.App.Fragment GetVisibleFragment() 59 | { 60 | Android.Support.V4.App.FragmentManager fragmentManager = MainActivity.Instance.SupportFragmentManager; 61 | List fragments = fragmentManager.Fragments.ToList(); 62 | if (fragments != null) 63 | { 64 | foreach (var fragment in fragments) 65 | { 66 | if (fragment != null && fragment.IsVisible) 67 | return fragment; 68 | } 69 | } 70 | return null; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ViewModels/ThemeSelectionViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Xamarin.Forms; 4 | using XFThemes.Dependencies; 5 | using XFThemes.Models; 6 | 7 | namespace XFThemes.ViewModels 8 | { 9 | public class ThemeSelectionViewModel : BaseViewModel 10 | { 11 | public ThemeSelectionViewModel() 12 | { 13 | Title = "Select Theme"; 14 | 15 | //Initialize the List with the theme details, you want to add in the app 16 | Themes = new List() 17 | { 18 | new AppTheme() { ThemeId = ThemeManager.Themes.Light, Title = "Light Theme", Description = "Gives a light theme experience" }, 19 | new AppTheme() { ThemeId = ThemeManager.Themes.Dark, Title = "Dark Theme", Description = "Gives a dark theme experience" }, 20 | new AppTheme() { ThemeId = ThemeManager.Themes.Blue, Title = "Blue Theme", Description = "Gives a blue theme experience" }, 21 | new AppTheme() { ThemeId = ThemeManager.Themes.Orange, Title = "Orange Theme", Description = "Gives an orange theme experience" }, 22 | new AppTheme() { ThemeId = ThemeManager.Themes.White, Title = "White Theme", Description = "Gives a white theme experience" } 23 | }; 24 | 25 | //Find the Current/Last selected theme, and set the IsSelected property for that specific theme item in the list. 26 | var selectedTheme = Themes.FirstOrDefault(x => x.ThemeId == ThemeManager.CurrentTheme()); 27 | selectedTheme.IsSelected = true; 28 | } 29 | 30 | List _themes; 31 | public List Themes 32 | { 33 | get { return _themes; } 34 | set { SetProperty(ref _themes, value); } 35 | } 36 | 37 | AppTheme _selectedTheme; 38 | public AppTheme SelectedTheme 39 | { 40 | get { return _selectedTheme; } 41 | set 42 | { 43 | SetProperty(ref _selectedTheme, value); 44 | if (value != null) { OnThemeSelected(value); } 45 | } 46 | } 47 | 48 | /// 49 | /// Invokes when you select any Theme from the ListView 50 | /// 51 | /// 52 | private void OnThemeSelected(AppTheme selectedTheme) 53 | { 54 | foreach (var t in Themes) 55 | { 56 | t.IsSelected = t.ThemeId == selectedTheme.ThemeId; 57 | } 58 | ThemeManager.ChangeTheme(selectedTheme.ThemeId); 59 | 60 | //For Android we need some Platform specific twicks for Android Toolbar. 61 | //Apply this platform specific change by invoking following DependencyService 62 | if (Device.RuntimePlatform == Device.Android || Device.RuntimePlatform == Device.UWP) 63 | { 64 | DependencyService.Get().OnThemeChanged(selectedTheme.ThemeId); 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 24 | 25 | 29 | 30 | 34 | 35 | 39 | 40 | 44 | 45 | 49 | 53 | 54 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/ThemeManager.cs: -------------------------------------------------------------------------------- 1 | using Plugin.Settings; 2 | using Xamarin.Forms; 3 | using XFThemes.ThemeResources; 4 | 5 | namespace XFThemes 6 | { 7 | public class ThemeManager 8 | { 9 | /// 10 | /// Defines the supported themes for the sample app 11 | /// 12 | public enum Themes 13 | { 14 | Light, 15 | Dark, 16 | Blue, 17 | Orange, 18 | White 19 | } 20 | 21 | /// 22 | /// Changes the theme of the app. 23 | /// Add additional switch cases for more themes you add to the app. 24 | /// This also updates the local key storage value for the selected theme. 25 | /// 26 | /// 27 | public static void ChangeTheme(Themes theme) 28 | { 29 | var mergedDictionaries = Application.Current.Resources.MergedDictionaries; 30 | if (mergedDictionaries != null) 31 | { 32 | mergedDictionaries.Clear(); 33 | 34 | //Update local key value with the new theme you select. 35 | CrossSettings.Current.AddOrUpdateValue("SelectedTheme", (int)theme); 36 | 37 | switch (theme) 38 | { 39 | case Themes.Light: 40 | { 41 | mergedDictionaries.Add(new LightTheme()); 42 | break; 43 | } 44 | case Themes.Dark: 45 | { 46 | mergedDictionaries.Add(new DarkTheme()); 47 | break; 48 | } 49 | case Themes.Blue: 50 | { 51 | mergedDictionaries.Add(new BlueTheme()); 52 | break; 53 | } 54 | case Themes.Orange: 55 | { 56 | mergedDictionaries.Add(new OrangeTheme()); 57 | break; 58 | } 59 | case Themes.White: 60 | { 61 | mergedDictionaries.Add(new WhiteTheme()); 62 | break; 63 | } 64 | default: 65 | mergedDictionaries.Add(new LightTheme()); 66 | break; 67 | } 68 | } 69 | } 70 | 71 | /// 72 | /// Reads current theme id from the local storage and loads it. 73 | /// 74 | public static void LoadTheme() 75 | { 76 | Themes currentTheme = CurrentTheme(); 77 | ChangeTheme(currentTheme); 78 | } 79 | 80 | /// 81 | /// Gives current/last selected theme from the local storage. 82 | /// 83 | /// 84 | public static Themes CurrentTheme() 85 | { 86 | return (Themes)CrossSettings.Current.GetValueOrDefault("SelectedTheme", (int)Themes.Light); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.Android/packages.config: -------------------------------------------------------------------------------- 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 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /XFThemes/XFThemes.UWP/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using ImageCircle.Forms.Plugin.UWP; 2 | using System; 3 | using Windows.ApplicationModel; 4 | using Windows.ApplicationModel.Activation; 5 | using Windows.UI.Xaml; 6 | using Windows.UI.Xaml.Controls; 7 | using Windows.UI.Xaml.Navigation; 8 | using Xamarin.Forms.Platform.UWP; 9 | 10 | namespace XFThemes.UWP 11 | { 12 | /// 13 | /// Provides application-specific behavior to supplement the default Application class. 14 | /// 15 | sealed partial class App : Application 16 | { 17 | /// 18 | /// Initializes the singleton application object. This is the first line of authored code 19 | /// executed, and as such is the logical equivalent of main() or WinMain(). 20 | /// 21 | public App() 22 | { 23 | this.InitializeComponent(); 24 | this.Suspending += OnSuspending; 25 | } 26 | 27 | /// 28 | /// Invoked when the application is launched normally by the end user. Other entry points 29 | /// will be used such as when the application is launched to open a specific file. 30 | /// 31 | /// Details about the launch request and process. 32 | protected override void OnLaunched(LaunchActivatedEventArgs e) 33 | { 34 | Frame rootFrame = Window.Current.Content as Frame; 35 | 36 | // Do not repeat app initialization when the Window already has content, 37 | // just ensure that the window is active 38 | if (rootFrame == null) 39 | { 40 | // Create a Frame to act as the navigation context and navigate to the first page 41 | rootFrame = new Frame(); 42 | 43 | rootFrame.NavigationFailed += OnNavigationFailed; 44 | 45 | Xamarin.Forms.Forms.Init(e); 46 | ImageCircleRenderer.Init(); 47 | 48 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 49 | { 50 | //TODO: Load state from previously suspended application 51 | } 52 | 53 | // Place the frame in the current Window 54 | Window.Current.Content = rootFrame; 55 | } 56 | 57 | if (rootFrame.Content == null) 58 | { 59 | // When the navigation stack isn't restored navigate to the first page, 60 | // configuring the new page by passing required information as a navigation 61 | // parameter 62 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 63 | } 64 | // Ensure the current window is active 65 | Window.Current.Activate(); 66 | } 67 | 68 | /// 69 | /// Invoked when Navigation to a certain page fails 70 | /// 71 | /// The Frame which failed navigation 72 | /// Details about the navigation failure 73 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 74 | { 75 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 76 | } 77 | 78 | /// 79 | /// Invoked when application execution is being suspended. Application state is saved 80 | /// without knowing whether the application will be terminated or resumed with the contents 81 | /// of memory still intact. 82 | /// 83 | /// The source of the suspend request. 84 | /// Details about the suspend request. 85 | private void OnSuspending(object sender, SuspendingEventArgs e) 86 | { 87 | var deferral = e.SuspendingOperation.GetDeferral(); 88 | //TODO: Save application state and stop any background activity 89 | deferral.Complete(); 90 | } 91 | 92 | public static void ApplyThemedColors() 93 | { 94 | var appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); 95 | appView.TitleBar.BackgroundColor = ((Xamarin.Forms.Color)XFThemes.App.Current.Resources["PrimaryColor"]).ToWindowsColor(); 96 | appView.TitleBar.ButtonBackgroundColor = ((Xamarin.Forms.Color)XFThemes.App.Current.Resources["PrimaryColor"]).ToWindowsColor(); 97 | appView.TitleBar.ForegroundColor = ((Xamarin.Forms.Color)XFThemes.App.Current.Resources["PrimaryTintColor"]).ToWindowsColor(); 98 | appView.TitleBar.ButtonForegroundColor = ((Xamarin.Forms.Color)XFThemes.App.Current.Resources["PrimaryTintColor"]).ToWindowsColor(); 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /XFThemes/XFThemes/Pages/DashboardPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 49 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 84 | 88 | 92 | 96 | 110 | 124 | 137 | 151 | 152 |