diff --git a/Samples.sln b/Samples.sln index b7b208e..45003dd 100644 --- a/Samples.sln +++ b/Samples.sln @@ -21,6 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_Toolbar", "ch02_Designin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_CustomToolbar", "ch02_DesigningViews\ex_CustomToolbar\ex_CustomToolbar.csproj", "{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_CustomContentView", "ch03_DataBinding\ex_CustomContentView\ex_CustomContentView.csproj", "{5F26E535-4541-4C99-BD92-2DDB4EB65705}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +63,10 @@ Global {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Release|Any CPU.ActiveCfg = Release|Any CPU {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Release|Any CPU.Build.0 = Release|Any CPU + {5F26E535-4541-4C99-BD92-2DDB4EB65705}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F26E535-4541-4C99-BD92-2DDB4EB65705}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F26E535-4541-4C99-BD92-2DDB4EB65705}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F26E535-4541-4C99-BD92-2DDB4EB65705}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -73,5 +79,6 @@ Global {EAD02985-9DBA-459D-B12E-32A89D2C95C5} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} {0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} + {5F26E535-4541-4C99-BD92-2DDB4EB65705} = {E9273679-4D52-465F-8C23-8096DD8C2A7B} EndGlobalSection EndGlobal diff --git a/ch03_DataBinding/ex_CustomContentView/App.xaml b/ch03_DataBinding/ex_CustomContentView/App.xaml new file mode 100644 index 0000000..036013d --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ch03_DataBinding/ex_CustomContentView/App.xaml.cs b/ch03_DataBinding/ex_CustomContentView/App.xaml.cs new file mode 100644 index 0000000..6acab50 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/App.xaml.cs @@ -0,0 +1,11 @@ +namespace ex_CustomContentView; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } +} diff --git a/ch03_DataBinding/ex_CustomContentView/AppShell.xaml b/ch03_DataBinding/ex_CustomContentView/AppShell.xaml new file mode 100644 index 0000000..a16453a --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/AppShell.xaml @@ -0,0 +1,15 @@ + + + + + + diff --git a/ch03_DataBinding/ex_CustomContentView/AppShell.xaml.cs b/ch03_DataBinding/ex_CustomContentView/AppShell.xaml.cs new file mode 100644 index 0000000..aefdb54 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/AppShell.xaml.cs @@ -0,0 +1,9 @@ +namespace ex_CustomContentView; + +public partial class AppShell : Shell +{ + public AppShell() + { + InitializeComponent(); + } +} diff --git a/ch03_DataBinding/ex_CustomContentView/Artist.cs b/ch03_DataBinding/ex_CustomContentView/Artist.cs new file mode 100644 index 0000000..208dd00 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Artist.cs @@ -0,0 +1,8 @@ +namespace ex_CustomContentView; + +public class Artist +{ + public string Name { get; set; } + public string Instrument { get; set; } + public string Picture { get; set; } +} diff --git a/ch03_DataBinding/ex_CustomContentView/MainPage.xaml b/ch03_DataBinding/ex_CustomContentView/MainPage.xaml new file mode 100644 index 0000000..06e2e92 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/MainPage.xaml @@ -0,0 +1,27 @@ + + + + + diff --git a/ch03_DataBinding/ex_CustomContentView/MainPage.xaml.cs b/ch03_DataBinding/ex_CustomContentView/MainPage.xaml.cs new file mode 100644 index 0000000..9596883 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/MainPage.xaml.cs @@ -0,0 +1,37 @@ +namespace ex_CustomContentView; + +public partial class MainPage : ContentPage +{ + public MainPage() + { + InitializeComponent(); + BindingContext = this; + } + + public Artist Artist1 { get; set; } + = new Artist + { + Name = "Delphine Joussein", + Instrument = "flute, fx, voice", + Picture = "joussein.png" + }; + + public Artist Artist2 { get; set; } + = new Artist + { + Name = "Rafaëlle Rinaudo", + Instrument = "electric harp", + Picture = "rinaudo.png" + }; + + public Artist Artist3 { get; set; } + = new Artist + { + Name = "Blanche Lafuente", + Instrument = "drums, drum pad", + Picture = "lafuente.png" + }; + + public Color MainColor { get; set; } = Colors.DarkSalmon; +} + diff --git a/ch03_DataBinding/ex_CustomContentView/MauiProgram.cs b/ch03_DataBinding/ex_CustomContentView/MauiProgram.cs new file mode 100644 index 0000000..f638247 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/MauiProgram.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.Logging; + +namespace ex_CustomContentView; + +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/ch03_DataBinding/ex_CustomContentView/MyAvatarView.xaml b/ch03_DataBinding/ex_CustomContentView/MyAvatarView.xaml new file mode 100644 index 0000000..d0ef623 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/MyAvatarView.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + diff --git a/ch03_DataBinding/ex_CustomContentView/MyAvatarView.xaml.cs b/ch03_DataBinding/ex_CustomContentView/MyAvatarView.xaml.cs new file mode 100644 index 0000000..82f79d5 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/MyAvatarView.xaml.cs @@ -0,0 +1,45 @@ +namespace ex_CustomContentView; + +public partial class MyAvatarView : ContentView +{ + public MyAvatarView() + { + InitializeComponent(); + } + + public static readonly BindableProperty ImageNameProperty = + BindableProperty.Create("ImageName", typeof(string), typeof(MyAvatarView), ""); + + public string ImageName + { + get => (string)GetValue(ImageNameProperty); + set => SetValue(ImageNameProperty, value); + } + + public static readonly BindableProperty TitleProperty = + BindableProperty.Create("Title", typeof(string), typeof(MyAvatarView), "No Title"); + + public string Title + { + get => (string)GetValue(TitleProperty); + set => SetValue(TitleProperty, value); + } + + public static readonly BindableProperty SubTitleProperty = + BindableProperty.Create("SubTitle", typeof(string), typeof(MyAvatarView), "Lorem Ipsum Dolor"); + + public string SubTitle + { + get => (string)GetValue(SubTitleProperty); + set => SetValue(SubTitleProperty, value); + } + + public static readonly BindableProperty ColorProperty = + BindableProperty.Create("Color", typeof(Color), typeof(MyAvatarView), Colors.Gray); + + public Color Color + { + get => (Color)GetValue(ColorProperty); + set => SetValue(ColorProperty, value); + } +} \ No newline at end of file diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/Android/AndroidManifest.xml b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..bdec9b5 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/Android/MainActivity.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/MainActivity.cs new file mode 100644 index 0000000..f17d0bc --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/MainActivity.cs @@ -0,0 +1,10 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace ex_CustomContentView; + +[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/ch03_DataBinding/ex_CustomContentView/Platforms/Android/MainApplication.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/MainApplication.cs new file mode 100644 index 0000000..196d540 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/MainApplication.cs @@ -0,0 +1,15 @@ +using Android.App; +using Android.Runtime; + +namespace ex_CustomContentView; + +[Application] +public class MainApplication : MauiApplication +{ + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/Android/Resources/values/colors.xml b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 0000000..5cd1604 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/AppDelegate.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 0000000..e975435 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,9 @@ +using Foundation; + +namespace ex_CustomContentView; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Entitlements.plist b/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Entitlements.plist new file mode 100644 index 0000000..8e87c0c --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,14 @@ + + + + + + + com.apple.security.app-sandbox + + + com.apple.security.network.client + + + + diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Info.plist b/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Info.plist new file mode 100644 index 0000000..f24aacc --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/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/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Program.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Program.cs new file mode 100644 index 0000000..7d2407d --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,15 @@ +using ObjCRuntime; +using UIKit; + +namespace ex_CustomContentView; + +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/ch03_DataBinding/ex_CustomContentView/Platforms/Tizen/Main.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/Tizen/Main.cs new file mode 100644 index 0000000..61a634a --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Tizen/Main.cs @@ -0,0 +1,16 @@ +using System; +using Microsoft.Maui; +using Microsoft.Maui.Hosting; + +namespace ex_CustomContentView; + +class Program : MauiApplication +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + + static void Main(string[] args) + { + var app = new Program(); + app.Run(args); + } +} diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/Tizen/tizen-manifest.xml b/ch03_DataBinding/ex_CustomContentView/Platforms/Tizen/tizen-manifest.xml new file mode 100644 index 0000000..6b29533 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/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/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/App.xaml b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/App.xaml new file mode 100644 index 0000000..c071233 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/App.xaml.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/App.xaml.cs new file mode 100644 index 0000000..5b0cddd --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/App.xaml.cs @@ -0,0 +1,24 @@ +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 ex_CustomContentView.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/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/Package.appxmanifest b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/Package.appxmanifest new file mode 100644 index 0000000..beb8e93 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,46 @@ + + + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/app.manifest b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/app.manifest new file mode 100644 index 0000000..28a9c6c --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/AppDelegate.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/AppDelegate.cs new file mode 100644 index 0000000..e975435 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,9 @@ +using Foundation; + +namespace ex_CustomContentView; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/Info.plist b/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/Info.plist new file mode 100644 index 0000000..358337b --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/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/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/Program.cs b/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/Program.cs new file mode 100644 index 0000000..7d2407d --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Platforms/iOS/Program.cs @@ -0,0 +1,15 @@ +using ObjCRuntime; +using UIKit; + +namespace ex_CustomContentView; + +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/ch03_DataBinding/ex_CustomContentView/Properties/launchSettings.json b/ch03_DataBinding/ex_CustomContentView/Properties/launchSettings.json new file mode 100644 index 0000000..c16206a --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/AppIcon/appicon.svg b/ch03_DataBinding/ex_CustomContentView/Resources/AppIcon/appicon.svg new file mode 100644 index 0000000..5f04fcf --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Resources/AppIcon/appicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/AppIcon/appiconfg.svg b/ch03_DataBinding/ex_CustomContentView/Resources/AppIcon/appiconfg.svg new file mode 100644 index 0000000..62d66d7 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Fonts/OpenSans-Regular.ttf b/ch03_DataBinding/ex_CustomContentView/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..2d1edf0 Binary files /dev/null and b/ch03_DataBinding/ex_CustomContentView/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Fonts/OpenSans-Semibold.ttf b/ch03_DataBinding/ex_CustomContentView/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 0000000..fe13d06 Binary files /dev/null and b/ch03_DataBinding/ex_CustomContentView/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Images/joussein.png b/ch03_DataBinding/ex_CustomContentView/Resources/Images/joussein.png new file mode 100644 index 0000000..2157359 Binary files /dev/null and b/ch03_DataBinding/ex_CustomContentView/Resources/Images/joussein.png differ diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Images/lafuente.png b/ch03_DataBinding/ex_CustomContentView/Resources/Images/lafuente.png new file mode 100644 index 0000000..2e7c70f Binary files /dev/null and b/ch03_DataBinding/ex_CustomContentView/Resources/Images/lafuente.png differ diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Images/nout_live_album.png b/ch03_DataBinding/ex_CustomContentView/Resources/Images/nout_live_album.png new file mode 100644 index 0000000..e85df0c Binary files /dev/null and b/ch03_DataBinding/ex_CustomContentView/Resources/Images/nout_live_album.png differ diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Images/rinaudo.png b/ch03_DataBinding/ex_CustomContentView/Resources/Images/rinaudo.png new file mode 100644 index 0000000..7e3ea74 Binary files /dev/null and b/ch03_DataBinding/ex_CustomContentView/Resources/Images/rinaudo.png differ diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Raw/AboutAssets.txt b/ch03_DataBinding/ex_CustomContentView/Resources/Raw/AboutAssets.txt new file mode 100644 index 0000000..50b8a7b --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/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/ch03_DataBinding/ex_CustomContentView/Resources/Splash/splash.svg b/ch03_DataBinding/ex_CustomContentView/Resources/Splash/splash.svg new file mode 100644 index 0000000..62d66d7 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ch03_DataBinding/ex_CustomContentView/Resources/Styles/Colors.xaml b/ch03_DataBinding/ex_CustomContentView/Resources/Styles/Colors.xaml new file mode 100644 index 0000000..22f0a67 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/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/ch03_DataBinding/ex_CustomContentView/Resources/Styles/Styles.xaml b/ch03_DataBinding/ex_CustomContentView/Resources/Styles/Styles.xaml new file mode 100644 index 0000000..5bc20f1 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/Resources/Styles/Styles.xaml @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ch03_DataBinding/ex_CustomContentView/ex_CustomContentView.csproj b/ch03_DataBinding/ex_CustomContentView/ex_CustomContentView.csproj new file mode 100644 index 0000000..dd0b670 --- /dev/null +++ b/ch03_DataBinding/ex_CustomContentView/ex_CustomContentView.csproj @@ -0,0 +1,65 @@ + + + + net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 + + + + + + + Exe + ex_CustomContentView + true + true + enable + enable + + + ex_CustomContentView + + + com.companyname.ex_customcontentview + + + 1.0 + 1 + + 11.0 + 13.1 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + +