コード例 #1
0
 /// <summary>
 /// Ons the element property changed.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     base.OnElementPropertyChanged(sender, e);
     if (e.PropertyName == SettingsView.SeparatorColorProperty.PropertyName)
     {
         _adapter.NotifyDataSetChanged();
     }
     else if (e.PropertyName == SettingsView.BackgroundColorProperty.PropertyName)
     {
         UpdateBackgroundColor();
     }
     else if (e.PropertyName == TableView.RowHeightProperty.PropertyName)
     {
         UpdateRowHeight();
     }
     else if (e.PropertyName == SettingsView.UseDescriptionAsValueProperty.PropertyName)
     {
         _adapter.NotifyDataSetChanged();
     }
     else if (e.PropertyName == SettingsView.SelectedColorProperty.PropertyName)
     {
         UpdateSelectedColor();
     }
     else if (e.PropertyName == SettingsView.ShowSectionTopBottomBorderProperty.PropertyName)
     {
         _adapter.NotifyDataSetChanged();
     }
     else if (e.PropertyName == TableView.HasUnevenRowsProperty.PropertyName)
     {
         _adapter.NotifyDataSetChanged();
     }
 }
コード例 #2
0
 void UpdateRowHeight()
 {
     if (Element.RowHeight == -1)
     {
         Element.RowHeight = 60;
     }
     else
     {
         _adapter?.NotifyDataSetChanged();
     }
 }