Esempio n. 1
0
        private void SelectFirst()
        {
            if (SelectedItem != null)
            {
                return;
            }

            var first = ItemsView.OfType <SheetHandler>().FirstOrDefault();

            if (first != null)
            {
                SelectedItem = first;
            }
        }
Esempio n. 2
0
        public void Find(object value)
        {
            var stringValue = value.ToString();

            if (string.IsNullOrWhiteSpace(stringValue))
            {
                return;
            }

            var property = (PropertyAdapter <TViewModel>)propertiesView.CurrentItem;
            var item     = ItemsView.OfType <TViewModel>().FirstOrDefault(i => property.GetValue(i).ToString().StartsWith(stringValue,
                                                                                                                          StringComparison.CurrentCultureIgnoreCase));

            if (item != null)
            {
                ItemsView.MoveCurrentTo(item);
            }
        }