Click here to Skip to main content
15,861,172 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: MVVM and using a Backgroundworker Pin
Pete O'Hanlon14-Oct-09 9:20
subeditorPete O'Hanlon14-Oct-09 9:20 
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 
hi guys ,
i am using ve silver map ctrl and i have some problem..
default.aspx.cs
<br />
namespace SilverlightApplication1.Web<br />
{<br />
    public partial class _Default : System.Web.UI.Page<br />
    {<br />
        protected void Page_Load(object sender, EventArgs e)<br />
        {<br />
            // Initialize the service variable which makes the request <br />
            TokenWebReference.CommonService commonService = new TokenWebReference.CommonService();<br />
            commonService.Url = "https://staging.common.virtualearth.net/find-30/common.asmx";<br />
            commonService.Credentials = new System.Net.NetworkCredential("VE Account ID", "VE Account Password");<br />
<br />
            // Create the TokenSpecification object to pass to GetClientToken.<br />
            TokenWebReference.TokenSpecification tokenSpec = new TokenWebReference.TokenSpecification();<br />
<br />
            // Use the ‘Page’ object to retrieve the end-client’s IPAddress.<br />
            tokenSpec.ClientIPAddress = Page.Request.UserHostAddress;<br />
<br />
            // Set the expiration time of the token.<br />
            // The maximum allowable token duration is 480 minutes (8 hours).<br />
            // The minimum allowable duration is 15 minutes.<br />
            tokenSpec.TokenValidityDurationMinutes = 480;<br />
            <br />
            // Make the GetClientToken request to retrieve a token from the Virtual Earth Token Service. <br />
            // Pass this token to the Silverlight application.<br />
            s1.InitParams = "clientToken= " + commonService.GetClientToken(tokenSpec); <br />
<br />
        }<br />
       <br />
    }<br />
}<br />

and my default.aspx

<%@ Page Language="C#" AutoEventWireup="true" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head id="Head1" runat="server"><br />
    <title>SilverlightApplication1</title><br />
    <style type="text/css"><br />
    html, body {<br />
	    height: 100%;<br />
	    overflow: auto;<br />
    }<br />
    body {<br />
	    padding: 0;<br />
	    margin: 0;<br />
    }<br />
    #silverlightControlHost {<br />
	    height: 100%;<br />
	    text-align:center;<br />
    }<br />
    </style><br />
    <script type="text/javascript" src="Silverlight.js"></script><br />
    <script type="text/javascript"><br />
        function onSilverlightError(sender, args) {<br />
            var appSource = "";<br />
            if (sender != null && sender != 0) {<br />
                appSource = sender.getHost().Source;<br />
            }<br />
<br />
            var errorType = args.ErrorType;<br />
            var iErrorCode = args.ErrorCode;<br />
<br />
            if (errorType == "ImageError" || errorType == "MediaError") {<br />
                return;<br />
            }<br />
<br />
            var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n";<br />
<br />
            errMsg += "Code: " + iErrorCode + "    \n";<br />
            errMsg += "Category: " + errorType + "       \n";<br />
            errMsg += "Message: " + args.ErrorMessage + "     \n";<br />
<br />
            if (errorType == "ParserError") {<br />
                errMsg += "File: " + args.xamlFile + "     \n";<br />
                errMsg += "Line: " + args.lineNumber + "     \n";<br />
                errMsg += "Position: " + args.charPosition + "     \n";<br />
            }<br />
            else if (errorType == "RuntimeError") {<br />
                if (args.lineNumber != 0) {<br />
                    errMsg += "Line: " + args.lineNumber + "     \n";<br />
                    errMsg += "Position: " + args.charPosition + "     \n";<br />
                }<br />
                errMsg += "MethodName: " + args.methodName + "     \n";<br />
            }<br />
<br />
            throw new Error(errMsg);<br />
        }<br />
    </script><br />
</head><br />
<body><br />
    <form id="form1" runat="server" style="height:100%"><br />
    <div id="silverlightControlHost"><br />
        <object    data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"><br />
		  <param name="source"    id="s1"  value="ClientBin/SilverlightApplication1.xap"     /><br />
		  <param name="onError"  value="onSilverlightError" /><br />
		  <param name="background" value="white" /><br />
		 <br />
		  <param name="minRuntimeVersion" value="3.0.40624.0" /><br />
		  <param name="autoUpgrade" value="true" /><br />
		  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none"><br />
 			  <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/><br />
		  </a><br />
	    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div><br />
    </form><br />
</body><br />
</html><br />
<br />

my problem is that despite the fact i have set id="s1"
when compiled gave me an error which says that s1 doesn't exist in the context...
i would appreciate if you could help me.. Wink | ;)
AnswerRe: ve silverlight map control-web services Pin
Mark Salsbery11-Oct-09 10:41
Mark Salsbery11-Oct-09 10:41 
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 

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.