Click here to Skip to main content
15,916,846 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF application using MVP(model view presenter) design pattern Pin
Member 400910216-Feb-09 23:48
Member 400910216-Feb-09 23:48 
AnswerRe: WPF application using MVP(model view presenter) design pattern Pin
Pete O'Hanlon16-Feb-09 23:51
mvePete O'Hanlon16-Feb-09 23:51 
AnswerRe: WPF application using MVP(model view presenter) design pattern Pin
Jani Giannoudis17-Feb-09 6:40
mvaJani Giannoudis17-Feb-09 6:40 
QuestionUpdating only visible rows in WPF ListView Pin
Pankaj Chamria16-Feb-09 21:43
Pankaj Chamria16-Feb-09 21:43 
AnswerRe: Updating only visible rows in WPF ListView Pin
Pete O'Hanlon17-Feb-09 0:36
mvePete O'Hanlon17-Feb-09 0:36 
GeneralRe: Updating only visible rows in WPF ListView Pin
Pankaj Chamria18-Feb-09 2:29
Pankaj Chamria18-Feb-09 2:29 
GeneralRe: Updating only visible rows in WPF ListView Pin
Pete O'Hanlon18-Feb-09 2:44
mvePete O'Hanlon18-Feb-09 2:44 
GeneralRe: Updating only visible rows in WPF ListView Pin
Pankaj Chamria18-Feb-09 4:09
Pankaj Chamria18-Feb-09 4:09 
GeneralRe: Updating only visible rows in WPF ListView Pin
Pete O'Hanlon18-Feb-09 4:47
mvePete O'Hanlon18-Feb-09 4:47 
GeneralRe: Updating only visible rows in WPF ListView Pin
Pankaj Chamria22-Feb-09 21:48
Pankaj Chamria22-Feb-09 21:48 
QuestionRe: Updating only visible rows in WPF ListView Pin
Kunal Chowdhury «IN»13-May-09 0:48
professionalKunal Chowdhury «IN»13-May-09 0:48 
AnswerRe: Updating only visible rows in WPF ListView Pin
Pete O'Hanlon13-May-09 1:35
mvePete O'Hanlon13-May-09 1:35 
QuestionRe: Updating only visible rows in WPF ListView Pin
Kunal Chowdhury «IN»13-May-09 1:45
professionalKunal Chowdhury «IN»13-May-09 1:45 
AnswerRe: Updating only visible rows in WPF ListView Pin
Pete O'Hanlon13-May-09 1:55
mvePete O'Hanlon13-May-09 1:55 
GeneralRe: Updating only visible rows in WPF ListView Pin
Kunal Chowdhury «IN»13-May-09 2:06
professionalKunal Chowdhury «IN»13-May-09 2:06 
GeneralRe: Updating only visible rows in WPF ListView Pin
Pankaj Chamria13-May-09 22:22
Pankaj Chamria13-May-09 22:22 
GeneralRe: Updating only visible rows in WPF ListView Pin
Kunal Chowdhury «IN»14-May-09 2:48
professionalKunal Chowdhury «IN»14-May-09 2:48 
GeneralRe: Updating only visible rows in WPF ListView Pin
Pete O'Hanlon14-May-09 4:57
mvePete O'Hanlon14-May-09 4:57 
GeneralRe: Updating only visible rows in WPF ListView Pin
Kunal Chowdhury «IN»14-May-09 21:02
professionalKunal Chowdhury «IN»14-May-09 21:02 
QuestionWPF, Delegates, The calling thread cannot access this object because a different thread owns it Pin
frosty_4th16-Feb-09 16:00
frosty_4th16-Feb-09 16:00 
AnswerRe: WPF, Delegates, The calling thread cannot access this object because a different thread owns it Pin
ABitSmart16-Feb-09 16:36
ABitSmart16-Feb-09 16:36 
frosty_4th wrote:
"The calling thread cannot access this object because a different thread owns it"

You are trying to access the UI from a non-UI thread.

In WPF, you need to use the Dispatcher for cross-thread UI interactions.MSDN[^]

e.g.,
public void Test()
        {
            Button theButton = button1 as Button;

            if (theButton != null)
            {
                // Checking if this thread has access to the object.
                if (theButton.Dispatcher.CheckAccess())
                {
                    // This thread has access so it can update the UI thread.      
                    theButton.Content = "Hello";
                }
                else
                {
                    // This thread does not have access to the UI thread.
                    // Place the update method on the Dispatcher of the UI thread.
                    theButton.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                        (Action)(() => { theButton.Content = "Hello"; }));
                }
            }  
        }

GeneralRe: WPF, Delegates, The calling thread cannot access this object because a different thread owns it Pin
Pete O'Hanlon16-Feb-09 22:25
mvePete O'Hanlon16-Feb-09 22:25 
GeneralRe: WPF, Delegates, The calling thread cannot access this object because a different thread owns it Pin
frosty_4th16-Feb-09 23:41
frosty_4th16-Feb-09 23:41 
GeneralRe: WPF, Delegates, The calling thread cannot access this object because a different thread owns it Pin
Pete O'Hanlon16-Feb-09 23:49
mvePete O'Hanlon16-Feb-09 23:49 
GeneralRe: WPF, Delegates, The calling thread cannot access this object because a different thread owns it Pin
gvijaianandmca30-Sep-09 1:10
gvijaianandmca30-Sep-09 1:10 

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.