Information Technology
.NET MAUI Interview Questions & Answers
Microsoft framework for building cross-platform mobile and desktop apps using C#.
Advanced & Enterprise
All 8 questionsBlazor Hybrid hosts Blazor (Razor) components in a BlazorWebView inside a native MAUI app, running .NET locally (not on a server) with full native API access. Use it to reuse web U…
- What does the .NET MAUI Community Toolkit provide? Intermediate
The MAUI Community Toolkit is a package of behaviors, converters, animations, views (e.g., popups, MediaElement, DrawingView, Expander), and helpers that fill gaps in the core fram…
Use .resx resource files (AppResources.resx plus AppResources. .resx), access strings via the generated resource class, and set Thread.CurrentThread.CurrentUICulture. Bind UI text…
Define colors and styles in ResourceDictionaries (App.xaml), use AppThemeBinding to switch values by system theme, and read/set Application.Current.UserAppTheme to override. Centra…
Separate concerns into projects: the MAUI head (UI, pages, view models), a shared domain/core library (models, services, interfaces), infrastructure (data, API clients), and a test…
Advanced Data Binding & Collections
All 6 questionsObservableCollection implements INotifyCollectionChanged, so adding/removing items automatically updates a bound CollectionView without rebinding. Use it for dynamic lists. Note th…
Use dot paths like {Binding Order.Customer.Name}. If intermediate values can be null, bindings resolve to empty rather than throwing, but you can supply FallbackValue and TargetNul…
RelativeSource binds to something other than BindingContext—Self (the element), an ancestor of a given type, or the templated parent. It's essential inside DataTemplates to reach t…
Expose validation state on the view model (per-field error properties or INotifyDataErrorInfo), bind UI to show errors (DataTrigger or an error label), and disable submit via a com…
ObservableCollection raises a change event per item, which is costly for bulk updates. For large refreshes, replace the collection reference (and notify), use a batching/optimized…
App Lifecycle & Windows
All 6 questionsOnAppearing runs when a page becomes visible (good for loading/refreshing data and subscribing to events) and OnDisappearing when it's navigated away (good for saving state and uns…
- How do the App and Window lifecycle events relate? Intermediate
The Application creates Windows; each Window raises Created, Activated, Deactivated, Stopped, Resumed, and Destroying. App-level state changes map to the active window's events. Us…
- How do you open and manage multiple windows in MAUI? Intermediate
On desktop (and iPad multi-window), call Application.Current.OpenWindow(new Window(new SomePage())) to open additional windows, and CloseWindow to close them. Application.Windows l…
Save lightweight state to Preferences/SecureStorage (or a file/db) in OnDisappearing or the window Stopped event, and restore it in OnAppearing/Resumed or at startup. For navigatio…
Use ConfigureLifecycleEvents in MauiProgram to hook native events (e.g., Android OnCreate/OnResume, iOS WillEnterForeground) with strongly-typed delegates. This lets you integrate…
Best Practices & Architecture
All 7 questionsUse MVVM with compiled bindings, keep logic in testable view models/services, use DI instead of service location, centralize styles/resources, prefer CollectionView and shallow tem…
- How should you organize code in a MAUI project? Intermediate
Use feature folders (or layered folders: Views, ViewModels, Services, Models) and consider separate class libraries for domain/core and infrastructure so logic is reusable and test…
Wrap Shell navigation behind an INavigationService interface (GoToAsync-style methods) registered in DI, so view models depend on the abstraction rather than static Shell.Current.…
Catch exceptions at boundaries (service calls, commands), log them via a logging/telemetry abstraction, and surface a friendly message through a shared dialog/toast service. Avoid…
Depend on interfaces (services, navigation, dialogs, device features) injected via DI; keep view models free of platform and UI types; use the MVVM Toolkit for commands/observables…
Concurrency & Threading
All 5 questionsEach platform has a single main/UI thread that owns the visual tree; touching UI from another thread causes exceptions or corruption. Async I/O runs off the UI thread, but results…
Offload CPU-bound work with Task.Run so it executes on a thread-pool thread, await the result, then update UI on the main thread. Don't use Task.Run for I/O (await the async API di…
- What are common async/await pitfalls in MAUI? Intermediate
Avoid async void except for event handlers (it swallows exceptions); don't block with .Result/.Wait() (deadlocks/UI freeze); use ConfigureAwait appropriately in library code; and h…
Pass a CancellationToken through async calls and trigger it with a CancellationTokenSource when the user navigates away or cancels. Check the token in loops and pass it to cancella…
Marshal collection mutations to the UI thread, since CollectionView observes changes on the UI thread. Compute/fetch data in the background, then add items via MainThread.BeginInvo…
Controls & Views
All 7 questionsLabel displays read-only text. Entry is a single-line editable text box (with keyboard, placeholder, IsPassword options). Editor is a multi-line editable text area that grows or sc…
Use CollectionView, MAUI's performant, virtualized list control. Bind ItemsSource to a collection and define an ItemTemplate with a DataTemplate. CollectionView supports linear and…
- How do CollectionView and ListView differ? Intermediate
CollectionView is newer, faster, and more flexible: it has no built-in cell types, uses flexible DataTemplates, supports horizontal/grid layouts and multiple selection, and virtual…
Set SelectionMode to Single or Multiple, then bind SelectedItem (or SelectedItems) and handle SelectionChanged, or bind SelectionChangedCommand. In MVVM you typically bind Selected…
A DataTemplateSelector chooses a DataTemplate at runtime based on the bound item. Override OnSelectTemplate to return different templates for different data types or states. It's u…
Data Binding & MVVM
All 7 questions- What is data binding in MAUI? Beginner
Data binding connects a target property on a UI element to a source property on another object (usually a view model), so changes propagate automatically. You set BindingContext an…
MVVM (Model-View-ViewModel) separates the UI (View) from presentation logic (ViewModel) and data (Model). The View binds to the ViewModel, which exposes properties and commands. It…
INotifyPropertyChanged defines the PropertyChanged event that a binding source raises when a property value changes, telling the UI to refresh. Without it, one-way and two-way bind…
CommunityToolkit.Mvvm provides source generators. [ObservableProperty] on a partial field generates a full property with change notification; [RelayCommand] on a method generates a…
- What is ICommand and how do commands work in MVVM? Intermediate
ICommand exposes Execute, CanExecute, and CanExecuteChanged. Controls like Button bind their Command property to a view-model command, keeping logic out of code-behind. CanExecute…
Dependency Injection & Services
All 7 questionsMAUI uses Microsoft.Extensions.DependencyInjection through the Generic Host. Register services on builder.Services in MauiProgram.CreateMauiApp, then constructor-inject them into p…
Singleton creates one instance for the app's lifetime—good for shared state, HTTP clients, and caches. Transient creates a new instance per resolution—good for view models and ligh…
- How do you inject a view model into a page? Intermediate
Register both the page and the view model in DI, then take the view model as a constructor parameter of the page and assign it to BindingContext. Because the page is resolved from…
Service location (e.g., calling a static Resolve or Handler.MauiContext.Services.GetService) hides dependencies and hurts testability. Prefer constructor injection so a class's nee…
Call builder.Services.AddHttpClient to register typed or named clients backed by IHttpClientFactory, which manages handler pooling and lifetime. Inject the typed client into servic…
Desktop - WinUI & Mac Catalyst
All 6 questionsMAUI runs on Windows via WinUI 3 (Windows App SDK) and on macOS via Mac Catalyst (running the iOS UIKit stack on the Mac). One codebase produces desktop apps alongside mobile, thou…
- How do you adapt UI for desktop vs mobile in MAUI? Intermediate
Use DeviceInfo.Idiom/OnIdiom to branch layout, provide larger hit targets and multi-column layouts on desktop, add menus (MenuBarItems) and keyboard accelerators, and handle window…
Add KeyboardAccelerators to menu items or use platform key handling, and use PointerGestureRecognizer for hover/enter/exit/pointer-moved events to build hover states and tooltips.…
Guard code with #if WINDOWS and use the Windows App SDK/WinRT APIs, reaching the native control via Handler.PlatformView (a WinUI element). You can also add Windows-specific packag…
Handle window sizing/min-size and persistence, multi-window scenarios, menus and shortcuts, file dialogs (via FilePicker/FolderPicker), high-DPI scaling, and different app lifecycl…
Device Features & Essentials
All 7 questionsUse Geolocation.Default.GetLocationAsync (last-known or a fresh request with GeolocationRequest specifying accuracy and timeout). Request location permission first. GetLastKnownLoc…
Use MediaPicker.Default.PickPhotoAsync to choose from the gallery or CapturePhotoAsync to use the camera (camera requires permission and hardware). Both return a FileResult you can…
Use the launcher/communication APIs: Browser.Default.OpenAsync for URLs, PhoneDialer.Default.Open for phone numbers, Email.Default.ComposeAsync for email, and Sms/Map for others. T…
Use the sensor APIs (Accelerometer, Gyroscope, Compass, Barometer). Subscribe to ReadingChanged and call Start with a SensorSpeed, then Stop when done to save battery. Marshal UI u…
Use DeviceInfo (model, manufacturer, platform, version, idiom, DeviceType—physical vs virtual) and DeviceDisplay (screen metrics, density, orientation, keep-screen-on). These help…
Fonts, Icons & Media
All 6 questionsPlace the .ttf/.otf in Resources/Fonts (MauiFont build action), register it with an alias in ConfigureFonts, then reference the alias via FontFamily. This works consistently across…
Register the icon font (e.g., FontAwesome/Material Icons), then set a Label or button ImageSource to a FontImageSource specifying the glyph unicode and FontFamily. This gives crisp…
- How do you display and control video/audio in MAUI? Intermediate
Use the MAUI Community Toolkit's MediaElement, which wraps native players. Bind Source (URL or file), and control playback with Play/Pause/Stop and events for state and position. F…
Provide a single high-resolution source (SVG preferred) declared as MauiImage; MAUI generates density-appropriate rasters at build time. For platform-specific art, you can still su…
- How do you tint or recolor images and icons in MAUI? Intermediate
Use FontImageSource Color for icon fonts, or apply an IconTintColorBehavior (MAUI Community Toolkit) to Image controls to tint bitmaps at runtime. SVG-based MauiImage can be recolo…
Forms, Input & Validation
All 6 questionsCompose Entry, Editor, Picker, DatePicker, TimePicker, Switch, and Stepper controls in a layout, bind each to view-model properties (two-way), and bind a submit Button to a command…
Bind Picker.ItemsSource to a collection and SelectedItem (or SelectedIndex) to a view-model property; set ItemDisplayBinding to show a property of complex items. Picker presents a…
Bind TextChanged or use the view model's property setter to re-evaluate validation, expose an error message property, and show it with a bound label or DataTrigger. The CommunityTo…
Behaviors attach reusable logic to a control without subclassing. Derive from Behavior , override OnAttachedTo/OnDetachingFrom, and add event handlers or bindable properties. They'…
Implement INotifyDataErrorInfo on the view model to expose per-property errors and raise ErrorsChanged. It supports async and cross-field validation and integrates with binding so…
Fundamentals & Architecture
All 7 questions- What is .NET MAUI? Beginner
.NET Multi-platform App UI (.NET MAUI) is Microsoft's cross-platform framework for building native mobile and desktop apps from a single C# and XAML codebase. It targets Android, i…
MAUI is the successor to Xamarin.Forms. Key differences: MAUI uses a single project with multi-targeting instead of one project per platform; it uses a new handler-based architectu…
MAUI uses one .csproj that multi-targets several platforms. Platform-specific code, resources, and entry points live under a Platforms/ folder, while shared code, images, fonts, an…
- What is the handler architecture in MAUI? Intermediate
Handlers map a cross-platform virtual control (e.g., Button) to its native counterpart (Android AppCompatButton, iOS UIButton, WinUI Button). Each handler exposes a property mapper…
- Why did MAUI replace renderers with handlers? Intermediate
Renderers in Xamarin.Forms were tightly coupled to the control hierarchy and carried significant overhead because each control inherited a full renderer. Handlers are loosely coupl…
Gestures & Animations
All 6 questionsAdd a TapGestureRecognizer to a view's GestureRecognizers and bind its Command (or handle Tapped). This lets non-button elements like images or labels respond to taps, and NumberOf…
MAUI includes TapGestureRecognizer, PanGestureRecognizer (drag), PinchGestureRecognizer (zoom), SwipeGestureRecognizer (directional swipes), and DragGestureRecognizer/DropGestureRe…
- How do you implement pinch-to-zoom or pan in MAUI? Intermediate
Attach a PinchGestureRecognizer and update Scale from e.Scale around the pinch origin, or a PanGestureRecognizer and update TranslationX/Y from e.TotalX/Y. Track the starting trans…
- How do you run basic animations in MAUI? Intermediate
Use the ViewExtensions async animation methods—FadeTo, TranslateTo, ScaleTo, RotateTo, ColorTo—which return Tasks you can await or combine with Task.WhenAll. Specify duration and a…
Use the low-level Animation class to define a callback that receives a 0..1 value and applies it to any property, add child animations at offsets for choreography, then call Commit…
Graphics & Drawing
All 6 questionsGraphicsView is a canvas for 2D drawing via an IDrawable. You implement Draw(ICanvas canvas, RectF dirtyRect) to render shapes, paths, text, and images with platform-consistent out…
- How do you trigger a redraw of a GraphicsView? Intermediate
Call Invalidate() on the GraphicsView to request that Draw runs again. Do this whenever the data your drawable depends on changes. For animation, invalidate on a timer or from an a…
- How do you draw text and images on an ICanvas? Intermediate
Use canvas.DrawString with a rectangle plus horizontal/vertical alignment for text, setting FontColor, FontSize, and Font first. Use canvas.DrawImage with an IImage (loaded via Pla…
Shapes (Rectangle, Ellipse, Line, Path, Polygon, Polyline) are declarative XAML elements in the visual tree with Fill, Stroke, and geometry properties, so they participate in layou…
Attach gesture recognizers (PanGestureRecognizer, TapGestureRecognizer) or handle pointer events, translate the touch points into your drawable's coordinate space, update model sta…
Local Storage & Data
All 7 questionsPreferences stores small key-value primitives (strings, numbers, booleans, dates) in platform-native settings storage. Use it for lightweight, non-sensitive app state like the last…
SecureStorage saves key-value string data encrypted using platform keystores (Android Keystore, iOS Keychain). Use it for sensitive values—auth tokens, refresh tokens, API keys tie…
Add the sqlite-net-pcl (or Microsoft.Data.Sqlite) package, create a database file path under FileSystem.AppDataDirectory, define models with attributes, and use an SQLiteAsyncConne…
Use System.IO with paths from FileSystem.AppDataDirectory (private, persistent) or CacheDirectory (disposable). For files bundled with the app, use FileSystem.OpenAppPackageFileAsy…
- How do you use EF Core with SQLite in a MAUI app? Intermediate
Add Microsoft.EntityFrameworkCore.Sqlite, define a DbContext pointing at a file in AppDataDirectory, and call Database.EnsureCreated or run migrations at startup. EF Core gives LIN…
Maps & Location
All 5 questions- How do you show a map in a MAUI app? Beginner
Add the Microsoft.Maui.Controls.Maps package, initialize it with UseMauiMaps() in MauiProgram, and place a Map control. It uses the native map on each platform (Apple Maps, Google…
Add Pin objects to Map.Pins with a Location, Label, and Address, and call MoveToRegion with a MapSpan centered on a location and radius. You can handle pin taps via the InfoWindowC…
Apple Maps needs no key but requires location usage strings in Info.plist; Google Maps on Android requires a Maps SDK API key in the manifest and location permissions. Declare thes…
Combine Geolocation.Default.GetLocationAsync in a loop or platform continuous-location updates (via a listener) with map recentering. Update a pin/position on the main thread, thro…
Use Geocoding.Default.GetLocationsAsync to turn an address into coordinates and GetPlacemarksAsync for reverse geocoding (coordinates to address). Results are platform-provided and…
Migration from Xamarin.Forms
All 6 questionsCreate a new MAUI project (or use the .NET Upgrade Assistant), move shared code and XAML in, consolidate the platform head projects into the single project's Platforms folders, upd…
Xamarin.Forms types move to Microsoft.Maui and Microsoft.Maui.Controls. Xamarin.Essentials merges into Microsoft.Maui.* namespaces. Update using directives and XAML namespace decla…
Identify what the renderer customized, then move that logic to a handler mapper (AppendToMapping/ModifyMapping) or a custom handler if you added a new control. Most simple renderer…
Watch for: removed/renamed layout options (StackLayout defaults, some AbsoluteLayout behavior), FormsApplicationDelegate/Activity base classes becoming Maui* equivalents, Dependenc…
Register the interface/implementation in MauiProgram's Services and inject via constructors instead of calling DependencyService.Get (). This is testable and explicit. For gradual…
Native Interop & Libraries
All 7 questionsAdd it like any .NET package (dotnet add package or the IDE), ensuring the package supports the MAUI target frameworks. Cross-platform packages 'just work'; platform-specific ones…
Use a .NET for Android binding library that projects the Java/Kotlin AAR or JAR into C# through a bindings project, then reference it from Platforms/Android code. Microsoft provide…
Use a .NET for iOS binding library with ApiDefinition and Structs files describing the native framework, then reference it from Platforms/iOS. Objective-C binds directly; Swift usu…
Check that it targets current MAUI TFMs, is actively maintained, supports all your platforms, is trim/AOT-safe, has a compatible license, and does not bloat the app. Prefer well-kn…
Put shared models, DTOs, validation, and business logic in a plain .NET class library referenced by both the MAUI app and the server. Keep platform and UI concerns out of it. This…
Networking & APIs
All 7 questions- How do you call a REST API in MAUI? Beginner
Use HttpClient (ideally via IHttpClientFactory) to send async requests, and System.Text.Json to deserialize responses. Always await calls off the UI thread and handle non-success s…
Query Connectivity.Current.NetworkAccess (Internet, Local, None) and optionally ConnectionProfiles (WiFi, Cellular). Subscribe to ConnectivityChanged to react to changes. Use it to…
Use System.Text.Json with source-generated serialization (JsonSerializerContext) to avoid reflection, which improves performance and trims better for AOT. Configure options (camelC…
Wrap HttpClient with Polly via IHttpClientFactory's AddPolicyHandler to add retry with backoff, circuit breakers, and timeouts. This handles transient failures common on mobile net…
Await async HttpClient calls—they run I/O off the UI thread already. When you must marshal a result back to the UI from a non-UI context, use MainThread.BeginInvokeOnMainThread. Bi…
Performance & Optimization
All 7 questionsUse CollectionView (virtualized) over ListView; keep item templates shallow; enable compiled bindings with x:DataType; avoid nested layouts inside cells; and size images appropriat…
- How do you reduce MAUI app startup time? Intermediate
Defer non-critical work out of MauiProgram and page constructors; lazy-load services; minimize the initial visual tree; use AOT/startup tracing where available; reduce reflection (…
Ahead-of-time compilation converts IL to native code at build time, improving startup and steady-state performance and enabling smaller, trim-friendly binaries. iOS always uses AOT…
Trimming removes unused IL to shrink the app, but reflection-based code can be trimmed away, causing runtime failures. Use trim-safe patterns (source generators, DynamicDependency…
- How do you diagnose and fix memory leaks in MAUI? Intermediate
Common causes are strong event subscriptions, static references to pages/view models, and un-disposed handlers. Use the platform profilers (Xcode Instruments, Android Studio Memory…
Platform Integration & Handlers
All 7 questionsUse conditional compilation with platform symbols (ANDROID, IOS, MACCATALYST, WINDOWS) inside shared code, or split logic into files under Platforms/ that compile only for their ta…
The former Xamarin.Essentials APIs are built into MAUI (Microsoft.Maui.Devices, .Storage, .Media, etc.). They give cross-platform access to device features—Geolocation, Connectivit…
Use PropertyMapper customization scoped by checking the view instance, or subclass the handler for that control and register it. AppendToMapping adds behavior after the default; Mo…
- How do you access a native view from a MAUI control? Intermediate
Through the control's Handler.PlatformView, cast to the native type for the current platform (guarded by #if). This lets you call native APIs the cross-platform surface doesn't exp…
- How do you request runtime permissions in MAUI? Intermediate
Use the Permissions API: check the status with CheckStatusAsync and request with RequestAsync for a permission type (e.g., LocationWhenInUse, Camera). Declare the permission in eac…
Project Structure & App Startup
All 5 questionsThe Platforms folder holds platform-specific entry points and code: Android (MainActivity, MainApplication), iOS/MacCatalyst (AppDelegate, Program), and Windows (App.xaml). MAUI co…
Shared assets live in the Resources folder: Resources/Images, Resources/Fonts, Resources/AppIcon, and Resources/Splash. They are declared in the .csproj as MauiImage, MauiFont, Mau…
- How does multi-targeting work in the MAUI .csproj? Intermediate
The property lists monikers like net8.0-android and net8.0-ios. MSBuild builds the project once per moniker. You can use MSBuild conditions and the Platforms folder filename conven…
On Android, MainApplication overrides CreateMauiApp() to return MauiProgram.CreateMauiApp(), and MainActivity (a MauiAppCompatActivity) hosts it. On iOS/Mac Catalyst, AppDelegate (…
Define the interface in shared code, implement it per platform using partial classes or the Platforms folder, and register it in DI. A common pattern is a partial class with a shar…
Publishing & Deployment
All 7 questionsBuild with the Release configuration for the target framework, which enables optimizations, trimming, and (on iOS) AOT. Use dotnet publish -f -c Release to produce the platform art…
An APK is a directly installable package. An Android App Bundle (AAB) is a publishing format uploaded to Google Play, which generates optimized per-device APKs (split by density, A…
- How do you sign a MAUI Android app for release? Intermediate
Create a keystore, then reference it via MSBuild properties (AndroidKeyStore, AndroidSigningKeyStore, alias, and passwords) or use Play App Signing. Keep the keystore and passwords…
You need an Apple Developer account, a distribution certificate, an App ID, and a provisioning profile. Build an IPA with the distribution signing identity, then upload via Transpo…
- How do you manage app versioning across platforms? Intermediate
Set ApplicationDisplayVersion (the user-facing version like 1.2.0) and ApplicationVersion (the build/number that must increment each store upload) in the csproj. Automate the build…
Security & Authentication
All 6 questionsUse SecureStorage, which encrypts values with the platform keystore/keychain, for tokens and secrets. Never keep them in Preferences (plain) or in source. Clear tokens on logout wi…
Use WebAuthenticator.Default.AuthenticateAsync to launch a secure system browser for the provider's authorize URL and capture the redirect callback, then exchange the code for toke…
There is no built-in MAUI API, so use a plugin (e.g., Plugin.Fingerprint) or implement per platform behind an interface using BiometricPrompt (Android) and LAContext/LocalAuthentic…
- How do you enforce SSL/certificate pinning in MAUI? Intermediate
Validate the server certificate in the HttpClient handler by comparing its public key/thumbprint to a pinned value, rejecting mismatches. Configure via HttpClientHandler.ServerCert…
Store secrets in SecureStorage, never in code or Preferences; use HTTPS everywhere (optionally pinning); enable trimming/obfuscation to raise the bar on reverse engineering; valida…
Styling, Resources & Themes
All 6 questionsA ResourceDictionary stores reusable resources (colors, styles, templates, converters) keyed by x:Key. Define it at app, page, or control scope; reference resources with StaticReso…
An explicit Style has an x:Key and is applied where referenced via Style="{StaticResource ...}". An implicit Style has no key, only a TargetType, and applies automatically to all c…
Split resources into separate XAML dictionaries (Colors.xaml, Styles.xaml) and combine them via MergedDictionaries in App.xaml. This keeps theming modular and lets you swap a dicti…
BasedOn lets a Style inherit setters from another keyed Style, overriding or adding a few. It reduces duplication when you have variants of a base look (e.g., a base button plus pr…
VisualStateManager (VSM) defines named visual states (Normal, Focused, Disabled, PointerOver, or custom) with setters applied when the state is active. Controls change state automa…
Testing & Debugging
All 6 questionsPut testable logic in view models and services (plain .NET classes), then test them with xUnit/NUnit/MSTest in a separate class-library targeting a plain TFM (e.g., net8.0). Becaus…
Abstract device features behind interfaces (e.g., IGeolocation, IConnectivity—MAUI already provides interfaces for many Essentials APIs) and inject them. In tests supply fakes/mock…
- How do you debug platform-specific issues in MAUI? Intermediate
Select the target platform head in the debugger, use conditional breakpoints and the platform's native logs (logcat for Android, Console/Instruments for iOS). Reproduce on the spec…
XAML Hot Reload applies markup changes to a running app without rebuilding; .NET Hot Reload applies many C# edits live. They speed up UI iteration greatly. Limitations: some struct…
Use Appium (cross-platform UI automation) or platform tools to drive the running app, asserting on visible elements via automation IDs. Set AutomationId on controls for stable sele…
Troubleshooting & Common Errors
All 7 questionsUsually the BindingContext is null/wrong, the path has a typo, or the source doesn't raise PropertyChanged. Enable binding diagnostics/debug output, add x:DataType for compile-time…
Release enables trimming/AOT, which can strip types used via reflection (JSON models, DI by reflection, XAML resolved dynamically). Fix by using source generators, [DynamicDependen…
Increase the Java max heap for the Android build (JavaMaximumHeapSize), enable D8/R8 and resource shrinking, disable multidex issues, and ensure you're not bundling excessive asset…
The bound collection must be an ObservableCollection (or raise CollectionChanged), and items must raise PropertyChanged for their own field updates. Reassigning a plain List won't…
The custom handler isn't registered, or CreatePlatformView returns nothing for a platform. Register handlers in MauiProgram via ConfigureMauiHandlers(h => h.AddHandler(typeof(MyCon…
XAML & Markup Extensions
All 6 questions- What are markup extensions in XAML? Beginner
Markup extensions provide values to XAML attributes at parse time using {} syntax, e.g., {Binding}, {StaticResource}, {DynamicResource}, {x:Static}, {OnPlatform}, {OnIdiom}. They l…
- What do OnPlatform and OnIdiom do? Beginner
OnPlatform supplies different values per platform (iOS/Android/WinUI/MacCatalyst); OnIdiom supplies values per device type (Phone/Tablet/Desktop/TV/Watch). They're used inline in X…
- What is x:Static and when do you use it? Intermediate
x:Static references a static field, property, constant, or enum member from XAML, e.g., a color in a static class or an app constant. It's handy for sharing constants between C# an…
- How do you create a custom markup extension? Intermediate
Implement IMarkupExtension (or IMarkupExtension ) with a ProvideValue method returning the computed value, expose properties as inputs, and use it in XAML with {local:MyExtension .…
StaticResource resolves the resource once at load time—efficient but won't reflect later changes. DynamicResource keeps a live link, updating the target if the resource is replaced…
XAML & UI Layouts
All 7 questionsXAML (eXtensible Application Markup Language) is a declarative XML-based language for defining UI. In MAUI each page or view typically has a .xaml file for layout and a .xaml.cs co…
VerticalStackLayout and HorizontalStackLayout are optimized single-orientation layouts introduced in MAUI; they are faster because they don't measure both orientations. StackLayout…
- How does the Grid layout work in MAUI? Intermediate
Grid arranges children in rows and columns defined by RowDefinitions and ColumnDefinitions. Sizes can be Auto (fit content), * (proportional star sizing), or absolute. Children are…
FlexLayout implements CSS flexbox semantics and is ideal when children should wrap, grow, shrink, or align along an axis without fixed rows/columns. Use it for tag clouds, toolbars…
- What is the difference between Margin and Padding? Intermediate
Padding is space inside an element between its border and its content; it is a property of layouts and some views. Margin is space outside an element between it and its neighbors;…