public MainWindow() { InitializeComponent(); SelectionBehavior.Attach(innerCanvas); //ThemeManager.Theme = ColorThemes.DarkBlue; tb.Text = ThemeManager.Theme.ToString(); }
public void Create() { var view = new ListView(); var src = new SelectionBehavior(); src.Attach(view); src.Detach(); }
public void Properties() => Create(vm => { var view = new ListView { DataContext = vm }; var src = new SelectionBehavior(); src.Attach(view); Assert.That(src.Popup, Is.False); src.Detach(); });
public void Create() { var view = new ListView(); var src = new SelectionBehavior(); src.Attach(view); Assert.That(src.Popup, Is.False); src.Popup = true; Assert.That(src.Popup, Is.True); src.Detach(); }
/// <summary> /// Initializes a new instance of the <see cref="ExtendedListView"/> class. /// </summary> public ExtendedListView() { // Creating the rows collection. this.Rows = new RowsCollection(this); // Creating the models. this.SelectionModel = new SelectionModel(this); this.CheckModel = new CheckModel(); this.ExpandModel = new ExpandModel(this); // Creating the behaviors. this.mSelectionBehavior = new SelectionBehavior(this); this.mExpandBehavior = new ExpandBehavior(this); this.mColumnResizeBehavior = new ColumnResizeBehavior(this); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.Inflate(Resource.Layout.fragment_list_view_example, container, false); this.listView = (RadListView) rootView.FindViewById(Resource.Id.listView).JavaCast<RadListView>(); SelectionBehavior sb = new SelectionBehavior(); for (int i = 0; i < 50; i++) { source.Add("Item " + i); } this.listView.AddBehavior(sb); this.listView.SetAdapter(new MyListViewAdapter(source)); return rootView; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.Inflate(Resource.Layout.fragment_list_view_example, container, false); this.listView = (RadListView)rootView.FindViewById(Resource.Id.listView).JavaCast <RadListView>(); SelectionBehavior sb = new SelectionBehavior(); for (int i = 0; i < 50; i++) { source.Add("Item " + i); } this.listView.AddBehavior(sb); this.listView.SetAdapter(new MyListViewAdapter(source)); return(rootView); }
public void SetSelectionBehavior(SelectionBehavior behavior) { this.behavior = behavior; }
public void SelectProject(FileChangeProject proj, SelectionBehavior bhav) { switch (bhav) { case SelectionBehavior.AppendToggle: // append project selection, keep all just toggle this one if (proj != null) { proj.Selected = !proj.Selected; } break; case SelectionBehavior.Append: // append project selection, keep all just toggle this one if (proj != null) { proj.Selected = true; } break; case SelectionBehavior.Unselect: _unselectAllProjects(); break; case SelectionBehavior.SelectOnly: _unselectAllProjects(); if (proj != null) { proj.Selected = true; } break; case SelectionBehavior.UnselectOnToggle: if (proj != null) { // count visible, selected projects int nVisSel = this.ProjectCollection.Sum(p => p.Visible && p.Selected ? 1 : 0); bool pState = proj.Selected; // unselect all others _unselectAllProjects(); // > 1 project selected ? project selected : toggle project proj.Selected = nVisSel > 1 ? true : !pState; } else { _unselectAllProjects(); } break; case SelectionBehavior.UnselectToggle: if (proj != null) { // unselect others bool pState = proj.Selected; _unselectAllProjects(); // toggle proj proj.Selected = !pState; } else { _unselectAllProjects(); } break; } }
public PathFilterBase(UInt64 indiceOrd, SelectionBehavior selectionBehavior, string regex) //: base(tipoRegex: tipoRegex, regex: regex) { //Costruttore principale this.IndiceOrd = indiceOrd; this.SelectionBehavior = selectionBehavior; //this.TipoAnalisi = tipoAnalisi; }
void Start() { selectionBehavior = transform.GetComponent<SelectionBehavior>(); ActiveScrolling = ControllerToggleType.Equals(ControllerType.RealTimeStratToggle) && EnableMouseScroll; }
public void SetSelectionBehavior(SelectionBehavior behavior) => selection?.SetSelectionBehavior(behavior);