Xamarin Certification Xamarin Certification 5 — Questions and Answers
Question 1: Which Xamarin.Forms CollectionView feature allows items to be selected by the user?
- SelectionMode property set to Single or Multiple (Correct answer)
- IsSelectable property set to true
- EnableSelection property
- ItemSelected event only
Correct answer: SelectionMode property set to Single or Multiple
CollectionView exposes a SelectionMode property that can be None, Single, or Multiple to control item selection behavior.
Question 2: In Xamarin.Forms, what does the BindingContext property on a View represent?
- The parent layout of the view
- The object that serves as the source for data bindings (Correct answer)
- The navigation context of the page
- The platform-specific renderer instance
Correct answer: The object that serves as the source for data bindings
BindingContext is the data object whose properties are referenced by data bindings on the view and its children.
Question 3: Which build configuration linker option in Xamarin.iOS removes unused code to reduce app size?
- Link All (Correct answer)
- Don't Link
- Link Framework SDKs Only
- 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 4: What is the purpose of the MessagingCenter in Xamarin.Forms?
- To send SMS messages from the app
- To enable loosely coupled communication between components via a publish-subscribe pattern (Correct answer)
- To display in-app notification banners
- To handle push notification payloads
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 5: Which Xamarin.Forms layout positions children using proportional or absolute coordinates?
- StackLayout
- GridLayout
- AbsoluteLayout (Correct answer)
- RelativeLayout
Correct answer: AbsoluteLayout
AbsoluteLayout positions children using explicit x/y coordinates or proportional bounds relative to the layout.
Question 6: In Xamarin.Forms, which XAML markup extension allows referencing resources defined in a ResourceDictionary?
- {Binding}
- {StaticResource} (Correct answer)
- {DynamicResource}
- {x:Static}
Correct answer: {StaticResource}
StaticResource looks up a resource by key in the ResourceDictionary at compile/parse time and does not update if the resource changes.
Question 7: Which Xamarin platform allows sharing UI code in addition to business logic across iOS and Android?
- Xamarin.Android only
- Xamarin.iOS only
- Xamarin.Forms (Correct answer)
- Xamarin.Mac
Correct answer: Xamarin.Forms
Xamarin.Forms provides a shared UI abstraction layer that renders native controls on both iOS and Android from a single codebase.
Which Xamarin.Forms CollectionView feature allows items to be selected by the user?