Esempio n. 1
0
        public MainPage()
        {
            this.InitializeComponent();
            Icons = new List <Icon>();

            Icons.Add(new Icon {
                IconPath = "Assets/male-01.png"
            });
            Icons.Add(new Icon {
                IconPath = "Assets/male-02.png"
            });
            Icons.Add(new Icon {
                IconPath = "Assets/male-03.png"
            });
            Icons.Add(new Icon {
                IconPath = "Assets/female-01.png"
            });
            Icons.Add(new Icon {
                IconPath = "Assets/female-02.png"
            });
            Icons.Add(new Icon {
                IconPath = "Assets/female-03.png"
            });

            Contact = new ObservableCollection2 <Contact>();
            Contact.Add(new Contact {
                FirstName = " Van Vu", LastName = "Ha", AvatarPath = "Assets/female-01.png"
            });
            Contact.Add(new Contact {
                FirstName = " Tung Lam", LastName = "Pham", AvatarPath = "Assets/female-01.png"
            });
        }
Esempio n. 2
0
        public void Sort_observable_collection()
        {
            var table = new VirtualTable(new TemplateManager <Tuple <string> >(
                                             () => Row.Headers(new Header("Тест").Sortable("Item1")),
                                             x => Row.Cells(x.Item1)));

            table.RegisterBehavior(new SortInList());

            var list = new ObservableCollection2 <Tuple <string> >(Enumerable.Range(0, 10).Select(x => Tuple.Create(x.ToString())).ToList());

            table.TemplateManager.Source = list;
            table.Behavior <SortBehavior>().SortBy("Item1");
        }