Click here to Skip to main content
15,860,972 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to use DrawingGroup and GeometryDrawing classes in Silverlight Pin
amit@work12-Oct-09 5:22
amit@work12-Oct-09 5:22 
AnswerRe: How to use DrawingGroup and GeometryDrawing classes in Silverlight Pin
Mark Salsbery12-Oct-09 6:08
Mark Salsbery12-Oct-09 6:08 
QuestionDelete button with Data grid Pin
ravi.vellanky11-Oct-09 21:29
ravi.vellanky11-Oct-09 21:29 
AnswerRe: Delete button with Data grid Pin
Anudeep Jaiswal - MCA12-Oct-09 1:36
Anudeep Jaiswal - MCA12-Oct-09 1:36 
GeneralBinding StringWriter to WPF TextBox Pin
dwotx11-Oct-09 13:07
dwotx11-Oct-09 13:07 
GeneralRe: Binding StringWriter to WPF TextBox Pin
Pete O'Hanlon12-Oct-09 11:16
subeditorPete O'Hanlon12-Oct-09 11:16 
Questionve silverlight map control-web services Pin
billy dev11-Oct-09 5:59
billy dev11-Oct-09 5:59 
AnswerRe: ve silverlight map control-web services Pin
Mark Salsbery11-Oct-09 10:41
Mark Salsbery11-Oct-09 10:41 
The Silverlight plugin is on the client so accessing it
from ASP.NET code on the server isn't going to work
(even if you did put the "id="s1"" in the right place).

You can, however, pass initial parameters to the Silvelight plugin:
How to: Specify and Retrieve Custom Initialization Parameters[^]

Using that, you could pass parameters something like this
protected string GetSilverlightInitParams()
{
    // Initialize the service variable which makes the request
    TokenWebReference.CommonService commonService = new TokenWebReference.CommonService();
    commonService.Url = "https://staging.common.virtualearth.net/find-30/common.asmx";
    commonService.Credentials = new System.Net.NetworkCredential("VE Account ID", "VE Account Password");

    // Create the TokenSpecification object to pass to GetClientToken.
    TokenWebReference.TokenSpecification tokenSpec = new TokenWebReference.TokenSpecification();

    // Use the ‘Page’ object to retrieve the end-client’s IPAddress.
    tokenSpec.ClientIPAddress = Page.Request.UserHostAddress;

    // Set the expiration time of the token.
    // The maximum allowable token duration is 480 minutes (8 hours).
    // The minimum allowable duration is 15 minutes.
    tokenSpec.TokenValidityDurationMinutes = 480;

    // Make the GetClientToken request to retrieve a token from the Virtual Earth Token Service.
    // Pass this token to the Silverlight application.
    return "clientToken= " + commonService.GetClientToken(tokenSpec);
}

<form id="form1" runat="server" style="height:100%">
  <div id="silverlightControlHost">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
      <param name="source" id="s1" value="ClientBin/SilverlightApplication1.xap" />
      <big><param name="initParams" value="<%= GetSilverlightInitParams() %>" /></big>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="3.0.40624.0" />
      <param name="autoUpgrade" value="true" />
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
        <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object>
    <iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
  </div>
</form>


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: ve silverlight map control-web services Pin
billy dev12-Oct-09 10:19
billy dev12-Oct-09 10:19 
AnswerRe: ve silverlight map control-web services Pin
Mark Salsbery11-Oct-09 11:14
Mark Salsbery11-Oct-09 11:14 
GeneralRe: ve silverlight map control-web services Pin
billy dev12-Oct-09 10:34
billy dev12-Oct-09 10:34 
GeneralRe: ve silverlight map control-web services Pin
Mark Salsbery12-Oct-09 10:54
Mark Salsbery12-Oct-09 10:54 
GeneralRe: ve silverlight map control-web services Pin
billy dev13-Oct-09 10:56
billy dev13-Oct-09 10:56 
GeneralRe: ve silverlight map control-web services Pin
Mark Salsbery13-Oct-09 12:22
Mark Salsbery13-Oct-09 12:22 
QuestionHow do I make rounded corners for textbox, combobox and other controls Pin
ahsansharjeel11-Oct-09 3:03
ahsansharjeel11-Oct-09 3:03 
AnswerRe: How do I make rounded corners for textbox, combobox and other controls Pin
Pete O'Hanlon11-Oct-09 10:35
subeditorPete O'Hanlon11-Oct-09 10:35 
Question[Message Deleted] Pin
ahsansharjeel11-Oct-09 2:47
ahsansharjeel11-Oct-09 2:47 
AnswerRe: How do I make ComboBox, AutoComplete and Auto Suggests Pin
Christian Graus11-Oct-09 10:52
protectorChristian Graus11-Oct-09 10:52 
GeneralRe: How do I make ComboBox, AutoComplete and Auto Suggests Pin
ahsansharjeel11-Oct-09 18:05
ahsansharjeel11-Oct-09 18:05 
GeneralRe: How do I make ComboBox, AutoComplete and Auto Suggests Pin
Pete O'Hanlon11-Oct-09 22:25
subeditorPete O'Hanlon11-Oct-09 22:25 
QuestionWhy doesn't Microsoft support the documented mouse event handlers inside FlowDocument objects? Pin
fjparisIII10-Oct-09 10:20
fjparisIII10-Oct-09 10:20 
AnswerRe: Why doesn't Microsoft support the documented mouse event handlers inside FlowDocument objects? Pin
Pete O'Hanlon11-Oct-09 11:58
subeditorPete O'Hanlon11-Oct-09 11:58 
GeneralRe: Why doesn't Microsoft support the documented mouse event handlers inside FlowDocument objects? [modified] Pin
fjparisIII11-Oct-09 12:49
fjparisIII11-Oct-09 12:49 
QuestionHelp with ProgressBar Pin
Etienne_12310-Oct-09 3:19
Etienne_12310-Oct-09 3:19 
AnswerRe: Help with ProgressBar Pin
Sperneder Patrick10-Oct-09 4:32
professionalSperneder Patrick10-Oct-09 4:32 

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.