- Hands-On Mobile Development with .NET Core
- Can Bilgin
- 102字
- 2021-06-24 13:55:40
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).
推薦閱讀
- 哮喘患者自我管理手冊(cè)
- 陳衛(wèi)川中回醫(yī)臨證實(shí)錄方
- 視覺(jué)康復(fù)指南
- 顧嘉雄 張良圣醫(yī)案精華
- 甲狀腺疾病的核醫(yī)學(xué)診斷與治療
- 醫(yī)院醫(yī)療質(zhì)量標(biāo)準(zhǔn)化管理手冊(cè)
- 康復(fù)醫(yī)學(xué)(第2版)
- 國(guó)家兒童腫瘤監(jiān)測(cè)年報(bào)(2022)
- 急診分診指導(dǎo)手冊(cè)
- 腦癱兒童的音樂(lè)治療
- 與癌共舞
- 皮膚激光醫(yī)學(xué)原理及臨床應(yīng)用
- 針灸學(xué)基本概念術(shù)語(yǔ)通典(上下冊(cè))
- 細(xì)針穿刺細(xì)胞病理學(xué)
- 老魚(yú)頭的麻醉隨筆