Ejemplo n.º 1
0
 public override Android.Views.View GetSampleContent(Android.Content.Context context)
 {
     treeView                   = new SfTreeView(context, null);
     viewModel                  = new CountriesViewModel();
     treeView.Indentation       = 20;
     treeView.ExpanderWidth     = 40;
     treeView.ItemHeight        = 40;
     treeView.SelectionMode     = SelectionMode.Multiple;
     treeView.AutoExpandMode    = AutoExpandMode.RootNodesExpanded;
     treeView.ChildPropertyName = "States";
     treeView.ItemsSource       = viewModel.CountriesInfo;
     treeView.Adapter           = new SelectionAdapter();
     treeView.SelectedItems     = viewModel.SelectedCountries;
     return(treeView);
 }
Ejemplo n.º 2
0
 public TreeSelection()
 {
     treeView                   = new SfTreeView();
     viewModel                  = new CountriesViewModel();
     treeView.Indentation       = 20;
     treeView.ExpanderWidth     = 40;
     treeView.ItemHeight        = 40;
     treeView.SelectionMode     = SelectionMode.Multiple;
     treeView.AutoExpandMode    = AutoExpandMode.AllNodesExpanded;
     treeView.ChildPropertyName = "States";
     treeView.ItemsSource       = viewModel.CountriesInfo;
     treeView.Adapter           = new SelectionAdapter();
     treeView.SelectedItems     = viewModel.SelectedCountries;
     this.AddSubview(treeView);
     this.OptionView = option;
 }