
<StackLayout> <StackLayout HorizontalOptions="FillAndExpand" padding="{x:Static local:Styles.LabelBeforeEntrypadding}"> <Label Text="{Binding LabelPasswort2}" HorizontalOptions="{x:Static local:Styles.LabelHorizontalOptions}" Textcolor="{x:Static local:Styles.RegistrationPageTextcolor}" /> </StackLayout> <custom:StrypeEntry Text="{Binding Passwort2}" IsPassword="true" IsEnabled="{Binding ControlsEnabled}" HorizontalOptions="FillAndExpand" /></StackLayout><!--Newsletter--><StackLayout OrIEntation="Horizontal" HorizontalOptions="StartAndExpand"> <Switch IsToggled="{Binding Newsletter}" IsEnabled="{Binding ControlsEnabled}" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand" /> <Label Text="{Binding LabelNewsletter}" VerticalOptions="CenterandExpand" HorizontalOptions="Start" Textcolor="{x:Static local:Styles.RegistrationPageTextcolor}" /></StackLayout><!--Datenschutz--><StackLayout OrIEntation="Horizontal" HorizontalOptions="StartAndExpand"> <custom:StrypeSwitch IsToggled="{Binding Privacy}" IsEnabled="{Binding ControlsEnabled}" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand" /> <Label Text="{Binding LabelPrivacy}" VerticalOptions="CenterandExpand" HorizontalOptions="Start" WIDthRequest="300" Textcolor="{x:Static local:Styles.RegistrationPageTextcolor}" /></StackLayout> 问题是,在显示表单时,开关不可见,它们仅在条目聚焦时才可见.
StrypeEntry只是一个带有border Corder的自定义条目和一个大写的道具,没有任何花哨的东西,而且为了切换我做了一个自定义渲染器来修复不显示的问题.
我已经尝试了buttonText Alignment的修复,但没有帮助(Xamarin.Forms: wrong button text alignment after click (Android))
我也尝试过这个
public overrIDe voID ChildDrawableStateChanged(VIEw child){ base.ChildDrawableStateChanged(child); Control.Text = Control.Text; Control.Checked = Control.Checked;} 但仍无法解决
(我正在使用AndroID 4.4.2测试GT-I9505.Xamarin.Forms程序集的版本是1.2.2.0)
请帮我,
谢谢
我通过在xaml中向Switch添加Height-和WIDthRequest来修复此问题
希望这有助于其他人.
也许如果您找到更好的解决方案,请告诉我.
问候〜
总结以上是内存溢出为你收集整理的在选择Entry Control之前,Xamarin.Forms Switch Control在Android上不可见全部内容,希望文章能够帮你解决在选择Entry Control之前,Xamarin.Forms Switch Control在Android上不可见所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)