示例#1
0
        private void ButtonDecision_Click(object sender, RoutedEventArgs e)
        {
            NameValueInfo info = ListBoxItem.SelectedItem as NameValueInfo;

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