Esempio n. 1
0
        private void ButtonDecision_Click(object sender, RoutedEventArgs e)
        {
            NameValue info = ListBoxItem.SelectedItem as NameValue;

            if (info == null)
            {
                return;
            }
            ID = info.Value;
            Close();
        }
Esempio n. 2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     CreateItemList("");
     foreach (var item in ListBoxItem.Items)
     {
         NameValue info = item as NameValue;
         if (info.Value == ID)
         {
             ListBoxItem.SelectedItem = item;
             ListBoxItem.ScrollIntoView(item);
             break;
         }
     }
 }