Click here to Skip to main content
15,887,333 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Using WPF C# dll in vc++ Pin
dan!sh 3-Dec-09 19:21
professional dan!sh 3-Dec-09 19:21 
QuestionAccess to a public object on a mainpage from a navigation page Pin
javi.ys2-Dec-09 12:24
javi.ys2-Dec-09 12:24 
AnswerRe: Access to a public object on a mainpage from a navigation page Pin
Mark Salsbery2-Dec-09 17:53
Mark Salsbery2-Dec-09 17:53 
GeneralRe: Access to a public object on a mainpage from a navigation page Pin
javi.ys2-Dec-09 21:37
javi.ys2-Dec-09 21:37 
GeneralRe: Access to a public object on a mainpage from a navigation page Pin
Mark Salsbery3-Dec-09 6:38
Mark Salsbery3-Dec-09 6:38 
QuestionMessage Removed Pin
2-Dec-09 3:56
professionalN_tro_P2-Dec-09 3:56 
QuestionHttpWebRequest in Silverlight Application Pin
Thi**012-Dec-09 3:20
Thi**012-Dec-09 3:20 
AnswerRe: HttpWebRequest in Silverlight Application Pin
Mark Salsbery2-Dec-09 8:51
Mark Salsbery2-Dec-09 8:51 
First - your URI @"C:\Dokumente und Einstellungen\THI\Desktop\stage2.xml"
is not going to work. Silverlight runs on the client and does not allow
direct access to the client's file system without asking the user first,
using the OpenFileDialog class.

The XmlReader.Create() method that takes a URI string only works for files
packaged in the Silverlight application's XAP file.

If the XML file you need to open is on the client's computer, you
need to use OpenFileDialog, not HttpWebRequest.


So where is the XML file you need to load?



Thi**01 wrote:
I dont understand how to write the RequestState class and i dont understand what is: allDone.WaitOne() or allDone.Set()


All web requests in Silverlight are asynchronous. That means
the request is sent, processing continues, and at some later time
when a reply is received, the app is notified.

The example code you linked to uses an EventWaitHandle to wait
on the requesting thread until the reply is received, then continues
processing, essentially making the web request synchronous. IMO
it's a bad example - a reply could take many seconds, so if the
request is made on the UI thread, you've halted the UI thread,
which could lead to a bad user experience.

allDone is an EventWaitHandle or one of its derived classes, so if
you're new to threading, you may want to look at that documentation.

The RequestState can be anything you want - an existing object of any
class. Its purpose is to allow you to pass something across the asynchrounous
call. Whatever object you pass in the request will be available to you in the
reply.

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerRe: HttpWebRequest in Silverlight Application Pin
Abhinav S2-Dec-09 23:44
Abhinav S2-Dec-09 23:44 
GeneralRe: HttpWebRequest in Silverlight Application Pin
Thi**013-Dec-09 1:29
Thi**013-Dec-09 1:29 
GeneralRE: Re: HttpWebRequest in Silverlight Application [Solved] Pin
Thi**013-Dec-09 6:53
Thi**013-Dec-09 6:53 
QuestionExecutes a delegate on the thread that owns the control's underlying window handle Pin
cppwxwidgetsss2-Dec-09 2:41
cppwxwidgetsss2-Dec-09 2:41 
AnswerRe: Executes a delegate on the thread that owns the control's underlying window handle Pin
Ian Shlasko2-Dec-09 5:06
Ian Shlasko2-Dec-09 5:06 
GeneralRe: Executes a delegate on the thread that owns the control's underlying window handle Pin
cppwxwidgetsss2-Dec-09 18:23
cppwxwidgetsss2-Dec-09 18:23 
QuestionMenuItem like the Sort menuitem in Firefox 3's Organize Bookmarks ... ? Pin
Mohammad Dayyan1-Dec-09 23:01
Mohammad Dayyan1-Dec-09 23:01 
AnswerRe: MenuItem like the Sort menuitem in Firefox 3's Organize Bookmarks ... ? Pin
Ashfield2-Dec-09 1:32
Ashfield2-Dec-09 1:32 
QuestionShould I use Silverlight Pin
Mycroft Holmes1-Dec-09 19:26
professionalMycroft Holmes1-Dec-09 19:26 
AnswerRe: Should I use Silverlight Pin
Mark Salsbery2-Dec-09 8:28
Mark Salsbery2-Dec-09 8:28 
GeneralRe: Should I use Silverlight Pin
Mycroft Holmes2-Dec-09 12:05
professionalMycroft Holmes2-Dec-09 12:05 
QuestionWPF Data Grid Auto Height problem Pin
wasimsharp30-Nov-09 21:44
wasimsharp30-Nov-09 21:44 
AnswerRe: WPF Data Grid Auto Height problem Pin
Super Lloyd2-Dec-09 14:43
Super Lloyd2-Dec-09 14:43 
Question[Message Deleted] Pin
noufal200930-Nov-09 21:05
noufal200930-Nov-09 21:05 
AnswerRe: textbox validation in silverlight Pin
Abhinav S30-Nov-09 21:57
Abhinav S30-Nov-09 21:57 
GeneralRe: textbox validation in silverlight Pin
noufal200930-Nov-09 23:08
noufal200930-Nov-09 23:08 
AnswerRe: textbox validation in silverlight Pin
Abhinav S30-Nov-09 23:15
Abhinav S30-Nov-09 23:15 

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.