diff --git a/MyFirstMauiApp/.vscode/launch.json b/MyFirstMauiApp/.vscode/launch.json deleted file mode 100644 index d5b7fed..0000000 --- a/MyFirstMauiApp/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": ".NET MAUI", - "type": "maui", - "request": "launch", - "preLaunchTask": "maui: Build", - "project": "./MauiBinding" - } - ] -} diff --git a/MyFirstMauiApp/CollectionViewDemos/App.xaml b/MyFirstMauiApp/CollectionViewDemos/App.xaml new file mode 100644 index 0000000..8117d36 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/App.xaml.cs b/MyFirstMauiApp/CollectionViewDemos/App.xaml.cs new file mode 100644 index 0000000..d0c0b01 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/App.xaml.cs @@ -0,0 +1,12 @@ +namespace CollectionViewDemos +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/AppShell.xaml b/MyFirstMauiApp/CollectionViewDemos/AppShell.xaml new file mode 100644 index 0000000..4343f40 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/AppShell.xaml @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/AppShell.xaml.cs b/MyFirstMauiApp/CollectionViewDemos/AppShell.xaml.cs new file mode 100644 index 0000000..237eaa1 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace CollectionViewDemos +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/CollectionViewDemos.csproj b/MyFirstMauiApp/CollectionViewDemos/CollectionViewDemos.csproj new file mode 100644 index 0000000..d3028de --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/CollectionViewDemos.csproj @@ -0,0 +1,81 @@ + + + + net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 + + + + + + + Exe + CollectionViewDemos + true + true + enable + enable + + + CollectionViewDemos + + + com.companyname.collectionviewdemos + + + 1.0 + 1 + + 11.0 + 13.1 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FirstPage.xaml + + + + + + MSBuild:Compile + + + MSBuild:Compile + + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/Controls/MonkeyDataTemplateSelector.cs b/MyFirstMauiApp/CollectionViewDemos/Controls/MonkeyDataTemplateSelector.cs new file mode 100644 index 0000000..4c08eb6 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Controls/MonkeyDataTemplateSelector.cs @@ -0,0 +1,21 @@ +using CollectionViewDemos.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CollectionViewDemos.Controls +{ + internal class MonkeyDataTemplateSelector : DataTemplateSelector + { + public DataTemplate AmericanMonkey { get; set; } + public DataTemplate OtherMonkey { get; set; } + + protected override DataTemplate OnSelectTemplate(object item, BindableObject container) + { + Monkey monkey = (Monkey)item; + return monkey.Location.Contains("America") ? AmericanMonkey : OtherMonkey; + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/MauiProgram.cs b/MyFirstMauiApp/CollectionViewDemos/MauiProgram.cs new file mode 100644 index 0000000..8e983cf --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/MauiProgram.cs @@ -0,0 +1,25 @@ +using Microsoft.Extensions.Logging; + +namespace CollectionViewDemos +{ + public static class MauiProgram + { + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); + }); + +#if DEBUG + builder.Logging.AddDebug(); +#endif + + return builder.Build(); + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Models/Monkey.cs b/MyFirstMauiApp/CollectionViewDemos/Models/Monkey.cs new file mode 100644 index 0000000..70ed1c9 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Models/Monkey.cs @@ -0,0 +1,11 @@ +namespace CollectionViewDemos.Models +{ + public class Monkey + { + public string Name { get; set; } + public string Location { get; set; } + public string Details { get; set; } + public string ImageUrl { get; set; } + public bool IsFavorite { get; set; } + } +} \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/AndroidManifest.xml b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..e9937ad --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/MainActivity.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/MainActivity.cs new file mode 100644 index 0000000..be33d53 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/MainActivity.cs @@ -0,0 +1,11 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace CollectionViewDemos +{ + [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] + public class MainActivity : MauiAppCompatActivity + { + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/MainApplication.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/MainApplication.cs new file mode 100644 index 0000000..6c2104c --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/MainApplication.cs @@ -0,0 +1,16 @@ +using Android.App; +using Android.Runtime; + +namespace CollectionViewDemos +{ + [Application] + public class MainApplication : MauiApplication + { + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/Resources/values/colors.xml b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 0000000..c04d749 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/AppDelegate.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 0000000..f1a9bfb --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace CollectionViewDemos +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Entitlements.plist b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Entitlements.plist new file mode 100644 index 0000000..de4adc9 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,14 @@ + + + + + + + com.apple.security.app-sandbox + + + com.apple.security.network.client + + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Info.plist b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Info.plist new file mode 100644 index 0000000..7268977 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + UIDeviceFamily + + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Program.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Program.cs new file mode 100644 index 0000000..ec82b4f --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace CollectionViewDemos +{ + public class Program + { + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Tizen/Main.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/Tizen/Main.cs new file mode 100644 index 0000000..3b9feb8 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Tizen/Main.cs @@ -0,0 +1,17 @@ +using Microsoft.Maui; +using Microsoft.Maui.Hosting; +using System; + +namespace CollectionViewDemos +{ + internal class Program : MauiApplication + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + + static void Main(string[] args) + { + var app = new Program(); + app.Run(args); + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Tizen/tizen-manifest.xml b/MyFirstMauiApp/CollectionViewDemos/Platforms/Tizen/tizen-manifest.xml new file mode 100644 index 0000000..f5f6ebf --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Tizen/tizen-manifest.xml @@ -0,0 +1,15 @@ + + + + + + maui-appicon-placeholder + + + + + http://tizen.org/privilege/internet + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/App.xaml b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/App.xaml new file mode 100644 index 0000000..a7fd103 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/App.xaml.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/App.xaml.cs new file mode 100644 index 0000000..ad7bcc1 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/App.xaml.cs @@ -0,0 +1,25 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace CollectionViewDemos.WinUI +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : MauiWinUIApplication + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } + +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/Package.appxmanifest b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/Package.appxmanifest new file mode 100644 index 0000000..e6251d2 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,46 @@ + + + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/app.manifest b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/app.manifest new file mode 100644 index 0000000..4c7ed8b --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/AppDelegate.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/AppDelegate.cs new file mode 100644 index 0000000..f1a9bfb --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace CollectionViewDemos +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/Info.plist b/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/Info.plist new file mode 100644 index 0000000..0004a4f --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/Info.plist @@ -0,0 +1,32 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/Program.cs b/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/Program.cs new file mode 100644 index 0000000..ec82b4f --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Platforms/iOS/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace CollectionViewDemos +{ + public class Program + { + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Properties/launchSettings.json b/MyFirstMauiApp/CollectionViewDemos/Properties/launchSettings.json new file mode 100644 index 0000000..edf8aad --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/AppIcon/appicon.svg b/MyFirstMauiApp/CollectionViewDemos/Resources/AppIcon/appicon.svg new file mode 100644 index 0000000..9d63b65 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Resources/AppIcon/appicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/AppIcon/appiconfg.svg b/MyFirstMauiApp/CollectionViewDemos/Resources/AppIcon/appiconfg.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/Fonts/OpenSans-Regular.ttf b/MyFirstMauiApp/CollectionViewDemos/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..2d1edf0 Binary files /dev/null and b/MyFirstMauiApp/CollectionViewDemos/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/Fonts/OpenSans-Semibold.ttf b/MyFirstMauiApp/CollectionViewDemos/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 0000000..fe13d06 Binary files /dev/null and b/MyFirstMauiApp/CollectionViewDemos/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/Images/dotnet_bot.png b/MyFirstMauiApp/CollectionViewDemos/Resources/Images/dotnet_bot.png new file mode 100644 index 0000000..f93ce02 Binary files /dev/null and b/MyFirstMauiApp/CollectionViewDemos/Resources/Images/dotnet_bot.png differ diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/Raw/AboutAssets.txt b/MyFirstMauiApp/CollectionViewDemos/Resources/Raw/AboutAssets.txt new file mode 100644 index 0000000..15d6244 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Resources/Raw/AboutAssets.txt @@ -0,0 +1,15 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories). Deployment of the asset to your application +is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. + + + +These files will be deployed with you package and will be accessible using Essentials: + + async Task LoadMauiAsset() + { + using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); + using var reader = new StreamReader(stream); + + var contents = reader.ReadToEnd(); + } diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/Splash/splash.svg b/MyFirstMauiApp/CollectionViewDemos/Resources/Splash/splash.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/Styles/Colors.xaml b/MyFirstMauiApp/CollectionViewDemos/Resources/Styles/Colors.xaml new file mode 100644 index 0000000..30307a5 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Resources/Styles/Colors.xaml @@ -0,0 +1,45 @@ + + + + + + + #512BD4 + #ac99ea + #242424 + #DFD8F7 + #9880e5 + #2B0B98 + + White + Black + #D600AA + #190649 + #1f1f1f + + #E1E1E1 + #C8C8C8 + #ACACAC + #919191 + #6E6E6E + #404040 + #212121 + #141414 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Resources/Styles/Styles.xaml b/MyFirstMauiApp/CollectionViewDemos/Resources/Styles/Styles.xaml new file mode 100644 index 0000000..e0d36bb --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Resources/Styles/Styles.xaml @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MyFirstMauiApp/CollectionViewDemos/ViewModels/MonkeysViewModel.cs b/MyFirstMauiApp/CollectionViewDemos/ViewModels/MonkeysViewModel.cs new file mode 100644 index 0000000..19a2539 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/ViewModels/MonkeysViewModel.cs @@ -0,0 +1,165 @@ +using CollectionViewDemos.Models; +using CommunityToolkit.Mvvm.ComponentModel; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CollectionViewDemos.ViewModels +{ + internal class MonkeysViewModel : ObservableObject + { + private readonly IList _source; + + public ObservableCollection Monkeys { get; private set; } + + public MonkeysViewModel() + { + _source = new List(); + CreateMonkeyCollection(); + } + + void CreateMonkeyCollection() + { + _source.Add(new Monkey + { + Name = "Baboon", + Location = "Africa & Asia", + Details = "Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Papio_anubis_%28Serengeti%2C_2009%29.jpg/200px-Papio_anubis_%28Serengeti%2C_2009%29.jpg" + }); + + _source.Add(new Monkey + { + Name = "Capuchin Monkey", + Location = "Central & South America", + Details = "The capuchin monkeys are New World monkeys of the subfamily Cebinae. Prior to 2011, the subfamily contained only a single genus, Cebus.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Capuchin_Costa_Rica.jpg/200px-Capuchin_Costa_Rica.jpg" + }); + + _source.Add(new Monkey + { + Name = "Blue Monkey", + Location = "Central and East Africa", + Details = "The blue monkey or diademed monkey is a species of Old World monkey native to Central and East Africa, ranging from the upper Congo River basin east to the East African Rift and south to northern Angola and Zambia", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/BlueMonkey.jpg/220px-BlueMonkey.jpg" + }); + + _source.Add(new Monkey + { + Name = "Squirrel Monkey", + Location = "Central & South America", + Details = "The squirrel monkeys are the New World monkeys of the genus Saimiri. They are the only genus in the subfamily Saimirinae. The name of the genus Saimiri is of Tupi origin, and was also used as an English name by early researchers.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Saimiri_sciureus-1_Luc_Viatour.jpg/220px-Saimiri_sciureus-1_Luc_Viatour.jpg" + }); + + _source.Add(new Monkey + { + Name = "Golden Lion Tamarin", + Location = "Brazil", + Details = "The golden lion tamarin also known as the golden marmoset, is a small New World monkey of the family Callitrichidae.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Golden_lion_tamarin_portrait3.jpg/220px-Golden_lion_tamarin_portrait3.jpg" + }); + + _source.Add(new Monkey + { + Name = "Howler Monkey", + Location = "South America", + Details = "Howler monkeys are among the largest of the New World monkeys. Fifteen species are currently recognised. Previously classified in the family Cebidae, they are now placed in the family Atelidae.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Alouatta_guariba.jpg/200px-Alouatta_guariba.jpg" + }); + + _source.Add(new Monkey + { + Name = "Japanese Macaque", + Location = "Japan", + Details = "The Japanese macaque, is a terrestrial Old World monkey species native to Japan. They are also sometimes known as the snow monkey because they live in areas where snow covers the ground for months each", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Macaca_fuscata_fuscata1.jpg/220px-Macaca_fuscata_fuscata1.jpg" + }); + + _source.Add(new Monkey + { + Name = "Mandrill", + Location = "Southern Cameroon, Gabon, Equatorial Guinea, and Congo", + Details = "The mandrill is a primate of the Old World monkey family, closely related to the baboons and even more closely to the drill. It is found in southern Cameroon, Gabon, Equatorial Guinea, and Congo.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Mandrill_at_san_francisco_zoo.jpg/220px-Mandrill_at_san_francisco_zoo.jpg" + }); + + _source.Add(new Monkey + { + Name = "Proboscis Monkey", + Location = "Borneo", + Details = "The proboscis monkey or long-nosed monkey, known as the bekantan in Malay, is a reddish-brown arboreal Old World monkey that is endemic to the south-east Asian island of Borneo.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Proboscis_Monkey_in_Borneo.jpg/250px-Proboscis_Monkey_in_Borneo.jpg" + }); + + _source.Add(new Monkey + { + Name = "Red-shanked Douc", + Location = "Vietnam, Laos", + Details = "The red-shanked douc is a species of Old World monkey, among the most colourful of all primates. This monkey is sometimes called the \"costumed ape\" for its extravagant appearance. From its knees to its ankles it sports maroon-red \"stockings\", and it appears to wear white forearm length gloves. Its attire is finished with black hands and feet. The golden face is framed by a white ruff, which is considerably fluffier in males. The eyelids are a soft powder blue. The tail is white with a triangle of white hair at the base. Males of all ages have a white spot on both sides of the corners of the rump patch, and red and white genitals.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Portrait_of_a_Douc.jpg/159px-Portrait_of_a_Douc.jpg" + }); + + _source.Add(new Monkey + { + Name = "Gray-shanked Douc", + Location = "Vietnam", + Details = "The gray-shanked douc langur is a douc species native to the Vietnamese provinces of Quảng Nam, Quảng Ngãi, Bình Định, Kon Tum, and Gia Lai. The total population is estimated at 550 to 700 individuals. In 2016, Dr Benjamin Rawson, Country Director of Fauna & Flora International - Vietnam Programme, announced a discovery of an additional population of more than 500 individuals found in Central Vietnam, bringing the total population up to approximately 1000 individuals.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Cuc.Phuong.Primate.Rehab.center.jpg/320px-Cuc.Phuong.Primate.Rehab.center.jpg" + }); + + _source.Add(new Monkey + { + Name = "Golden Snub-nosed Monkey", + Location = "China", + Details = "The golden snub-nosed monkey is an Old World monkey in the Colobinae subfamily. It is endemic to a small area in temperate, mountainous forests of central and Southwest China. They inhabit these mountainous forests of Southwestern China at elevations of 1,500-3,400 m above sea level. The Chinese name is Sichuan golden hair monkey. It is also widely referred to as the Sichuan snub-nosed monkey. Of the three species of snub-nosed monkeys in China, the golden snub-nosed monkey is the most widely distributed throughout China.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/Golden_Snub-nosed_Monkeys%2C_Qinling_Mountains_-_China.jpg/165px-Golden_Snub-nosed_Monkeys%2C_Qinling_Mountains_-_China.jpg" + }); + + _source.Add(new Monkey + { + Name = "Black Snub-nosed Monkey", + Location = "China", + Details = "The black snub-nosed monkey, also known as the Yunnan snub-nosed monkey, is an endangered species of primate in the family Cercopithecidae. It is endemic to China, where it is known to the locals as the Yunnan golden hair monkey and the black golden hair monkey. It is threatened by habitat loss. It was named after Bishop Félix Biet.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/RhinopitecusBieti.jpg/320px-RhinopitecusBieti.jpg" + }); + + _source.Add(new Monkey + { + Name = "Tonkin Snub-nosed Monkey", + Location = "Vietnam", + Details = "The Tonkin snub-nosed monkey or Dollman's snub-nosed monkey is a slender-bodied arboreal Old World monkey, endemic to northern Vietnam. It is a black and white monkey with a pink nose and lips and blue patches round the eyes. It is found at altitudes of 200 to 1,200 m (700 to 3,900 ft) on fragmentary patches of forest on craggy limestone areas. First described in 1912, the monkey was rediscovered in 1990 but is exceedingly rare. In 2008, fewer than 250 individuals were thought to exist, and the species was the subject of intense conservation effort. The main threats faced by these monkeys is habitat loss and hunting, and the International Union for Conservation of Nature has rated the species as \"critically endangered\".", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Tonkin_snub-nosed_monkeys_%28Rhinopithecus_avunculus%29.jpg/320px-Tonkin_snub-nosed_monkeys_%28Rhinopithecus_avunculus%29.jpg" + }); + + _source.Add(new Monkey + { + Name = "Thomas's Langur", + Location = "Indonesia", + Details = "Thomas's langur is a species of primate in the family Cercopithecidae. It is endemic to North Sumatra, Indonesia. Its natural habitat is subtropical or tropical dry forests. It is threatened by habitat loss. Its native names are reungkah in Acehnese and kedih in Alas.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Thomas%27s_langur_Presbytis_thomasi.jpg/142px-Thomas%27s_langur_Presbytis_thomasi.jpg" + }); + + _source.Add(new Monkey + { + Name = "Purple-faced Langur", + Location = "Sri Lanka", + Details = "The purple-faced langur, also known as the purple-faced leaf monkey, is a species of Old World monkey that is endemic to Sri Lanka. The animal is a long-tailed arboreal species, identified by a mostly brown appearance, dark face (with paler lower face) and a very shy nature. The species was once highly prevalent, found in suburban Colombo and the \"wet zone\" villages (areas with high temperatures and high humidity throughout the year, whilst rain deluges occur during the monsoon seasons), but rapid urbanization has led to a significant decrease in the population level of the monkeys.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Semnopithèque_blanchâtre_mâle.JPG/192px-Semnopithèque_blanchâtre_mâle.JPG" + }); + + _source.Add(new Monkey + { + Name = "Gelada", + Location = "Ethiopia", + Details = "The gelada, sometimes called the bleeding-heart monkey or the gelada baboon, is a species of Old World monkey found only in the Ethiopian Highlands, with large populations in the Semien Mountains. Theropithecus is derived from the Greek root words for \"beast-ape.\" Like its close relatives the baboons, it is largely terrestrial, spending much of its time foraging in grasslands.", + ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/1/13/Gelada-Pavian.jpg/320px-Gelada-Pavian.jpg" + }); + + Monkeys = new ObservableCollection(_source); + } + } +} diff --git a/MyFirstMauiApp/CollectionViewDemos/Views/FirstPage.xaml b/MyFirstMauiApp/CollectionViewDemos/Views/FirstPage.xaml new file mode 100644 index 0000000..38595e8 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Views/FirstPage.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Views/FirstPage.xaml.cs b/MyFirstMauiApp/CollectionViewDemos/Views/FirstPage.xaml.cs new file mode 100644 index 0000000..a98cb30 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Views/FirstPage.xaml.cs @@ -0,0 +1,9 @@ +namespace CollectionViewDemos.Views; + +public partial class FirstPage : ContentPage +{ + public FirstPage() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Views/SecondPage.xaml b/MyFirstMauiApp/CollectionViewDemos/Views/SecondPage.xaml new file mode 100644 index 0000000..547fc26 --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Views/SecondPage.xaml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/CollectionViewDemos/Views/SecondPage.xaml.cs b/MyFirstMauiApp/CollectionViewDemos/Views/SecondPage.xaml.cs new file mode 100644 index 0000000..163774e --- /dev/null +++ b/MyFirstMauiApp/CollectionViewDemos/Views/SecondPage.xaml.cs @@ -0,0 +1,9 @@ +namespace CollectionViewDemos.Views; + +public partial class SecondPage : ContentPage +{ + public SecondPage() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/App.xaml b/MyFirstMauiApp/MAUICollectionViewTest/App.xaml new file mode 100644 index 0000000..104e415 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/App.xaml.cs b/MyFirstMauiApp/MAUICollectionViewTest/App.xaml.cs new file mode 100644 index 0000000..f371a1e --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/App.xaml.cs @@ -0,0 +1,12 @@ +namespace MAUICollectionViewTest +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/AppShell.xaml b/MyFirstMauiApp/MAUICollectionViewTest/AppShell.xaml new file mode 100644 index 0000000..e0e97bb --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/AppShell.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/AppShell.xaml.cs b/MyFirstMauiApp/MAUICollectionViewTest/AppShell.xaml.cs new file mode 100644 index 0000000..5c5d26d --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace MAUICollectionViewTest +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/MAUICollectionViewTest.csproj b/MyFirstMauiApp/MAUICollectionViewTest/MAUICollectionViewTest.csproj new file mode 100644 index 0000000..8a54d19 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/MAUICollectionViewTest.csproj @@ -0,0 +1,75 @@ + + + + net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 + + + + + + + Exe + MAUICollectionViewTest + true + true + enable + enable + + + MAUICollectionViewTest + + + com.companyname.mauicollectionviewtest + + + 1.0 + 1 + + 11.0 + 13.1 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/MainPage.xaml b/MyFirstMauiApp/MAUICollectionViewTest/MainPage.xaml new file mode 100644 index 0000000..67d577b --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/MainPage.xaml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/MainPage.xaml.cs b/MyFirstMauiApp/MAUICollectionViewTest/MainPage.xaml.cs new file mode 100644 index 0000000..57aaac7 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/MainPage.xaml.cs @@ -0,0 +1,13 @@ +namespace MAUICollectionViewTest +{ + public partial class MainPage : ContentPage + { + int count = 0; + + public MainPage() + { + InitializeComponent(); + } + } + +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/MauiProgram.cs b/MyFirstMauiApp/MAUICollectionViewTest/MauiProgram.cs new file mode 100644 index 0000000..b32ce59 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/MauiProgram.cs @@ -0,0 +1,25 @@ +using Microsoft.Extensions.Logging; + +namespace MAUICollectionViewTest +{ + public static class MauiProgram + { + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); + }); + +#if DEBUG + builder.Logging.AddDebug(); +#endif + + return builder.Build(); + } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Models/Player.cs b/MyFirstMauiApp/MAUICollectionViewTest/Models/Player.cs new file mode 100644 index 0000000..d0752ae --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Models/Player.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MAUICollectionViewTest.Models +{ + internal class Player + { + public int PlayerId { get; set; } + public string PlayerName { get; set; } + public string PlayerImage { get; set; } + public string Country { get; set; } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/AndroidManifest.xml b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..e9937ad --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/MainActivity.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/MainActivity.cs new file mode 100644 index 0000000..c7c7a7b --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/MainActivity.cs @@ -0,0 +1,11 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace MAUICollectionViewTest +{ + [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] + public class MainActivity : MauiAppCompatActivity + { + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/MainApplication.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/MainApplication.cs new file mode 100644 index 0000000..fe53637 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/MainApplication.cs @@ -0,0 +1,16 @@ +using Android.App; +using Android.Runtime; + +namespace MAUICollectionViewTest +{ + [Application] + public class MainApplication : MauiApplication + { + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/Resources/values/colors.xml b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 0000000..c04d749 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/AppDelegate.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 0000000..6893813 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace MAUICollectionViewTest +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Entitlements.plist b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Entitlements.plist new file mode 100644 index 0000000..de4adc9 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,14 @@ + + + + + + + com.apple.security.app-sandbox + + + com.apple.security.network.client + + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Info.plist b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Info.plist new file mode 100644 index 0000000..7268977 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + UIDeviceFamily + + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Program.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Program.cs new file mode 100644 index 0000000..6b401c8 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace MAUICollectionViewTest +{ + public class Program + { + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Tizen/Main.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Tizen/Main.cs new file mode 100644 index 0000000..5e745c8 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Tizen/Main.cs @@ -0,0 +1,17 @@ +using Microsoft.Maui; +using Microsoft.Maui.Hosting; +using System; + +namespace MAUICollectionViewTest +{ + internal class Program : MauiApplication + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + + static void Main(string[] args) + { + var app = new Program(); + app.Run(args); + } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Tizen/tizen-manifest.xml b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Tizen/tizen-manifest.xml new file mode 100644 index 0000000..2402e61 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Tizen/tizen-manifest.xml @@ -0,0 +1,15 @@ + + + + + + maui-appicon-placeholder + + + + + http://tizen.org/privilege/internet + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/App.xaml b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/App.xaml new file mode 100644 index 0000000..363fa4b --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/App.xaml.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/App.xaml.cs new file mode 100644 index 0000000..76406de --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/App.xaml.cs @@ -0,0 +1,25 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace MAUICollectionViewTest.WinUI +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : MauiWinUIApplication + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } + +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/Package.appxmanifest b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/Package.appxmanifest new file mode 100644 index 0000000..1e9d2db --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,46 @@ + + + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/app.manifest b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/app.manifest new file mode 100644 index 0000000..c428e97 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/AppDelegate.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/AppDelegate.cs new file mode 100644 index 0000000..6893813 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace MAUICollectionViewTest +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/Info.plist b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/Info.plist new file mode 100644 index 0000000..0004a4f --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/Info.plist @@ -0,0 +1,32 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/Program.cs b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/Program.cs new file mode 100644 index 0000000..6b401c8 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Platforms/iOS/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace MAUICollectionViewTest +{ + public class Program + { + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Properties/launchSettings.json b/MyFirstMauiApp/MAUICollectionViewTest/Properties/launchSettings.json new file mode 100644 index 0000000..edf8aad --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/AppIcon/appicon.svg b/MyFirstMauiApp/MAUICollectionViewTest/Resources/AppIcon/appicon.svg new file mode 100644 index 0000000..9d63b65 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Resources/AppIcon/appicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/AppIcon/appiconfg.svg b/MyFirstMauiApp/MAUICollectionViewTest/Resources/AppIcon/appiconfg.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Fonts/OpenSans-Regular.ttf b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..2d1edf0 Binary files /dev/null and b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Fonts/OpenSans-Semibold.ttf b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 0000000..fe13d06 Binary files /dev/null and b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Images/dotnet_bot.png b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Images/dotnet_bot.png new file mode 100644 index 0000000..f93ce02 Binary files /dev/null and b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Images/dotnet_bot.png differ diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Images/icon.png b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Images/icon.png new file mode 100644 index 0000000..8b63011 Binary files /dev/null and b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Images/icon.png differ diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Raw/AboutAssets.txt b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Raw/AboutAssets.txt new file mode 100644 index 0000000..15d6244 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Raw/AboutAssets.txt @@ -0,0 +1,15 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories). Deployment of the asset to your application +is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. + + + +These files will be deployed with you package and will be accessible using Essentials: + + async Task LoadMauiAsset() + { + using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); + using var reader = new StreamReader(stream); + + var contents = reader.ReadToEnd(); + } diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Splash/splash.svg b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Splash/splash.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Styles/Colors.xaml b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Styles/Colors.xaml new file mode 100644 index 0000000..30307a5 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Styles/Colors.xaml @@ -0,0 +1,45 @@ + + + + + + + #512BD4 + #ac99ea + #242424 + #DFD8F7 + #9880e5 + #2B0B98 + + White + Black + #D600AA + #190649 + #1f1f1f + + #E1E1E1 + #C8C8C8 + #ACACAC + #919191 + #6E6E6E + #404040 + #212121 + #141414 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Resources/Styles/Styles.xaml b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Styles/Styles.xaml new file mode 100644 index 0000000..e0d36bb --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Resources/Styles/Styles.xaml @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MyFirstMauiApp/MAUICollectionViewTest/ViewModels/PlayerViewModel.cs b/MyFirstMauiApp/MAUICollectionViewTest/ViewModels/PlayerViewModel.cs new file mode 100644 index 0000000..7eaa770 --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/ViewModels/PlayerViewModel.cs @@ -0,0 +1,32 @@ +using MAUICollectionViewTest.Models; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MAUICollectionViewTest.ViewModels +{ + internal class PlayerViewModel + { + private ObservableCollection _players = new ObservableCollection(); + + public ObservableCollection Players { get { return _players; } } + + public PlayerViewModel() + { + Players.Add(new Player { PlayerId = 1, PlayerName = "Virat Kohi", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 2, PlayerName = "Rohit Sharma", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 3, PlayerName = "Shubhman Gill", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 4, PlayerName = "Shikhar Dhawan", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 5, PlayerName = "Suryakumar Yadav", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 6, PlayerName = "MahendraSingh Dhoni", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 7, PlayerName = "Jasprit Bumrah", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 8, PlayerName = "Hardik Pandya", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 9, PlayerName = "Shreyes Iyer", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 10, PlayerName = "Rishabh Pant", PlayerImage = "icon.png", Country = "INDIA" }); + Players.Add(new Player { PlayerId = 11, PlayerName = "Rvindra Jadeja", PlayerImage = "icon.png", Country = "INDIA" }); + } + } +} diff --git a/MyFirstMauiApp/MAUICollectionViewTest/Views/PlayerView.xaml b/MyFirstMauiApp/MAUICollectionViewTest/Views/PlayerView.xaml new file mode 100644 index 0000000..22c599c --- /dev/null +++ b/MyFirstMauiApp/MAUICollectionViewTest/Views/PlayerView.xaml @@ -0,0 +1,54 @@ + + + + + + + + +