diff --git a/README-ja.md b/README-ja.md index 2ed4034..5db497d 100644 --- a/README-ja.md +++ b/README-ja.md @@ -450,7 +450,9 @@ public class Option * IconRadius * アイコンの角丸半径。 * IsEnabled - * セルを有効にするかどうか。無効にした場合はセル全体の色が薄くなり操作を受け付けなくなります。 + * セルを有効にするかどうか。無効にした場合はセル全体の色が薄くなり操作を受け付けなくなります。 +* IsVisible + * セルの表示・非表示 ### メソッド diff --git a/README.md b/README.md index 3416dba..9d9f732 100644 --- a/README.md +++ b/README.md @@ -448,6 +448,8 @@ public class Option * Icon corners radius. * IsEnabled * Whether a cell is enabled. If set to false, the entire cell color will turn translucent and the cell won't accept any operations. +* IsVisible + * Whether a cell is visible or not. ### Methods diff --git a/Sample/Sample/ViewModels/RowManipulationTemplateViewModel.cs b/Sample/Sample/ViewModels/RowManipulationTemplateViewModel.cs index 4a7ba5c..1b5cf12 100644 --- a/Sample/Sample/ViewModels/RowManipulationTemplateViewModel.cs +++ b/Sample/Sample/ViewModels/RowManipulationTemplateViewModel.cs @@ -5,6 +5,7 @@ using Reactive.Bindings; using Xamarin.Forms; using System.Linq; +using Prism.Mvvm; namespace Sample.ViewModels { @@ -44,6 +45,10 @@ public RowManipulationTemplateViewModel() case "Replace1": Settings[0][0] = CreateItem(); break; + case "ShowHide": + var item = Settings[0][1]; + item.IsVisible = !item.IsVisible; + break; case "AddSecFirst": Settings.Insert(0, CreateSection()); break; @@ -97,8 +102,13 @@ public class SettingsGroup:ObservableCollection public SettingsGroup(IList list) : base(list) { } } - public class SettingsSectionItem + public class SettingsSectionItem:BindableBase { public string Text { get; set; } + private bool _IsVisible = true; + public bool IsVisible{ + get => _IsVisible; + set => SetProperty(ref _IsVisible, value); + } } } diff --git a/Sample/Sample/Views/RowManipulation.xaml b/Sample/Sample/Views/RowManipulation.xaml index 0eb7333..e38a011 100644 --- a/Sample/Sample/Views/RowManipulation.xaml +++ b/Sample/Sample/Views/RowManipulation.xaml @@ -26,11 +26,12 @@