Xamarin Certification Xamarin Certification 4 — Questions and Answers
Question 1: Which Xamarin.Forms effect allows you to apply a platform-specific effect to a control without a full custom renderer?
- PlatformEffect
- RoutingEffect (Correct answer)
- ControlEffect
- NativeEffect
Correct answer: RoutingEffect
RoutingEffect is the shared-code wrapper that routes to a platform-specific Effect implementation.
Question 2: In Xamarin.Forms Shell, what is a FlyoutItem used for?
- Displaying modal dialogs
- Defining top-level navigation destinations in a flyout menu (Correct answer)
- 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 3: What is the primary purpose of Xamarin.Essentials?
- To provide UI components for all platforms
- To offer cross-platform APIs for native device features like GPS and accelerometer (Correct answer)
- To manage app store submissions
- To handle push notifications exclusively
Correct answer: To offer cross-platform APIs for native device features like GPS and accelerometer
Xamarin.Essentials provides a single cross-platform API surface for accessing native device capabilities.
Question 4: Which Xamarin.Forms page type is best suited for displaying multiple pages accessed via tabs at the bottom or top?
- NavigationPage
- FlyoutPage
- TabbedPage (Correct answer)
- ShellPage
Correct answer: TabbedPage
TabbedPage contains multiple child pages accessible via tab controls, rendered natively on each platform.
Question 5: In Xamarin.Android, what does the [Activity] attribute configure?
- Database table mappings
- The Activity's AndroidManifest metadata such as Label and Theme (Correct answer)
- Dependency injection bindings
- Navigation routes
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 6: Which Xamarin.Forms command interface enables button clicks to be handled in the ViewModel?
- IAction
- ICommand (Correct answer)
- IDelegate
- IHandler
Correct answer: ICommand
ICommand exposes Execute and CanExecute methods that Xamarin.Forms controls like Button bind to.
Question 7: What is the function of the OnPlatform extension in Xamarin.Forms XAML?
- To define platform-specific behaviors in C# only
- To set different property values per target platform in XAML (Correct answer)
- To register platform renderers
- To configure Dependency Service implementations
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.
Which Xamarin.Forms effect allows you to apply a platform-specific effect to a control without a full custom renderer?