Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149612 | Dec 3,2019 08:46 AM UTC | Jan 23,2020 01:59 PM UTC | Xamarin.Forms | 19 |
![]() |
Tags: SfPicker |
this.OnColumnLoaded += CustomDatePicker_OnColumnLoaded;
…
private void CustomDatePicker_OnColumnLoaded(object sender, ColumnLoadedEventArgs e)
{
if (e.Column == 0)
{
e.ColumnWidth = 75;
}
else if(e.Column == 1)
{
e.ColumnWidth = 150;
}
else
{
e.ColumnWidth = 75;
}
} |
<ContentPage.Resources>
<ResourceDictionary>
<OnPlatform x:TypeArguments="x:String" x:Key="customFonts" iOS="Nexa Bold"/>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout Padding="50">
<!-- Place new controls here -->
<Label Text="SfPicker Demo" x:Name="label" FontFamily="{StaticResource customFonts}" />
<syncfusion:SfPicker x:Name="SfPicker1"
SelectedItemFontFamily="{StaticResource customFonts}"
UnSelectedItemFontFamily="{StaticResource customFonts}" />
</StackLayout> |
<picker:SfPicker x:Name="picker"
ItemsSource="{Binding Colors}"
HeaderText="Select a Color"
SelectedIndex="1"
UnSelectedItemTextColor="Gray"
SelectedItemTextColor="Red"
SelectionChanged="Picker_SelectionChanged" >
<picker:SfPicker.ItemTemplate>
<DataTemplate>
<StackLayout>
<Label Text="{Binding Name}" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="{Binding ColorValue}"/>
</StackLayout>
</DataTemplate>
</picker:SfPicker.ItemTemplate>
</picker:SfPicker> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.