Xamarin Certified Mobile Developer — Questions and Answers
Question 1: In Xamarin.iOS, what is used to bind third-party Objective-C libraries for use in C# code?
- Binding Projects (Correct answer)
- P/Invoke
- DllImport
- NuGet Packages
Correct answer: Binding Projects
Xamarin.iOS Binding Projects wrap Objective-C libraries with C# API definitions using [BaseType] and [Export] attributes.
Question 2: Which image loading library is commonly used with Xamarin.Forms to provide asynchronous image loading and caching from URLs?
- SkiaSharp
- FFImageLoading (Fast & Furious Image Loading) (Correct answer)
- Coil.NET
- ImageSharp
Correct answer: FFImageLoading (Fast & Furious Image Loading)
FFImageLoading (now Maui.CommunityToolkit.ImageLoading) provides asynchronous image loading, disk and memory caching, and transformations, preventing UI thread blocking from image I/O.
Question 3: What is the performance impact of using compiled bindings (x:DataType) in Xamarin.Forms MVVM?
- They prevent data from updating at runtime
- They only work with ListView and not other controls
- They require all properties to be static
- They resolve binding paths at compile time, eliminating reflection overhead and improving binding speed (Correct answer)
Correct answer: They resolve binding paths at compile time, eliminating reflection overhead and improving binding speed
Compiled bindings use x:DataType to generate strongly-typed binding code at compile time, replacing runtime reflection with direct property access and significantly improving data binding performance.
Question 4: Which binding mode in Xamarin.Forms updates the source when the target property changes?
- OneTime
- OneWay
- TwoWay
- OneWayToSource (Correct answer)
Correct answer: OneWayToSource
OneWayToSource binding updates the source (ViewModel) when the target (UI) property changes.
Question 5: Which interface must a ViewModel implement to notify the UI of property changes in Xamarin.Forms?
- INotifyPropertyChanged (Correct answer)
- IValueConverter
- INotifyCollectionChanged
- IDisposable
Correct answer: INotifyPropertyChanged
INotifyPropertyChanged requires implementing the PropertyChanged event, which the binding engine subscribes to for UI updates.
Question 6: Which Xamarin.Forms layout arranges children in a single row or column?
- StackLayout (Correct answer)
- RelativeLayout
- AbsoluteLayout
- FlexLayout
Correct answer: StackLayout
StackLayout arranges child views in a single horizontal or vertical line.
Question 7: Which cloud service provides device farms for running Xamarin.UITest on real physical devices?
- AWS Device Farm only
- Firebase Test Lab
- App Center Test (formerly Test Cloud) (Correct answer)
- BrowserStack only
Correct answer: App Center Test (formerly Test Cloud)
App Center Test (formerly Xamarin Test Cloud) runs Xamarin.UITest suites across hundreds of real iOS and Android devices in the cloud.
Question 8: What should you do to avoid excessive layout invalidation cycles in Xamarin.Forms when updating ViewModel properties?
- Bind every property to its own dedicated Label
- Use TwoWay binding for all properties to trigger fewer updates
- Call InvalidateMeasure() after every property change
- Batch property updates using a transaction or update multiple properties before raising PropertyChanged (Correct answer)
Correct answer: Batch property updates using a transaction or update multiple properties before raising PropertyChanged
Batching property updates and raising PropertyChanged once at the end reduces the number of measure-arrange cycles the layout engine must perform, improving rendering throughput.
Question 9: What attribute is used to register a Xamarin.iOS class with the Objective-C runtime?
- [Register] (Correct answer)
- [Bind]
- [ObjCClass]
- [Export]
Correct answer: [Register]
The [Register] attribute maps a C# class to its Objective-C counterpart in the runtime.
Question 10: Does Xamarin provide binding projects that let you bind native Objective-C libraries using a declarative syntax?
- No
- Yes (Correct answer)
Correct answer: Yes
Xamarin offers binding projects that allow you to bind native Objective-C libraries to be used in Xamarin applications. The process of binding involves creating a C# wrapper around the native Objective-C library, enabling you to access and utilize the functionality provided by the native library in your Xamarin app. <br> Xamarin provides a tool called Objective-C Binding Project (.bindings.csproj) that simplifies the process of creating bindings for Objective-C libraries. The binding project allows you to specify the native Objective-C library and generates the necessary C# code to interact with it.
Question 11: What design pattern is recommended for separating UI logic from business logic in Xamarin applications?
- VIPER
- MVP (Model-View-Presenter)
- MVC (Model-View-Controller)
- MVVM (Model-View-ViewModel) (Correct answer)
Correct answer: MVVM (Model-View-ViewModel)
MVVM is the recommended pattern for Xamarin, where ViewModels expose data via bindings and commands, keeping UI logic testable.
Question 12: Which approach minimizes memory pressure when displaying many high-resolution images in a Xamarin.Forms scrolling list?
- Store all images as Base64 strings in the ViewModel
- Load all images at full resolution into memory before displaying the list
- Use PNG format exclusively to avoid decompression overhead
- Decode images to the required display size (downsampling) and release them when cells scroll off screen (Correct answer)
Correct answer: Decode images to the required display size (downsampling) and release them when cells scroll off screen
Downsampling images to display dimensions before decoding dramatically reduces bitmap memory footprint, and releasing bitmaps for off-screen cells prevents OOM errors.
Question 13: Which App Center feature allows distributing beta builds to testers before public release?
- TestFlight only
- App Center Push
- App Center Build
- App Center Distribute (Correct answer)
Correct answer: App Center Distribute
App Center Distribute manages beta distribution, allowing teams to upload builds and invite testers via email links.
Question 14: In Xamarin, what is the purpose of the Circuit Breaker pattern in service communication?
- Stops sending requests to a failing service temporarily to allow recovery (Correct answer)
- Compresses request payloads
- Routes traffic to backup servers
- Encrypts HTTP traffic
Correct answer: Stops sending requests to a failing service temporarily to allow recovery
The Circuit Breaker pattern monitors failures and opens the circuit (stops requests) after a threshold, preventing cascading failures while the service recovers.
Question 15: What is the purpose of the Xamarin.Essentials SecureStorage API?
- Manages SSL certificates
- Encrypts network traffic
- Stores key-value pairs securely using platform-native encryption (Correct answer)
- Provides encrypted SQLite access
Correct answer: Stores key-value pairs securely using platform-native encryption
SecureStorage uses iOS Keychain and Android KeyStore to persist sensitive data like tokens securely across app launches.
Question 16: What does the CollectionView differ from ListView in Xamarin.Forms?
- CollectionView only supports horizontal scrolling
- CollectionView offers flexible layout options including grids and requires no ViewCell wrapper (Correct answer)
- CollectionView has no support for data binding
- CollectionView is only available on iOS
Correct answer: CollectionView offers flexible layout options including grids and requires no ViewCell wrapper
CollectionView supports multiple layout strategies (linear, grid) and does not require items to be wrapped in ViewCell.
Question 17: Which .NET project type replaced PCL as the preferred Xamarin shared library format?
- .NET Standard Library (Correct answer)
- Class Library (net6)
- Universal Library
- Shared Project
Correct answer: .NET Standard Library
.NET Standard Libraries define a versioned API surface supported across all .NET implementations, replacing PCL profiles.
Question 18: Which features are available in Xamarin applications created with the.NET BCL?
- powerful XML
- All of the above (Correct answer)
- Serialization
- Database
Correct answer: All of the above
The .NET Base Class Library (BCL) used in Xamarin applications provides several powerful features related to XML, database, and serialization. <br> These features allow Xamarin developers to work with XML data, interact with databases, and handle serialization tasks efficiently within their applications.
Question 19: Which Xamarin.Forms control is best suited for accepting multi-line text input from the user?
- Entry
- Label
- SearchBar
- Editor (Correct answer)
Correct answer: Editor
Editor is designed for multi-line text input, while Entry is limited to a single line.
Question 20: What is an Effect in Xamarin.Forms and how does it differ from a Custom Renderer?
- An Effect is a visual animation
- An Effect is used only for iOS
- An Effect adds lightweight platform-specific customization without replacing the entire renderer (Correct answer)
- An Effect replaces the control's renderer entirely
Correct answer: An Effect adds lightweight platform-specific customization without replacing the entire renderer
Effects allow attaching platform-specific behavior to existing controls without subclassing or replacing the full renderer.
Question 21: In Xamarin.Android, which attribute is required to declare permissions in the app manifest?
- [Permission]
- [Requires]
- [Manifest]
- [UsesPermission] (Correct answer)
Correct answer: [UsesPermission]
The [UsesPermission] assembly-level attribute adds a <uses-permission> entry to AndroidManifest.xml.
Question 22: In Xamarin.iOS, which compilation mode converts IL to native ARM code ahead of time?
- Interpreter
- JIT (Just-in-Time)
- AOT (Ahead-of-Time) (Correct answer)
- LLVM Only
Correct answer: AOT (Ahead-of-Time)
iOS requires AOT compilation because Apple does not allow JIT execution on device.
Question 23: In Xamarin.Forms Shell, what is a FlyoutItem used for?
- Defining top-level navigation destinations in a flyout menu (Correct answer)
- Displaying modal dialogs
- Creating pop-up notifications
- Managing background services
Correct answer: Defining top-level navigation destinations in a flyout menu
FlyoutItem represents a navigation destination that appears in the Shell flyout (hamburger menu).
Question 24: What year did Microsoft complete the acquisition of Xamarin?
- 2015
- 2014
- 2017
- 2016 (Correct answer)
Correct answer: 2016
Microsoft completed the acquisition of Xamarin in February 2016.
Question 25: What is the purpose of the Polly library in Xamarin HTTP communication?
- Manages HTTP connection pooling
- Parses Polyglot API responses
- Handles multipart form uploads
- Provides resilience policies like retry, circuit breaker, and timeout for HTTP calls (Correct answer)
Correct answer: Provides resilience policies like retry, circuit breaker, and timeout for HTTP calls
Polly is a .NET resilience library that allows defining policies (retry, circuit breaker, fallback) applied to any code, including HttpClient calls.
Question 26: Which NuGet package provides SQLite database access in Xamarin cross-platform apps?
- EntityFrameworkCore.Sqlite
- Mono.Data.Sqlite
- System.Data.SQLite
- sqlite-net-pcl (Correct answer)
Correct answer: sqlite-net-pcl
sqlite-net-pcl (SQLite-Net) is the standard lightweight ORM for SQLite in Xamarin, supporting iOS and Android via a single PCL/NuGet.
Question 27: In Xamarin.iOS, what file format is used for Interface Builder storyboards?
- .axml
- .xaml
- .storyboard (Correct answer)
- .xib
Correct answer: .storyboard
Storyboards with the .storyboard extension define UI flows and are supported natively in Xamarin.iOS.
Question 28: Which Xamarin.Forms command pattern property is used to enable or disable a button based on ViewModel logic?
- Command.RaiseCanExecuteChanged
- Button.IsEnabled directly in XAML
- Command.CanExecuteChanged
- ICommand.CanExecute (Correct answer)
Correct answer: ICommand.CanExecute
ICommand.CanExecute returns a bool that Xamarin.Forms uses to automatically set the Button's IsEnabled state.
Question 29: What is the significance of the [Preserve] attribute in Xamarin.iOS applications?
- Prevents the linker from removing types or members (Correct answer)
- Keeps UI elements in memory
- Marks code as thread-safe
- Preserves user settings across updates
Correct answer: Prevents the linker from removing types or members
The [Preserve] attribute instructs the Xamarin.iOS linker to keep a type or member even if it appears unused, preventing runtime errors.
Question 30: In Xamarin.Android, which class is used to run background tasks that survive Activity recreation?
- Thread
- AsyncTask
- Service
- ViewModel (Correct answer)
Correct answer: ViewModel
ViewModel (from AndroidX) stores UI-related data that survives configuration changes like screen rotation.
Question 31: Which Xamarin.Essentials feature allows you to access device sensors cross-platform?
- SensorKit
- DeviceInfo only
- Accelerometer, Gyroscope, and Magnetometer APIs (Correct answer)
- Platform.Sensors
Correct answer: Accelerometer, Gyroscope, and Magnetometer APIs
Xamarin.Essentials provides cross-platform Accelerometer, Gyroscope, and Magnetometer APIs that abstract native sensor access.
Question 32: Which ListView caching strategy in Xamarin.Forms reuses cell objects as the user scrolls to improve performance?
- RecycleElement (Correct answer)
- RetainElement
- CacheElement
- RecycleElementAndDataTemplate
Correct answer: RecycleElement
RecycleElement reuses cell instances as they scroll off screen rather than creating new ones, significantly reducing memory allocations and GC pressure.
Question 33: What is the purpose of the MessagingCenter in Xamarin.Forms?
- To handle push notification payloads
- To display in-app notification banners
- To send SMS messages from the app
- To enable loosely coupled communication between components via a publish-subscribe pattern (Correct answer)
Correct answer: To enable loosely coupled communication between components via a publish-subscribe pattern
MessagingCenter implements a publish-subscribe mechanism allowing components to communicate without direct references.
Question 34: Which Xamarin.Android attribute marks a method as a broadcast receiver callback?
- [IntentFilter]
- [OnReceive]
- [Receiver]
- [BroadcastReceiver] (Correct answer)
Correct answer: [BroadcastReceiver]
The [BroadcastReceiver] attribute on a class registers it as a broadcast receiver in the manifest.
Question 35: Which Xamarin.Forms page type is best suited for displaying multiple pages accessed via tabs at the bottom or top?
- FlyoutPage
- TabbedPage (Correct answer)
- ShellPage
- NavigationPage
Correct answer: TabbedPage
TabbedPage contains multiple child pages accessible via tab controls, rendered natively on each platform.
Question 36: In Xamarin.UITest, which method is used to locate a UI element by its accessibility label?
- app.GetElement("name")
- app.AccessibilityQuery("label")
- app.Query(x => x.Marked("label")) (Correct answer)
- app.FindById("id")
Correct answer: app.Query(x => x.Marked("label"))
app.Query(x => x.Marked()) locates elements by their accessibility label, text, or Id cross-platform.
Question 37: Which CollectionView feature in Xamarin.Forms provides a built-in performance advantage over ListView for long data sets?
- Automatic pagination
- Built-in pull-to-refresh
- Built-in search bar
- Native virtualization and cell recycling by default (Correct answer)
Correct answer: Native virtualization and cell recycling by default
CollectionView uses virtualization and cell recycling by default without requiring explicit CachingStrategy configuration, making it inherently more efficient than ListView for large data sets.
Question 38: What does the [IntentFilter] attribute do in Xamarin.Android?
- Blocks unwanted intents
- Declares which intents an Activity or receiver responds to (Correct answer)
- Filters log output
- Creates implicit intent routing
Correct answer: Declares which intents an Activity or receiver responds to
[IntentFilter] generates an <intent-filter> entry in the manifest so the component receives matching implicit intents.
Question 39: What is the role of a Fragment in Xamarin.Android?
- Handles network requests
- Represents a reusable portion of UI within an Activity (Correct answer)
- Provides a database interface
- Manages app-wide state
Correct answer: Represents a reusable portion of UI within an Activity
Fragments are modular UI components that are hosted by an Activity and have their own lifecycle.
Question 40: Which library is commonly used for JSON serialization and deserialization in Xamarin applications?
- Newtonsoft.Json (Json.NET) (Correct answer)
- System.Xml.Serialization
- Google.Gson
- Codable
Correct answer: Newtonsoft.Json (Json.NET)
Newtonsoft.Json (Json.NET) is the most widely used .NET JSON library and works seamlessly in Xamarin shared and platform code.
Question 41: What is the role of UIViewController in Xamarin.iOS?
- Provides data persistence
- Handles HTTP requests
- Manages a single screen's view and lifecycle (Correct answer)
- Manages app-level navigation
Correct answer: Manages a single screen's view and lifecycle
UIViewController controls a single screen, managing the view hierarchy and responding to lifecycle events.
Question 42: What does 'AOT' stand for in the context of Xamarin.iOS compilation?
- Ahead of Time (Correct answer)
- Android Output Transform
- Automatic Object Tracking
- API Object Transformer
Correct answer: Ahead of Time
AOT stands for Ahead of Time compilation, which Xamarin.iOS uses to compile C# to native ARM code before deployment.
Question 43: What method inflates an XML layout resource in Xamarin.Android?
- FindViewById
- LayoutInflater.Inflate
- LoadLayout
- SetContentView (Correct answer)
Correct answer: SetContentView
SetContentView inflates and sets the XML layout as the Activity's content view.
Question 44: The open-source platform Xamarin allows developers to create cutting-edge and effective applications for
- iOS
- Android
- Windows with .NET
- All of the above (Correct answer)
Correct answer: All of the above
Utilizing the.NET framework, developers can create cutting-edge, high-performing apps for iOS, Android, and Windows using the open-source Xamarin platform. It offers a collection of frameworks, libraries, and tools that let programmers create cross-platform applications by writing shared C# or F# code.
Question 45: What is the recommended approach to prevent memory leaks caused by event handler subscriptions in Xamarin.Forms pages?
- Unsubscribe event handlers in the OnDisappearing or Dispose method (Correct answer)
- Avoid events and use polling instead
- Use static event handlers throughout the app
- Always use weak references for all objects
Correct answer: Unsubscribe event handlers in the OnDisappearing or Dispose method
Unsubscribing event handlers in OnDisappearing or Dispose breaks the reference chain that prevents the GC from collecting page objects, avoiding memory leaks.
Question 46: Which Xamarin feature allows running native Swift or Kotlin code alongside C# code in the same project?
- DllImport
- Interop Services
- Native References (Correct answer)
- Binding Libraries
Correct answer: Native References
Native References in Xamarin allow including compiled native frameworks (.framework/.aar) directly in a Xamarin project.
Question 47: Which class is used to start a new Activity in Xamarin.Android?
- Intent (Correct answer)
- ActivityManager
- Task
- Navigator
Correct answer: Intent
An Intent object specifies the target Activity and is passed to StartActivity to launch it.
Question 48: Which property on a Grid column or row definition sets a size proportional to remaining space?
- Auto
- Fill
- Absolute pixel value
- Star (*) sizing (Correct answer)
Correct answer: Star (*) sizing
Star sizing (e.g., *, 2*) distributes remaining space proportionally among rows or columns that use it.
Question 49: What is Xamarin.UITest used for?
- Screenshot diffing only
- Performance profiling
- Automated UI testing of iOS and Android apps using C# (Correct answer)
- Mocking network calls in tests
Correct answer: Automated UI testing of iOS and Android apps using C#
Xamarin.UITest provides an automated UI testing framework that drives real device or simulator interactions using C# test code.
Question 50: What is the purpose of 'Fast Renderers' in Xamarin.Forms for Android?
- They reduce the number of native Android views needed to render Xamarin.Forms controls (Correct answer)
- They cache rendered bitmaps of UI elements
- They skip layout measurement passes entirely
- They use GPU acceleration for all animations
Correct answer: They reduce the number of native Android views needed to render Xamarin.Forms controls
Fast Renderers flatten the Android view hierarchy by reducing the number of ViewGroup layers needed, decreasing inflation time and rendering overhead.
Question 51: Which Xamarin.iOS class is used to display a list of items using a table-based layout?
- RecyclerView
- UITableView (Correct answer)
- UICollectionView
- ListView
Correct answer: UITableView
UITableView is the native iOS control for displaying scrollable lists and is used directly in Xamarin.iOS.
Question 52: Which attribute marks a class as an Android Activity in Xamarin.Android?
- [Register]
- [Export]
- [Activity] (Correct answer)
- [Component]
Correct answer: [Activity]
The [Activity] attribute registers a C# class as an Android Activity and allows setting properties like Label and MainLauncher.
Question 53: In Xamarin, what is the purpose of a Custom Renderer?
- Generates native code at runtime
- Handles custom HTTP response parsing
- Renders 3D graphics
- Overrides the default platform rendering of a Xamarin.Forms control (Correct answer)
Correct answer: Overrides the default platform rendering of a Xamarin.Forms control
Custom Renderers allow developers to replace or extend the default native control rendering of a Xamarin.Forms element on a specific platform.
Question 54: Which tool in Visual Studio for Mac is used to visually design Xamarin.iOS interfaces?
- Xamarin Designer for iOS (Correct answer)
- Storyboard Editor
- XIB Viewer
- Interface Builder
Correct answer: Xamarin Designer for iOS
The Xamarin Designer for iOS (iOS Designer) allows visual layout of iOS interfaces within Visual Studio.
Question 55: Which open-source project is Xamarin built upon?
- CoreCLR
- Mono (Correct answer)
- OpenJDK
- DotGNU
Correct answer: Mono
Xamarin is built on Mono, the open-source implementation of the .NET framework.
Question 56: There are no APIs available in the Xamarin.Essentials library for
- Text-to-speech
- Phone dialer
- None of the above (Correct answer)
- Screen lock
Correct answer: None of the above
The APIs for text-to-speech, screen lock, and phone dialer are all offered by Xamarin.Essentials. A package called Xamarin.Essentials offers a large selection of cross-platform APIs for typical mobile application functionalities.
Question 57: What is the primary benefit of enabling XAML Compilation (XamlCompilation attribute) in Xamarin.Forms?
- It compresses XAML files to reduce APK size
- XAML is parsed at compile time instead of runtime, reducing page load time (Correct answer)
- It automatically generates code-behind classes
- It enables hot reload on iOS devices
Correct answer: XAML is parsed at compile time instead of runtime, reducing page load time
XamlCompilation converts XAML to IL at compile time, eliminating the runtime parsing overhead and reducing page instantiation time.
Question 58: What is the purpose of an Effect in Xamarin.Forms compared to a Custom Renderer?
- Effects make targeted property-level modifications without subclassing the renderer (Correct answer)
- Effects are only usable on iOS; renderers work cross-platform
- Effects replace the entire native control; renderers only modify properties
- Effects require a full XAML redefinition of the control
Correct answer: Effects make targeted property-level modifications without subclassing the renderer
Effects attach to an existing control to adjust specific native properties without replacing the full renderer pipeline.
Question 59: Which XAML markup extension is used to reference a resource defined in a ResourceDictionary?
- {Binding}
- {x:Reference}
- {StaticResource} (Correct answer)
- {DynamicResource}
Correct answer: {StaticResource}
StaticResource looks up a key in the ResourceDictionary at parse time and does not update if the resource changes at runtime.
Question 60: In Xamarin, what does the Retry Pattern help with when calling remote services?
- Routing requests through alternative endpoints
- Batching API calls for efficiency
- Caching responses to avoid repeated requests
- Automatically retrying failed transient network requests with backoff (Correct answer)
Correct answer: Automatically retrying failed transient network requests with backoff
The Retry Pattern handles transient failures (timeouts, momentary connectivity loss) by retrying the operation with exponential backoff.
Question 61: Which Visual Studio tool allows deploying a Xamarin.Android app directly to a connected device or emulator?
- NuGet Package Manager
- App Center Distribute
- Archive Manager
- Deploy to Device (F5 / Run) (Correct answer)
Correct answer: Deploy to Device (F5 / Run)
Visual Studio's Run (F5) deploys the debug build directly to the selected emulator or connected physical device via ADB.
Question 62: Which Xamarin.Forms animation method animates a view's opacity from its current value to a target value?
- view.RotateTo
- view.FadeTo (Correct answer)
- view.ScaleTo
- view.TranslateTo
Correct answer: view.FadeTo
FadeTo animates the Opacity property of a VisualElement to the specified value over a given duration.
Question 63: Which tool is used to profile Xamarin applications for memory and CPU performance?
- Instruments for iOS only
- Xamarin Profiler (Correct answer)
- dotTrace
- Android Studio Profiler only
Correct answer: Xamarin Profiler
Xamarin Profiler integrates with Visual Studio and provides memory allocation, time profiling, and cycle tracking for both iOS and Android.
Question 64: What is the recommended way to run CPU-intensive data processing (e.g., JSON parsing of a large payload) in a Xamarin application?
- Run it synchronously on the UI thread to keep data consistent
- Use Task.Run() to execute on a background thread pool thread and await the result on the UI thread (Correct answer)
- Use Thread.Sleep() intervals to yield control
- Use a Timer to split the work across multiple ticks
Correct answer: Use Task.Run() to execute on a background thread pool thread and await the result on the UI thread
Task.Run() dispatches CPU-bound work to the thread pool, freeing the UI thread to remain responsive; awaiting it ensures the result is marshaled back to the UI thread safely.
Question 65: In Xamarin.Android, what is the purpose of the Resource.Designer.cs file?
- Auto-generated file providing typed IDs for all app resources (Correct answer)
- A resource packager script
- A design-time layout preview file
- The main application class
Correct answer: Auto-generated file providing typed IDs for all app resources
Resource.Designer.cs is auto-generated by the build system and exposes all resource IDs as typed constants under Resource.*.
Question 66: In Xamarin SQLite-Net, which attribute marks a property as the primary key with auto-increment?
- [Identity]
- [Id, AutoGen]
- [Key, DatabaseGenerated]
- [PrimaryKey, AutoIncrement] (Correct answer)
Correct answer: [PrimaryKey, AutoIncrement]
Combining [PrimaryKey] and [AutoIncrement] attributes on an integer property configures SQLite to auto-generate unique IDs.
Question 67: Which Xamarin.Forms effect allows you to apply a platform-specific effect to a control without a full custom renderer?
- RoutingEffect (Correct answer)
- PlatformEffect
- NativeEffect
- ControlEffect
Correct answer: RoutingEffect
RoutingEffect is the shared-code wrapper that routes to a platform-specific Effect implementation.
Question 68: In Xamarin, which HttpClient handler is recommended for best performance on iOS?
- CFNetworkHandler
- NSUrlSessionHandler (Correct answer)
- ModernHttpClient
- HttpClientHandler
Correct answer: NSUrlSessionHandler
NSUrlSessionHandler uses the native iOS networking stack, providing better performance, TLS support, and HTTP/2 compared to the managed handler.
Question 69: Which Xamarin.Forms page type uses swipeable tabs for navigation?
- NavigationPage
- TabbedPage (Correct answer)
- CarouselPage
- MasterDetailPage
Correct answer: TabbedPage
TabbedPage provides a tabbed interface that allows users to switch between pages using tabs.
Question 70: Which Xamarin.Essentials class allows accessing the device's file system paths cross-platform?
- Environment
- StorageManager
- FileSystem (Correct answer)
- PathHelper
Correct answer: FileSystem
FileSystem provides cross-platform access to AppDataDirectory and CacheDirectory without needing platform-specific code.
Question 71: Which Xamarin.Essentials method sends an email using the device's default mail app?
- Intent.ActionSendTo
- EmailManager.Open
- Email.ComposeAsync (Correct answer)
- MailKit.Send
Correct answer: Email.ComposeAsync
Xamarin.Essentials Email.ComposeAsync opens the platform's native mail app pre-filled with the provided subject, body, and recipients.
Question 72: In Xamarin.Android, which Garbage Collector mode is recommended for apps with frequent short-lived allocations to minimize GC pause times?
- Mark-and-Sweep GC
- Reference Counting GC
- SGen (Generational GC) (Correct answer)
- Boehm GC
Correct answer: SGen (Generational GC)
SGen (Simple Generational GC) divides objects into young and old generations, collecting short-lived objects quickly in the nursery while less frequently collecting long-lived objects.
Question 73: What is the role of a DataTemplateSelector in Xamarin.Forms?
- Defines the layout for a single item in a list
- Provides filtering logic for collection views
- Converts data values between types for binding
- Selects a different DataTemplate based on the bound data item at runtime (Correct answer)
Correct answer: Selects a different DataTemplate based on the bound data item at runtime
DataTemplateSelector allows you to choose among multiple DataTemplates dynamically based on the data object being rendered.
Question 74: Which build configuration in Xamarin.Android enables the Mono Ahead-of-Time compiler?
- Release with AOT enabled (Correct answer)
- Debug with LLVM
- Profile build
- Fast Deployment mode
Correct answer: Release with AOT enabled
Enabling AOT in the Release build compiles managed assemblies ahead of time, reducing startup time on device.
Question 75: What programming language is used by Xamarin?
- C# (Correct answer)
- Java
- Kotlin
- C++
Correct answer: C#
Programming in C# is done using Xamarin. Microsoft created the contemporary, object-oriented programming language C#. Developers can use C# and the.NET framework to create mobile applications with Xamarin. As a result, they may utilize C# to develop shared code, carry out business logic, and communicate with platforms like iOS, Android, and Windows-specific APIs and libraries.
Question 76: What is the purpose of the AndroidManifest.xml in Xamarin.Android?
- Defines UI layouts
- Declares app components, permissions, and metadata (Correct answer)
- Contains database schemas
- Stores string resources
Correct answer: Declares app components, permissions, and metadata
AndroidManifest.xml is the app's configuration file declaring activities, services, permissions, and min SDK version.
Question 77: Which Xamarin.Forms trigger fires when a bound property reaches a specified value?
- PropertyTrigger
- DataTrigger (Correct answer)
- EventTrigger
- MultiTrigger
Correct answer: DataTrigger
DataTrigger monitors a data binding expression and applies setters when the value matches a specified condition.
Question 78: Which Xamarin.Forms element is used to navigate between pages using a stack-based model?
- CarouselPage
- TabbedPage
- NavigationPage (Correct answer)
- FlyoutPage
Correct answer: NavigationPage
NavigationPage provides a hierarchical navigation experience using a push/pop stack.
Question 79: In Xamarin.iOS, how do you navigate to a new view controller using a UINavigationController?
- ShowViewController
- StartActivity
- NavigateTo
- PushViewController (Correct answer)
Correct answer: PushViewController
PushViewController pushes a new UIViewController onto the navigation stack.
Question 80: Which features are offered by Xamarin. Shell Forms
- URI-based navigation scheme
- Common navigation experience
- Integrated search handler
- All of the above (Correct answer)
Correct answer: All of the above
These features provided by Xamarin.Forms Shell contribute to a more consistent and efficient navigation experience in Xamarin.Forms applications, saving development time and effort.
Question 81: In Xamarin.Android, which tool from the Android SDK helps identify over-drawn pixels and excessive layout nesting that degrades rendering performance?
- Android Emulator network throttler
- Xamarin Profiler memory view
- GPU Overdraw visualization and Layout Inspector in Android Studio (Correct answer)
- ADB LogCat
Correct answer: GPU Overdraw visualization and Layout Inspector in Android Studio
Android Studio's GPU Overdraw visualization highlights pixels drawn multiple times per frame, and the Layout Inspector reveals deep view hierarchies that cause expensive measure passes.
Question 82: What does the Xamarin Linker do when set to 'Link All' mode?
- Combines multiple DLLs into one managed assembly
- Forces all assemblies to compile with AOT
- Links all native libraries into a single binary
- Removes unused code from SDK and user assemblies to reduce app size (Correct answer)
Correct answer: Removes unused code from SDK and user assemblies to reduce app size
In 'Link All' mode, the Linker performs static analysis on both SDK and user assemblies, stripping unused types and members to produce the smallest possible binary.
Question 83: What month and year was it found?
- June 2011
- April 2011
- February 2011
- May 2011 (Correct answer)
Correct answer: May 2011
Xamarin was founded in May 2011.
Question 84: What does code signing accomplish in a Xamarin.iOS release build?
- Enables background fetch
- Unlocks push notification delivery
- Optimizes binary size
- Cryptographically authenticates the app and enables distribution through the App Store (Correct answer)
Correct answer: Cryptographically authenticates the app and enables distribution through the App Store
Code signing uses a distribution certificate to prove the app's identity, ensuring it hasn't been tampered with and allowing App Store distribution.
Question 85: In Xamarin.Android, what does the [Activity] attribute configure?
- Dependency injection bindings
- Navigation routes
- The Activity's AndroidManifest metadata such as Label and Theme (Correct answer)
- Database table mappings
Correct answer: The Activity's AndroidManifest metadata such as Label and Theme
The [Activity] attribute generates AndroidManifest.xml entries for the decorated Activity class.
Question 86: What attribute is used to register a Xamarin.Forms custom renderer?
- [CustomRenderer]
- [PlatformRenderer]
- [ExportRenderer] (Correct answer)
- [RegisterRenderer]
Correct answer: [ExportRenderer]
The [ExportRenderer] assembly-level attribute maps a Xamarin.Forms control to its platform-specific renderer.
Question 87: Which technique reduces Xamarin app cold start time by pre-compiling commonly used assemblies on the device after installation?
- Background Fetch
- Lazy initialization of all ViewModels
- LLVM compiler optimization
- NGEN (Native Image Generator) / Mono AOT on Android (Correct answer)
Correct answer: NGEN (Native Image Generator) / Mono AOT on Android
Mono's AOT on Android pre-compiles managed assemblies to native code on the device post-install, so subsequent launches load native images instead of JIT-compiling IL.
Question 88: What is the Arrange-Act-Assert (AAA) pattern in the context of Xamarin unit tests?
- A build pipeline stage order
- A code review checklist
- An accessibility audit process
- A test structure that sets up state, performs an action, then verifies the result (Correct answer)
Correct answer: A test structure that sets up state, performs an action, then verifies the result
AAA is the standard unit test pattern: Arrange sets up objects and preconditions, Act calls the method under test, Assert verifies expected outcomes.
Question 89: What Xamarin accomplishes
- All of the above (Correct answer)
- Write cross-platform applications in C# with Visual Studio.
- Share code, test and business logic across platforms.
Correct answer: All of the above
Xamarin is a cross-platform development framework that allows developers to build mobile applications using C# and .NET. It enables the sharing of code, testing, and business logic across multiple platforms, such as iOS, Android, and Windows. <br> By combining the power of C# and .NET with the flexibility of cross-platform development, Xamarin enables developers to write efficient, high-quality mobile applications that can run on multiple platforms using shared code, testing, and business logic.
Question 90: Which tool is built into Visual Studio and used to profile CPU usage and memory allocations in Xamarin applications?
- Xamarin Profiler (Correct answer)
- Android Profiler only
- Instruments only
- dotTrace
Correct answer: Xamarin Profiler
Xamarin Profiler is the cross-platform profiling tool integrated with Visual Studio that measures CPU cycles, memory allocations, and time profiling for both iOS and Android.
Question 91: In Xamarin, what is the significance of the keystore file for Android release builds?
- It contains the private key used to sign the APK for release distribution (Correct answer)
- It stores app configuration secrets
- It holds SSL certificates for HTTPS
- It manages in-app purchase keys
Correct answer: It contains the private key used to sign the APK for release distribution
The keystore file holds the developer's private signing key; the same key must be used for all future updates to the same app on the Play Store.
Question 92: Which Xamarin.iOS class is used to present a modal view controller?
- PresentViewController (Correct answer)
- PushModal
- StartModalActivity
- ShowModal
Correct answer: PresentViewController
PresentViewController is called on a UIViewController to present another controller modally.
Question 93: Which Xamarin.Android control displays a scrollable list of items using view recycling?
- RecyclerView (Correct answer)
- ListView
- DataGrid
- UITableView
Correct answer: RecyclerView
RecyclerView is the modern Android list control that recycles view holders for efficient scrolling.
Question 94: What is a Portable Class Library (PCL) in Xamarin development?
- A compiled library targeting a common API subset usable across multiple platforms (Correct answer)
- A NuGet-only distribution format
- A shared project with platform directives
- An Android-specific class library
Correct answer: A compiled library targeting a common API subset usable across multiple platforms
A PCL compiles to a DLL targeting a specific API intersection (profile) supported by the selected platforms.
Question 95: In Xamarin.iOS, which method do you override to set the initial view controller programmatically?
- FinishedLaunching (Correct answer)
- ViewDidLoad
- OnCreate
- WillEnterForeground
Correct answer: FinishedLaunching
FinishedLaunching in AppDelegate is overridden to configure the window and root view controller.
Question 96: What does the Linker do in a Xamarin.iOS release build?
- Links native Objective-C libraries
- Connects to the App Store
- Removes unused code to reduce app size (Correct answer)
- Compiles IL to native code
Correct answer: Removes unused code to reduce app size
The Xamarin.iOS linker performs static analysis to strip unused managed code, reducing the final binary size.
Question 97: Which build configuration linker option in Xamarin.iOS removes unused code to reduce app size?
- Link Framework SDKs Only
- Don't Link
- Link All (Correct answer)
- Strip Symbols
Correct answer: Link All
'Link All' instructs the linker to analyze and remove unused code from both SDK assemblies and user assemblies.
Question 98: Which Xamarin.iOS method is called when the app moves to the background?
- WillResignActive
- DidEnterBackground (Correct answer)
- OnPause
- OnStop
Correct answer: DidEnterBackground
DidEnterBackground in AppDelegate is called when the application transitions to the background state.
Question 99: What is MessagingCenter in Xamarin used for?
- Debug logging
- Sending push notifications
- Loosely coupled pub/sub communication between components (Correct answer)
- Email delivery from the app
Correct answer: Loosely coupled pub/sub communication between components
MessagingCenter provides a publish/subscribe mechanism allowing decoupled communication between ViewModels and other components.
Question 100: In Xamarin, what does the Repository pattern provide when working with data sources?
- A local cache of remote data only
- A built-in Xamarin.Forms control
- An abstraction over data access logic, separating business logic from data source details (Correct answer)
- A NuGet package for database access
Correct answer: An abstraction over data access logic, separating business logic from data source details
The Repository pattern abstracts database or API calls behind an interface, making the data layer swappable and the business logic testable.
Question 101: Which async/await pattern should be used to avoid blocking the UI thread when performing I/O operations in Xamarin apps?
- Dispatcher.BeginInvoke with synchronous calls
- await Task.Run(() => LongOperation()) (Correct answer)
- Task.Run(() => LongOperation()).Wait()
- Thread.Sleep() followed by UI update
Correct answer: await Task.Run(() => LongOperation())
Using 'await Task.Run()' offloads CPU or I/O work to a thread pool thread and returns control to the UI thread while waiting, preventing ANR errors and maintaining smooth UI.
Question 102: Which gesture recognizer class in Xamarin.iOS detects tap gestures?
- UISwipeGestureRecognizer
- TapListener
- UITapGestureRecognizer (Correct answer)
- GestureDetector
Correct answer: UITapGestureRecognizer
UITapGestureRecognizer is attached to a view to detect single or multiple tap gestures.
Question 103: Applications made with Xamarin support
- lambdas
- LINQ
- All of the above (Correct answer)
- generics
Correct answer: All of the above
Xamarin applications support lambdas, LINQ (Language-Integrated Query), and generics. Xamarin is built on the .NET platform, which includes these powerful language features.
Question 104: Which interface must a ViewModel implement to notify the View of property changes in Xamarin MVVM?
- IDataBinding
- IObservable
- INotifyPropertyChanged (Correct answer)
- IViewModel
Correct answer: INotifyPropertyChanged
INotifyPropertyChanged exposes the PropertyChanged event that the binding engine listens to for automatic UI updates.
Question 105: Which Xamarin.Forms Shell feature can improve perceived startup performance by deferring the initialization of non-startup tab content?
- Shell.FlyoutBehavior
- Shell.TabBarIsVisible
- ShellContent with ContentTemplate (lazy content creation) (Correct answer)
- Shell.NavBarIsVisible
Correct answer: ShellContent with ContentTemplate (lazy content creation)
Setting ContentTemplate on ShellContent causes the page to be instantiated only when the user first navigates to that tab, instead of creating all tab pages at app startup.
Question 106: What is a XIB file in the context of Xamarin.iOS?
- A Xamarin binding file
- An Interface Builder file defining a single view or window (Correct answer)
- An XML image bundle
- An Xcode project index
Correct answer: An Interface Builder file defining a single view or window
A XIB (nib) file is an Interface Builder document defining the layout of a single view or UI component.
Question 107: What is the purpose of the [Export] attribute in Xamarin.iOS?
- Binds a Swift framework
- Exports the app to the App Store
- Exposes a C# method to Objective-C selectors (Correct answer)
- Marks a class as public
Correct answer: Exposes a C# method to Objective-C selectors
The [Export] attribute exposes a C# method as an Objective-C selector so it can be called by the runtime.
Question 108: In Xamarin.iOS, what is the purpose of Info.plist?
- Contains localization strings
- Holds build scripts
- Stores app configuration such as bundle ID, permissions, and display name (Correct answer)
- Defines the database schema
Correct answer: Stores app configuration such as bundle ID, permissions, and display name
Info.plist is the iOS app manifest containing bundle identifier, version, required permissions, and other metadata.
Question 109: What Xamarin.Forms mechanism allows adding reusable behavior to controls without subclassing?
- Behaviors (Correct answer)
- Converters
- Effects
- Triggers
Correct answer: Behaviors
Behaviors allow you to attach reusable functionality to controls in Xamarin.Forms without subclassing them.
Question 110: Which lifecycle method should you override to save Activity state before it is destroyed?
- OnPause
- OnSaveInstanceState (Correct answer)
- OnStop
- OnDestroy
Correct answer: OnSaveInstanceState
OnSaveInstanceState provides a Bundle to save transient UI state that can be restored in OnCreate.
Question 111: What is the function of the IValueConverter interface in Xamarin.Forms data binding?
- Converts types between platforms
- Transforms data between the View and ViewModel (Correct answer)
- Maps JSON to objects
- Converts XAML to C#
Correct answer: Transforms data between the View and ViewModel
IValueConverter transforms bound data as it flows between the View and ViewModel, for example converting a boolean to a visibility value.
Question 112: In Xamarin.iOS, what file must be included when submitting to the App Store to enable full crash symbolication?
- dSYM file (Debug Symbol file) (Correct answer)
- PDB file
- map file
- linker.xml
Correct answer: dSYM file (Debug Symbol file)
The dSYM file contains debug symbols that Apple and crash reporting services use to symbolicate crash stack traces from release builds.
Question 113: Which service type in Xamarin.Android runs in the foreground with a persistent notification?
- Bound Service
- Foreground Service (Correct answer)
- Background Service
- Intent Service
Correct answer: Foreground Service
A Foreground Service runs at high priority with a visible notification, making it less likely to be killed by the OS.
Question 114: What is the main benefit of using .NET MAUI over Xamarin.Forms for new projects?
- Free App Store submission
- Larger NuGet ecosystem
- Better Objective-C binding support
- Single project with multi-targeting, improved performance, and modern .NET 6+ runtime (Correct answer)
Correct answer: Single project with multi-targeting, improved performance, and modern .NET 6+ runtime
.NET MAUI uses a single project with multi-targeting, eliminating the need for separate platform head projects and running on .NET 6+.
Question 115: The Xamarin.Forms API can be used in
- XAML only
- either XAML or C# (Correct answer)
- C# only
- None of the above
Correct answer: either XAML or C#
Xamarin. Both XAML and C# can be used to implement the Forms API. A UI toolkit called Xamarin.Forms enable programmers to construct cross-platform user interfaces from a single codebase. <br> Using C# code for more programmatic control over the UI or XAML for a more declarative and visual approach, developers can select the strategy that best meets their needs and project requirements.
Question 116: Which testing framework is recommended for unit testing shared Xamarin code?
- XCTest
- Robolectric
- NUnit or xUnit (Correct answer)
- Espresso
Correct answer: NUnit or xUnit
NUnit and xUnit are the standard .NET unit testing frameworks used to test shared Xamarin business logic and ViewModels.
Question 117: What is D8 in the context of Xamarin.Android builds?
- The DEX compiler that converts .NET IL to Dalvik bytecode (Correct answer)
- A debug tool for GPU rendering
- An ADB command
- A layout inspector tool
Correct answer: The DEX compiler that converts .NET IL to Dalvik bytecode
D8 is the dexer used by Xamarin.Android to compile managed IL into DEX bytecode for the Android runtime.
Question 118: Which package is used to implement the MVVM pattern's INotifyPropertyChanged efficiently in Xamarin?
- ReactiveUI
- Prism
- PropertyChanged.Fody (Correct answer)
- MvvmLight
Correct answer: PropertyChanged.Fody
PropertyChanged.Fody automatically weaves INotifyPropertyChanged implementations at compile time, eliminating boilerplate code.
Question 119: In Xamarin, which approach is used to cache HTTP responses to reduce redundant network calls?
- An HttpClient message handler with a caching layer (e.g., Akavache or MonkeyCache) (Correct answer)
- HttpClient built-in cache only
- Static Dictionary<string,string> fields
- Platform-specific URL cache only
Correct answer: An HttpClient message handler with a caching layer (e.g., Akavache or MonkeyCache)
Libraries like Akavache or MonkeyCache implement caching message handlers or repositories that store and expire HTTP responses locally.
Question 120: What causes 'jank' (stuttering) in Xamarin mobile applications?
- Having more than 100 UI elements on screen
- UI thread work taking longer than 16ms per frame, dropping below 60fps (Correct answer)
- Using async/await in ViewModels
- Using too many NuGet packages
Correct answer: UI thread work taking longer than 16ms per frame, dropping below 60fps
Mobile displays refresh at 60fps, giving each frame 16ms; any UI thread operation that exceeds this budget causes a dropped frame and visible stutter known as jank.
Question 121: The creator(s) of the application also came up with one of the following
- Trihexa
- Mono (Correct answer)
- Dual
- Penta
Correct answer: Mono
Nat Friedman and Miguel de Icaza, who founded Xamarin.Mac, were also instrumental in the development of the Mono project. Microsoft's.NET framework is implemented using open-source software called Mono.
Question 122: Which Xamarin.Essentials API provides cross-platform access to the device's geolocation?
- Geolocation (Correct answer)
- LocationManager
- GPS
- CLLocationManager
Correct answer: Geolocation
Xamarin.Essentials Geolocation class provides GetLastKnownLocationAsync and GetLocationAsync for cross-platform GPS access.
Question 123: In Xamarin.Android, which layout positions child views relative to each other or the parent?
- RelativeLayout (Correct answer)
- FrameLayout
- GridLayout
- LinearLayout
Correct answer: RelativeLayout
RelativeLayout positions children relative to sibling views or the parent container using alignment rules.
Question 124: Which responsibilities are handled by Mono, which Xamarin is based on?
- memory allocation
- garbage collection
- interoperability with underlying platforms
- all of the above (Correct answer)
Correct answer: all of the above
Memory allocation, garbage collection, and compatibility with underlying platforms are all handled by Mono, the underlying runtime for Xamarin.<br> By managing memory and acting as a link between the managed C# code and the underlying platform-specific code, Mono is essential to Xamarin's ability to create cross-platform applications.
Question 125: Which Xamarin.Forms Shell feature allows grouping multiple routes under a common navigation section?
- TabBar (Correct answer)
- NavigationPage
- ShellContent
- FlyoutItem
Correct answer: TabBar
TabBar in Shell groups ShellContent items into tab-based navigation sections displayed at the bottom of the screen.
Question 126: Which IDE is used by Xamarin?
- Emacs
- Visual Studio (Correct answer)
- Atom
- Vim
Correct answer: Visual Studio
Xamarin uses the Visual Studio IDE (Integrated Development Environment) as its primary development environment. Visual Studio provides comprehensive tools and features specifically designed for developing Xamarin applications. It offers a rich set of debugging, testing, and profiling capabilities, along with built-in support for Xamarin.Forms and Xamarin.Android/Xamarin.iOS projects.
Question 127: Which class is the entry point for a Xamarin.iOS application?
- Application
- MainActivity
- AppDelegate (Correct answer)
- UIApplication
Correct answer: AppDelegate
AppDelegate is the entry point for a Xamarin.iOS app and handles application lifecycle events.
Question 128: Which Xamarin.Forms command interface enables button clicks to be handled in the ViewModel?
- IHandler
- IDelegate
- IAction
- ICommand (Correct answer)
Correct answer: ICommand
ICommand exposes Execute and CanExecute methods that Xamarin.Forms controls like Button bind to.
Question 129: What is the function of the OnPlatform extension in Xamarin.Forms XAML?
- To configure Dependency Service implementations
- To set different property values per target platform in XAML (Correct answer)
- To define platform-specific behaviors in C# only
- To register platform renderers
Correct answer: To set different property values per target platform in XAML
OnPlatform<T> lets you specify different values for a property depending on iOS, Android, or other platforms directly in XAML.
Question 130: In Xamarin.Android, how do you request a runtime permission (Android 6.0+)?
- AskPermission
- RequestPermissions
- ActivityCompat.RequestPermissions (Correct answer)
- PermissionManager.Request
Correct answer: ActivityCompat.RequestPermissions
ActivityCompat.RequestPermissions is the backward-compatible method to request permissions at runtime.
Question 131: What does the [Preserve] attribute do in a Xamarin.iOS project?
- Marks code as deprecated
- Prevents the linker from stripping a type or member (Correct answer)
- Enables code sharing with Android
- Marks a class as thread-safe
Correct answer: Prevents the linker from stripping a type or member
[Preserve] instructs the iOS linker to retain types or members that would otherwise be removed during linking.
Question 132: In Xamarin.Android, what file type is produced for distributing an app outside the Play Store?
- .aab
- .apk (Correct answer)
- .xap
- .ipa
Correct answer: .apk
An APK (Android Package) is the installation file used to sideload apps on Android devices outside the Play Store.
Question 133: What year was the subsequent release of Xamarin.mac?
- 2011
- 2012 (Correct answer)
- 201
- 2013
Correct answer: 2012
Xamarin.Mac was initially released in the year 2012.
Question 134: How many countries were said to be utilizing Xamarin as of April 2017?
- 100
- 70
- 120 (Correct answer)
- 130
Correct answer: 120
As of April 2017, Xamarin claimed to be used in over 120 countries worldwide.
Question 135: Which Xamarin.Forms class is the base for pages that contain a single child view?
- CarouselPage
- MasterDetailPage
- TabbedPage
- ContentPage (Correct answer)
Correct answer: ContentPage
ContentPage is the most commonly used page type and hosts a single root view through its Content property.
Question 136: What is the Xamarin.Forms equivalent of a native iOS UITableView or Android RecyclerView?
- CollectionView
- ScrollView
- ListView (Correct answer)
- TableView
Correct answer: ListView
ListView is the traditional Xamarin.Forms control for displaying scrollable lists of items, analogous to platform list views.
Question 137: In the Xamarin.Essentials library, there are APIs for
- Device info
- File system
- All of the above (Correct answer)
- Accelerometer
Correct answer: All of the above
Xamarin.Essentials is a library that provides a set of cross-platform APIs for common device functionalities and features. Some of the APIs provided by Xamarin.Essentials <br> These are just a few examples of the many APIs provided by Xamarin.Essentials. It offers a wide range of cross-platform functionalities to simplify the development process and access native device capabilities in Xamarin applications.
Question 138: Which Xamarin.Essentials API provides cross-platform access to the device's network connectivity status?
- NetworkInfo
- Reachability
- NetworkAccess
- Connectivity (Correct answer)
Correct answer: Connectivity
Xamarin.Essentials Connectivity class exposes NetworkAccess and ConnectionProfiles to check current network state cross-platform.
Question 139: What is the purpose of Xamarin.Essentials Preferences API?
- Stores simple key-value pairs persistently using platform-native storage (Correct answer)
- Handles in-app purchase preferences
- Configures app theme settings only
- Manages user authentication preferences
Correct answer: Stores simple key-value pairs persistently using platform-native storage
Preferences provides a cross-platform API for reading and writing persistent key-value data, backed by NSUserDefaults on iOS and SharedPreferences on Android.
Question 140: Which method in the Application class is called when the app goes to the background?
- OnStart
- OnResume
- OnSleep (Correct answer)
- OnPause
Correct answer: OnSleep
OnSleep is called by the Xamarin.Forms Application class when the application transitions to the background.
Question 141: In Xamarin.Android, which method is the first lifecycle callback when an Activity is created?
- OnCreate (Correct answer)
- OnInitialize
- OnStart
- OnResume
Correct answer: OnCreate
OnCreate is called when the Activity is first created and is where you initialize views and state.
Question 142: How does Ahead-of-Time (AOT) compilation improve performance in Xamarin.iOS apps?
- It pre-compiles managed code to native ARM code at build time, eliminating JIT overhead at startup (Correct answer)
- It caches SQLite queries for faster database access
- It reduces network latency for API calls
- It compresses all image assets during compilation
Correct answer: It pre-compiles managed code to native ARM code at build time, eliminating JIT overhead at startup
AOT compiles .NET IL to native ARM instructions at build time; since iOS prohibits JIT compilation, AOT is required and also eliminates the JIT compilation overhead seen on other platforms.
Question 143: In Xamarin, which pattern ensures HTTP API calls do not block the main thread?
- BackgroundWorker
- Parallel.For
- Thread.Start with callbacks
- async/await with Task-returning methods (Correct answer)
Correct answer: async/await with Task-returning methods
Using async/await with HttpClient.GetAsync and similar Task-returning methods ensures network I/O is non-blocking and the UI remains responsive.
Question 144: What is the recommended approach when binding a large collection to a Xamarin.Forms list view to avoid loading all items into memory at once?
- Use a static List<T> to prevent GC collection
- Use ObservableCollection with all items pre-loaded
- Convert the collection to an array before binding
- Implement incremental loading with ISupportIncrementalLoading or RemainingItemsThreshold (Correct answer)
Correct answer: Implement incremental loading with ISupportIncrementalLoading or RemainingItemsThreshold
Incremental loading via RemainingItemsThreshold (CollectionView) fetches additional items only as the user approaches the end of the list, keeping memory consumption bounded.
Question 145: Which trigger type in Xamarin.Forms fires when a property on a control changes to a specified value?
- MultiTrigger
- DataTrigger
- EventTrigger
- PropertyTrigger (Correct answer)
Correct answer: PropertyTrigger
PropertyTrigger watches a single BindableProperty and applies setters when the property reaches the specified Value.
Question 146: Which Xamarin.Forms class provides a cross-platform abstraction for accessing device sensors like GPS?
- Xamarin.Forms.Maps
- Xamarin.Essentials (Correct answer)
- Xamarin.Forms.Device
- DependencyService
Correct answer: Xamarin.Essentials
Xamarin.Essentials is the NuGet library that provides cross-platform APIs for device features including GPS, accelerometer, battery, and more.
Question 147: How do you share data between view controllers in Xamarin.iOS using a segue?
- Use a static variable only
- Override PrepareForSegue and set destination controller properties (Correct answer)
- Use SharedPreferences
- Call SendBroadcast
Correct answer: Override PrepareForSegue and set destination controller properties
PrepareForSegue provides a reference to the destination view controller so you can set its properties before transition.
Question 148: Which API is used in Xamarin.iOS to request permission to send push notifications?
- NotificationManager.RequestPermission
- PushNotification.RequestAccess
- UIApplication.RegisterForRemoteNotifications
- UNUserNotificationCenter.Current.RequestAuthorization (Correct answer)
Correct answer: UNUserNotificationCenter.Current.RequestAuthorization
UNUserNotificationCenter.Current.RequestAuthorization is the modern API for requesting notification permissions on iOS.
Question 149: Which layout in Xamarin.Forms is most performant when you need to stack child views vertically or horizontally without complex constraints?
- RelativeLayout
- Grid
- AbsoluteLayout
- StackLayout (Correct answer)
Correct answer: StackLayout
StackLayout performs a single linear measure-and-arrange pass, making it the most efficient layout for simple vertical or horizontal stacking without requiring constraint solving.
Question 150: In Xamarin cross-platform development, what is the Dependency Service used for?
- Resolving platform-specific implementations from shared code (Correct answer)
- Managing HTTP dependencies
- Injecting database services
- Registering NuGet packages at runtime
Correct answer: Resolving platform-specific implementations from shared code
DependencyService allows shared code to call platform-specific implementations registered with [assembly: Dependency] attributes.
Xamarin Certified Mobile Developer
The Xamarin Certified Mobile Developer exam, formerly offered through Xamarin University, tests proficiency in cross-platform mobile development using Xamarin.Forms, Xamarin.iOS, Xamarin.Android, and mobile performance optimization. The exam is open-book with 150 multiple-choice questions and requires an 80% passing score.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds