【发布时间】:2017-06-05 06:10:09
【问题描述】:
<cv:BindableComboBox ItemsSource="{Binding Themes}" SelectedValue="{Binding SelectedTheme}">
<cv:BindableComboBox.Title>
<OnPlatform x:TypeArguments="x:String"
iOS="{Binding ThemePickerTitle}"
Android="{Binding ThemePickerTitle}"/>
</cv:BindableComboBox.Title>
</cv:BindableComboBox>
所以我有选择器,我想将它的标题绑定到 ThemePickerTitle 属性。 如果我将它写为内联属性,它会很好地工作。但我不想在 Windows 上有标题。所以我写了 OnPlatform 让它只在 Ios 和 Droid 上运行,但现在它可以编译了。
【问题讨论】:
-
我觉得typeArgument应该不一样,但是不知道应该是什么
标签: c# xaml xamarin binding xamarin.forms