Someone on one of the forums got me started in updating a TextBlock control on demand by using a created version of DoEvents(), which isn't supported by WPF. It works, but doesn't update on the 2nd call. Can you not use a DoEvents() call twice? Before executing my 'Get_Removable_Drives()' the control is updated. When the drive list appears, the control is not updated (hidden). What else do I need to do?


void Get_Removable_Drives()
{
RemovableDrives RDwindow = new RemovableDrives();
RDwindow.ShowDialog();
}

public static void DoEvents()
{ Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Background,
new EmptyDelegate(delegate{}));
}

void Select_Click(object sender, RoutedEventArgs e)
{
TBStatus.Foreground = Brushes.Red;
TBStatus.Visibility = Visibility.Visible; // Puts 'Please Wait'

DoEvents();
Get_Removable_Drives();
TBStatus.Visibility = Visibility.Hidden; // Hides 'Please Wait'
DoEvents();
}