@@ -17,7 +17,7 @@ public class SegmentedView : View, ISegmentedView, IFontElement
1717 #region Bindable Definitions
1818
1919 public static readonly BindableProperty ItemsSourceProperty = BindableProperty . Create ( nameof ( ItemsSource ) , typeof ( IEnumerable ) , typeof ( SegmentedView ) , propertyChanged : ( bindable , value , newValue ) => ( ( SegmentedView ) bindable ) . OnItemsSourceChanged ( ( IEnumerable ? ) value , ( IEnumerable ? ) newValue ) ) ;
20- public static readonly BindableProperty TextPropertyNameProperty = BindableProperty . Create ( nameof ( TextPropertyName ) , typeof ( string ) , typeof ( SegmentedView ) ) ;
20+ // public static readonly BindableProperty TextPropertyNameProperty = BindableProperty.Create(nameof(TextPropertyName), typeof(string), typeof(SegmentedView));
2121 public static readonly BindableProperty TextConverterProperty = BindableProperty . Create ( nameof ( TextConverter ) , typeof ( IValueConverter ) , typeof ( SegmentedView ) ) ;
2222 public static readonly BindableProperty SelectedBackgroundColorProperty = BindableProperty . Create ( nameof ( SelectedBackgroundColor ) , typeof ( Color ) , typeof ( SegmentedView ) , Colors . Blue ) ;
2323 public static readonly BindableProperty TextColorProperty = BindableProperty . Create ( nameof ( TextColor ) , typeof ( Color ) , typeof ( SegmentedView ) , Colors . Black ) ;
@@ -28,7 +28,7 @@ public class SegmentedView : View, ISegmentedView, IFontElement
2828
2929 #region Font
3030
31- public static readonly BindableProperty FontFamilyProperty = BindableProperty . Create ( nameof ( FontFamily ) , typeof ( string ) , typeof ( IFontElement ) , default ( string ) , propertyChanged : OnFontFamilyChanged ) ;
31+ public static readonly BindableProperty FontFamilyProperty = BindableProperty . Create ( nameof ( FontFamily ) , typeof ( string ) , typeof ( IFontElement ) , propertyChanged : OnFontFamilyChanged ) ;
3232 public static readonly BindableProperty FontSizeProperty = BindableProperty . Create ( nameof ( FontSize ) , typeof ( double ) , typeof ( IFontElement ) , 0d , propertyChanged : OnFontSizeChanged , defaultValueCreator : FontSizeDefaultValueCreator ) ;
3333 public static readonly BindableProperty FontAttributesProperty = BindableProperty . Create ( nameof ( FontAttributes ) , typeof ( FontAttributes ) , typeof ( IFontElement ) , FontAttributes . None , propertyChanged : OnFontAttributesChanged ) ;
3434 public static readonly BindableProperty FontAutoScalingEnabledProperty = BindableProperty . Create ( nameof ( FontAutoScalingEnabled ) , typeof ( bool ) , typeof ( IFontElement ) , true , propertyChanged : OnFontAutoScalingEnabledChanged ) ;
@@ -61,7 +61,7 @@ public class SegmentedView : View, ISegmentedView, IFontElement
6161
6262 //if (DesignMode.IsDesignModeEnabled)
6363 [ EditorBrowsable ( EditorBrowsableState . Never ) ]
64- public ObservableCollection < Segment > Children { get ; } = new ( ) ;
64+ public ObservableCollection < Segment > Children { get ; } = [ ] ;
6565
6666 #region Bindables Properties
6767
@@ -72,7 +72,7 @@ public class SegmentedView : View, ISegmentedView, IFontElement
7272 /// </summary>
7373 public IEnumerable ? ItemsSource { get => ( IEnumerable ? ) GetValue ( ItemsSourceProperty ) ; set => SetValue ( ItemsSourceProperty , value ) ; }
7474
75- public string ? TextPropertyName { get => ( string ? ) GetValue ( TextPropertyNameProperty ) ; set => SetValue ( TextPropertyNameProperty , value ) ; }
75+ // public string? TextPropertyName { get => (string?)GetValue(TextPropertyNameProperty); set => SetValue(TextPropertyNameProperty, value); }
7676 public IValueConverter ? TextConverter { get => ( IValueConverter ? ) GetValue ( TextConverterProperty ) ; set => SetValue ( TextConverterProperty , value ) ; }
7777
7878 /// <summary>
0 commit comments