Click here to Skip to main content
15,889,335 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Basic WPF binding to collection in combobox. Pin
Pete O'Hanlon10-Aug-16 21:21
mvePete O'Hanlon10-Aug-16 21:21 
GeneralRe: Basic WPF binding to collection in combobox. Pin
Mycroft Holmes10-Aug-16 17:01
professionalMycroft Holmes10-Aug-16 17:01 
Questionwpf gridview does not have a row selected event Pin
Stephen Holdorf9-Aug-16 4:26
Stephen Holdorf9-Aug-16 4:26 
AnswerRe: wpf gridview does not have a row selected event Pin
Richard Deeming9-Aug-16 5:10
mveRichard Deeming9-Aug-16 5:10 
GeneralRe: wpf gridview does not have a row selected event Pin
Stephen Holdorf9-Aug-16 9:57
Stephen Holdorf9-Aug-16 9:57 
GeneralRe: wpf gridview does not have a row selected event Pin
Richard Deeming9-Aug-16 10:09
mveRichard Deeming9-Aug-16 10:09 
GeneralRe: wpf gridview does not have a row selected event Pin
Stephen Holdorf10-Aug-16 2:24
Stephen Holdorf10-Aug-16 2:24 
QuestionCopy directory with progress bar in WPF Pin
Dadou557-Aug-16 20:12
Dadou557-Aug-16 20:12 
Hi,

I'm coding a little application for my company, the idea is very simple:

I would like to copy a directory from a server location to a local folder and I want to show the progress by using a progress bar.

I already integrated the copy of the directory by using this code:

C#
using System;
using System.IO;

class DirectoryCopyExample {
    static void Main() {
        // Copy from the current directory, include subdirectories.
        DirectoryCopy(".", @".\temp", true);
    }

    private static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs) {
        // Get the subdirectories for the specified directory.
        DirectoryInfo dir = new DirectoryInfo(sourceDirName);

        if (!dir.Exists) {
            throw new DirectoryNotFoundException("Source directory does not exist or could not be found: " + sourceDirName);
        }

        DirectoryInfo[] dirs = dir.GetDirectories();
        // If the destination directory doesn't exist, create it.
        if (!Directory.Exists(destDirName)) {
            Directory.CreateDirectory(destDirName);
        }

        // Get the files in the directory and copy them to the new location.
        FileInfo[] files = dir.GetFiles();
        foreach(FileInfo file in files) {
            string temppath = Path.Combine(destDirName, file.Name);
            file.CopyTo(temppath, false);
        }

        // If copying subdirectories, copy them and their contents to new location.
        if (copySubDirs) {
            foreach(DirectoryInfo subdir in dirs) {
                string temppath = Path.Combine(destDirName, subdir.Name);
                DirectoryCopy(subdir.FullName, temppath, copySubDirs);
            }
        }
    }
}


For the integration of the progress bar according to the number of files/sizes I can't find anything

Can someone help me with this?

Thank you!
AnswerRe: Copy directory with progress bar in WPF Pin
Richard MacCutchan7-Aug-16 21:14
mveRichard MacCutchan7-Aug-16 21:14 
GeneralRe: Copy directory with progress bar in WPF Pin
Dadou557-Aug-16 21:50
Dadou557-Aug-16 21:50 
GeneralRe: Copy directory with progress bar in WPF Pin
Pete O'Hanlon7-Aug-16 22:06
mvePete O'Hanlon7-Aug-16 22:06 
GeneralRe: Copy directory with progress bar in WPF Pin
Dadou557-Aug-16 22:38
Dadou557-Aug-16 22:38 
GeneralRe: Copy directory with progress bar in WPF Pin
Pete O'Hanlon7-Aug-16 22:46
mvePete O'Hanlon7-Aug-16 22:46 
QuestionExecuting a WPF .exe program from an email link Pin
Stephen Holdorf5-Aug-16 8:07
Stephen Holdorf5-Aug-16 8:07 
AnswerRe: Executing a WPF .exe program from an email link Pin
Richard Deeming5-Aug-16 8:26
mveRichard Deeming5-Aug-16 8:26 
AnswerRe: Executing a WPF .exe program from an email link Pin
Stephen Holdorf5-Aug-16 9:40
Stephen Holdorf5-Aug-16 9:40 
GeneralRe: Executing a WPF .exe program from an email link Pin
Dave Kreskowiak5-Aug-16 9:45
mveDave Kreskowiak5-Aug-16 9:45 
AnswerRe: Executing a WPF .exe program from an email link Pin
Richard MacCutchan5-Aug-16 20:42
mveRichard MacCutchan5-Aug-16 20:42 
AnswerRe: Executing a WPF .exe program from an email link Pin
Gerry Schmitz6-Aug-16 7:07
mveGerry Schmitz6-Aug-16 7:07 
GeneralRe: Executing a WPF .exe program from an email link Pin
Stephen Holdorf7-Aug-16 11:26
Stephen Holdorf7-Aug-16 11:26 
GeneralRe: Executing a WPF .exe program from an email link Pin
Gerry Schmitz7-Aug-16 12:16
mveGerry Schmitz7-Aug-16 12:16 
QuestionResourceDictionary swapped at run-time only applies to MainWindow Pin
Imagiv5-Aug-16 6:51
Imagiv5-Aug-16 6:51 
AnswerRe: ResourceDictionary swapped at run-time only applies to MainWindow Pin
Richard Deeming5-Aug-16 7:02
mveRichard Deeming5-Aug-16 7:02 
GeneralRe: ResourceDictionary swapped at run-time only applies to MainWindow Pin
Imagiv5-Aug-16 7:18
Imagiv5-Aug-16 7:18 
QuestionKeepTextBoxDisplaySynchronizedWithTextProperty Pin
Kevin Marois28-Jul-16 7:18
professionalKevin Marois28-Jul-16 7:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.