コード例 #1
0
        public void createList()
        {
            Listbox.ItemsSource = factormap;
            Listbox.Width       = 500;
            KeyboardNavigation.SetTabNavigation(Listbox, KeyboardNavigationMode.Cycle);

            //Scroll to the bottom
            Listbox.SelectedIndex = Listbox.Items.Count - 1;
            Listbox.ScrollIntoView(Listbox.SelectedItem);
        }
コード例 #2
0
        private void AddBtn_Click(object sender, RoutedEventArgs e)
        {
            string tmp = txtBox.Text.ToLower().Title();

            PassableList.Add(tmp);
            txtBox.Text = String.Empty;
            Listbox.ScrollIntoView(PassableList[PassableList.Count() - 1]);

            using (StreamWriter write = new StreamWriter(@"..\..\Resources\wordPoolData.txt", true))
            {
                write.WriteLine(tmp);
            }
        }