官术网_书友最值得收藏!

Platform specifics

While the UI controls offered by Xamarin.Forms are customizable enough for most UX requirements, additional native behaviors may be needed. For certain native control behaviors, platform-specific configuration can be accessed using the IElementConfiguration interface implementation of the target control. For instance, in order to change the UpdateMode picker (that is, Immediately or WhenFinished), you can use the On<iOS> method to access the platform-specific behavior:

 var picker = new Xamarin.Forms.Picker();
picker.On<iOS>().SetUpdateMode(UpdateMode.WhenFinished);

The same can be implemented in XAML using the Xamarin.Forms.PlatformConfiguration.iOSSpecific namespace:

<ContentPage 
...
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core">

<!-- ... -->
<Picker ios:Picker.UpdateMode="WhenFinished">
<!-- Removed for brevity -->
</Picker>
<!-- ... -->
</ContentPage>

Similar platform configurations are available for other controls and platforms within the same namespace (that is, Xamarin.Forms.PlatformConfiguration).

主站蜘蛛池模板: 美姑县| 郁南县| 长沙县| 莒南县| 邢台县| 鹿邑县| 慈溪市| 大悟县| 石城县| 昌邑市| 连江县| 巴马| 德阳市| 祁阳县| 淮滨县| 秦皇岛市| 娄底市| 如东县| 原阳县| 富裕县| 长兴县| 黄山市| 嵊州市| 新津县| 体育| 拜城县| 西盟| 大石桥市| 平江县| 遂昌县| 宁晋县| 伊通| 微博| 双江| 拉萨市| 玉屏| 扎鲁特旗| 伊金霍洛旗| 霸州市| 涡阳县| 阆中市|