Skip to content

Commit

Permalink
When the nuget package was created, the new select list elements were…
Browse files Browse the repository at this point in the history
… not visible.
  • Loading branch information
sebarslan committed Dec 27, 2024
1 parent dfc122e commit ad72c9b
Showing 1 changed file with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ public NullableDateTimePickerSelectList()

_collectionView = new CollectionView
{
ItemsLayout = new GridItemsLayout(3, ItemsLayoutOrientation.Vertical),
ItemsLayout = new GridItemsLayout(3, ItemsLayoutOrientation.Vertical)
{
HorizontalItemSpacing = 2,
VerticalItemSpacing = 2
},
SelectionMode = SelectionMode.Single,
HorizontalOptions = LayoutOptions.Fill,
VerticalOptions = LayoutOptions.Fill,
Expand All @@ -90,24 +94,30 @@ public NullableDateTimePickerSelectList()
{
var label = new Label
{
TextColor = TextColor,
TextColor = Colors.Black,
FontSize = 12,
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Fill,
HorizontalOptions = LayoutOptions.Fill,
FontAttributes = FontAttributes.Bold,
BackgroundColor = Colors.Transparent,
Background = Colors.Transparent
VerticalTextAlignment = TextAlignment.Center,
HorizontalTextAlignment = TextAlignment.Center,
Padding = 0,
Margin = 0
};

label.SetBinding(Label.TextProperty, new Binding(ItemDisplayBinding ?? ".", source: label.BindingContext));
label.SetBinding(Label.TextProperty, new Binding(ItemDisplayBinding ?? "."));

var border = new Border
{
StrokeShape = new RoundRectangle
{
CornerRadius = new CornerRadius(5, 5, 5, 5)
},
Margin = 2,
Margin = 0,
Padding = 5,
VerticalOptions = LayoutOptions.Fill,
HorizontalOptions = LayoutOptions.Fill,
Content = label
};

Expand Down

0 comments on commit ad72c9b

Please sign in to comment.