Click here to Skip to main content
15,914,943 members
Home / Discussions / WPF
   

WPF

 
QuestionSimple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Manjeet patel22-Jul-11 3:15
Manjeet patel22-Jul-11 3:15 
AnswerRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Ian Shlasko22-Jul-11 3:37
Ian Shlasko22-Jul-11 3:37 
GeneralRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Manjeet patel22-Jul-11 3:48
Manjeet patel22-Jul-11 3:48 
AnswerRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Abhinav S22-Jul-11 4:05
Abhinav S22-Jul-11 4:05 
AnswerRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Richard MacCutchan22-Jul-11 4:25
mveRichard MacCutchan22-Jul-11 4:25 
QuestionScrolling in nested Listbox WPF Pin
Phantom1322-Jul-11 0:29
Phantom1322-Jul-11 0:29 
AnswerRe: Scrolling in nested Listbox WPF Pin
teejayem30-Jul-11 12:44
teejayem30-Jul-11 12:44 
QuestionSplash Screen in WPF Browser APP Pin
vonb21-Jul-11 1:21
vonb21-Jul-11 1:21 
Hi all,

My application is just fine and could work like it is now.

It would be nice to have a kind of "Wait Window" with a progress bar (optional).

So I did the following, and the wait window is showing and closing when I want it:

wndSave oWindow = null;

void oOrg_Save(object sender, SaveEventArgs e)
{
    this.isEnabled = false; //Disable main window
    this.Dispatcher.Invoke(new DispatcherOperationCallBack((param)=>
    {
       oWindow = new wndSave();  // Open splash in new thread (works)
       ...
       System.Threading.Thread oThread = new Thread(updWindow); //Thread for slow operation
       oThread.Start();
       wndSave.ShowDialog(); //This works, but the window remains blocked
       return null;
    }), DispatcherPriority.BackGround, new object[] { null });
}

//The callback method for saving thread
void updWindow()
{
    oWindow.Dispatcher.Invoke(new DispatcherOperationCallBack((param)=>
    { 
      foreach(myModel oModel in myView.Models)
      { 
        //Inserted a new thread here for the save and then updating the progress bar
        
       System.Threading.ParameterizedThreadStart oStart = new ParameterizedThreadStart(mySave); //Thread for slow operation
       System.Threading.Thread oNewThread = new Thread(oStart);
       oNewThread.Start(oModel);
       Action showMethod = new delegate()
       {
           oWindow.UpdateProgress();  //Updates the progressbar. In debug works, but the UI does nothing
       }
     }
     return null;
    }), DispatcherPriority.BackGround, new object[] { null });
}

//Called from oNewThread
void mySave(object State)
{
  myModel oModel = (MyModel)State;
  myModel.Save();
}


If anybody has a trick how to refresh the progressbar would be nice. It is not necessary to be able to move the window, but it would be nice also. Don't know if it is a XBAP problem.

Thank you very much.
AnswerRe: Splash Screen in WPF Browser APP Pin
vonb21-Jul-11 4:33
vonb21-Jul-11 4:33 
QuestionStyle.TargetType = Interface || abstract class Pin
ezazazel19-Jul-11 22:44
ezazazel19-Jul-11 22:44 
AnswerRe: Style.TargetType = Interface || abstract class Pin
Kunal Chowdhury «IN»20-Jul-11 0:23
professionalKunal Chowdhury «IN»20-Jul-11 0:23 
QuestionMVVM: Transfering data from ViewModel to Model, when and how ? [modified] Pin
Jean-Louis Leroy19-Jul-11 1:38
Jean-Louis Leroy19-Jul-11 1:38 
AnswerRe: MVVM: Transfering data from ViewModel to View, when and how ? Pin
Pete O'Hanlon19-Jul-11 1:45
mvePete O'Hanlon19-Jul-11 1:45 
AnswerRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Abhinav S20-Jul-11 0:42
Abhinav S20-Jul-11 0:42 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Jean-Louis Leroy20-Jul-11 0:51
Jean-Louis Leroy20-Jul-11 0:51 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
SledgeHammer0120-Jul-11 6:36
SledgeHammer0120-Jul-11 6:36 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Jean-Louis Leroy20-Jul-11 8:22
Jean-Louis Leroy20-Jul-11 8:22 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
SledgeHammer0120-Jul-11 8:43
SledgeHammer0120-Jul-11 8:43 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? [modified] Pin
Jean-Louis Leroy21-Jul-11 23:01
Jean-Louis Leroy21-Jul-11 23:01 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Jean-Louis Leroy21-Jul-11 23:20
Jean-Louis Leroy21-Jul-11 23:20 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Pete O'Hanlon21-Jul-11 23:29
mvePete O'Hanlon21-Jul-11 23:29 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Jean-Louis Leroy21-Jul-11 23:51
Jean-Louis Leroy21-Jul-11 23:51 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Pete O'Hanlon22-Jul-11 0:02
mvePete O'Hanlon22-Jul-11 0:02 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
SledgeHammer0122-Jul-11 6:39
SledgeHammer0122-Jul-11 6:39 
GeneralRe: MVVM: Transfering data from ViewModel to Model, when and how ? Pin
Sacha Barber22-Jul-11 11:27
Sacha Barber22-Jul-11 11:27 

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.