Hello i have a requirement of using progress bar in wpf in which i should associate the progress bar with my code , i.e., when i click an import button i have some if conditions and classes to be executed for that it is taking some time so i want a progress bar that shows my user how much percent have been completed please help my query looking for genuine help.
{
Microsoft.Win32.OpenFileDialog selectExcel = new Microsoft.Win32.OpenFileDialog();
selectExcel.Filter = "Excel Files|*.xlsm";
MSAccessOperations accessOperations = new MSAccessOperations();
Nullable<bool> result = selectExcel.ShowDialog();
if (result == true)
{
string excelFilename = selectExcel.FileName;
// Here i want to start my progress bar
if (excelFilename.Contains("NHE PLUS File"))
accessOperations.ReadNHEXlsmFile(excelFilename);
else if (excelFilename.Contains("Total Build File"))
accessOperations.ReadTBXlsmFile(excelFilename);
// Here i want to complete the progress bar
}