private void OnLoaded(object sender, object e)
        {
            IList<string> pictures = Helpers.GetPicturePaths();
            PropertyInfo[] props = typeof(Brushes).GetProperties();

            List<object> data = new List<object>(17);

            data.Add(new UI());

            for (int i = 0; i < Math.Min(pictures.Count, 8); i++)
            {
                data.Add(new Picture(pictures[i]));
            }

            for (int i = 0; i < Math.Min(props.Length, 8); i++)
            {
                if (props[i].Name != "Transparent")
                {
                    data.Add(new Swatch(props[i].Name));
                }
            }

            this.DataContext = _data.ItemsSource = data;

            // Setup 2 way transitions
            Transition[] transitions = (Transition[])FindResource("ForwardBackTransitions");

            for (int i = 0; i < transitions.Length; i += 2)
            {
                ListTransitionSelector selector = new ListTransitionSelector(transitions[i], transitions[i + 1], data);
                TextSearch.SetText(selector, TextSearch.GetText(transitions[i]));
                _selectors.Items.Add(selector);
            }
        }
        private void OnLoaded(object sender, object e)
        {
            IList <string> pictures = Helpers.GetPicturePaths();

            PropertyInfo[] props = typeof(Brushes).GetProperties();

            List <object> data = new List <object>(17);

            data.Add(new UI());

            for (int i = 0; i < Math.Min(pictures.Count, 8); i++)
            {
                data.Add(new Picture(pictures[i]));
            }

            for (int i = 0; i < Math.Min(props.Length, 8); i++)
            {
                if (props[i].Name != "Transparent")
                {
                    data.Add(new Swatch(props[i].Name));
                }
            }

            this.DataContext = _data.ItemsSource = data;


            // Setup 2 way transitions
            Transition[] transitions = (Transition[])FindResource("ForwardBackTransitions");

            for (int i = 0; i < transitions.Length; i += 2)
            {
                ListTransitionSelector selector = new ListTransitionSelector(transitions[i], transitions[i + 1], data);
                TextSearch.SetText(selector, TextSearch.GetText(transitions[i]));
                _selectors.Items.Add(selector);
            }
        }