עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

הכנסת כמה קבצים בחד לתוך Listbox עם WPF

Featured Replies

פורסם

יש לי תוכנה שאני בוחר לתוך Listbox את הקבצים שלי, הגדרתי Multiselect בקוד שאני אוכל לבחור יותר מקובץ אחד ו-SelectionMode="Multiple" ב-XAML ועדיין כשאני בוחר יותר מקובץ אחד רק קובץ אחד נכנס לי לתוך ה- Listbox

זה הקוד שלי:


Stream checkStream = null;
Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog();
openFileDialog.Multiselect = true;
openFileDialog.InitialDirectory = "c:\\";
openFileDialog.Filter = ""All files (*.*)|*.*";
openFileDialog.FilterIndex = 1;
openFileDialog.Title = "Please Select Source File";


if ((bool)openFileDialog.ShowDialog())
{
try
{
if ((checkStream = openFileDialog.OpenFile()) != null)
{

listBoxFiles.Items.Add(openFileDialog.FileName);
}
}
catch (Exception ex)
{
MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
}
}

עריכה:

הסתדרתי אבל יש לי שאלה אחרת, בתמונה המצורפת יש 2 חלונות שנפתחים עלמנת לבחור קובץ אל תוך ה-Listbox שלי, העליונה היא מה שיש לי בתוכנה עם ה-WPF והתחתונה זה מה שיצא לי עם Winform,עכשיו מה שאני רוצה זה חלון כמו החלון התחתון כי שם יש לי גם אפשרות לעשות חיפוש בצד הימני העליון וככה כבר לבחור קבצים מכל המחשב\כונן.

יש אפשרות לשנות את החלון שלי לזה התחתון ?

b575ff177434977.jpg

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.