Click here to Skip to main content
15,917,731 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Byte array to image Pin
columbos1492726-Sep-11 3:47
columbos1492726-Sep-11 3:47 
GeneralRe: Byte array to image Pin
Pete O'Hanlon26-Sep-11 3:55
mvePete O'Hanlon26-Sep-11 3:55 
GeneralRe: Byte array to image Pin
columbos1492726-Sep-11 3:58
columbos1492726-Sep-11 3:58 
GeneralRe: Byte array to image Pin
Pete O'Hanlon26-Sep-11 4:04
mvePete O'Hanlon26-Sep-11 4:04 
QuestionIs silverlight dead? Pin
sasolanki00725-Sep-11 20:41
sasolanki00725-Sep-11 20:41 
AnswerRe: Is silverlight dead? Pin
Richard MacCutchan25-Sep-11 23:19
mveRichard MacCutchan25-Sep-11 23:19 
AnswerRe: Is silverlight dead? Pin
Pete O'Hanlon26-Sep-11 1:09
mvePete O'Hanlon26-Sep-11 1:09 
AnswerRe: Is silverlight dead? Pin
Ranjit Shankar16-Apr-20 21:19
professionalRanjit Shankar16-Apr-20 21:19 
QuestionSummation of multiple datagrids Pin
Mats Westin23-Sep-11 5:33
Mats Westin23-Sep-11 5:33 
QuestionCovariance-Contravariance help please! Pin
DotNetXenon23-Sep-11 4:02
DotNetXenon23-Sep-11 4:02 
AnswerRe: Covariance-Contravariance help please! Pin
Mycroft Holmes23-Sep-11 12:18
professionalMycroft Holmes23-Sep-11 12:18 
QuestionWCF service call in which layer? Pin
DotNetXenon22-Sep-11 8:32
DotNetXenon22-Sep-11 8:32 
AnswerRe: WCF service call in which layer? Pin
Mycroft Holmes22-Sep-11 12:50
professionalMycroft Holmes22-Sep-11 12:50 
GeneralRe: WCF service call in which layer? Pin
DotNetXenon23-Sep-11 8:07
DotNetXenon23-Sep-11 8:07 
AnswerRe: WCF service call in which layer? Pin
Abhinav S24-Sep-11 21:34
Abhinav S24-Sep-11 21:34 
QuestionWCF Service list Pin
DotNetXenon22-Sep-11 5:47
DotNetXenon22-Sep-11 5:47 
AnswerRe: WCF Service list Pin
Jürgen Röhr22-Sep-11 8:02
professionalJürgen Röhr22-Sep-11 8:02 
GeneralRe: WCF Service list Pin
DotNetXenon22-Sep-11 8:13
DotNetXenon22-Sep-11 8:13 
Questionproblem in showing x-axix value in multi series line chart in silverlight4 Pin
Mann Saini22-Sep-11 3:12
Mann Saini22-Sep-11 3:12 
QuestionOpen a XAML page from aspx page Pin
yesu prakash21-Sep-11 20:30
yesu prakash21-Sep-11 20:30 
AnswerRe: Open a XAML page from aspx page Pin
RichardGrimmer22-Sep-11 5:14
RichardGrimmer22-Sep-11 5:14 
QuestionSL Content not displaying Pin
JMurfey20-Sep-11 9:58
JMurfey20-Sep-11 9:58 
AnswerRe: SL Content not displaying Pin
DotNetXenon23-Sep-11 4:19
DotNetXenon23-Sep-11 4:19 
GeneralRe: SL Content not displaying Pin
JMurfey23-Sep-11 12:57
JMurfey23-Sep-11 12:57 
Hi Xenon - thanks for the response.

Yes I tried setting the height and width to pixels and I do get a box that will bring up the silverlight menu when you right click inside it, but thats all.

Basically, if the pages that load the sl object are in the root of my project - like the test aspx and html pages added by default when the sl project is created - it works fine.

If I try and load the sl object from a page in a folder (at the same level as ClientBin) It doesn't work. even if I copy the same html or aspx pages directly from the root.

I have to change a couple things -

<param name="source" value="ClientBin/Silverlight Object.xap"/>
becomes 
<param name="source" value="..\\ClientBin/Silverlight Object.xap"/>
and

<script type="text/javascript" src="Silverlight.js"></script>  
becomes
<script type="text/javascript" src="..\\Silverlight.js"></script>

(I don't think the .js is being used, so I don't think I need to do this. If I don't change the ClientBin to ..\\ClientBin, I will get a load error thrown.

Do I need to set mime types or something? I read something about them only being set for the root of the project directory. I am using VS2010.

Thanks!

J


here's the page source I get -

HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head><title>
	Silverlight Object
</title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    html, body {
	    height: 100%;
	    overflow: auto;
    }
    body {
	    padding: 0;
	    margin: 0;
    }
    #silverlightControlHost {
	    height: 500px;
	    text-align:center;
    }
    </style>
    <script type="text/javascript" src="..\\Silverlight.js"></script>
    <script type="text/javascript">
        function onSilverlightError(sender, args) {
            var appSource = "";
            if (sender != null && sender != 0) {
                appSource = sender.getHost().Source;
            }

            var errorType = args.ErrorType;
            var iErrorCode = args.ErrorCode;

            if (errorType == "ImageError" || errorType == "MediaError") {
                return;
            }

            var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n";

            errMsg += "Code: " + iErrorCode + "    \n";
            errMsg += "Category: " + errorType + "       \n";
            errMsg += "Message: " + args.ErrorMessage + "     \n";

            if (errorType == "ParserError") {
                errMsg += "File: " + args.xamlFile + "     \n";
                errMsg += "Line: " + args.lineNumber + "     \n";
                errMsg += "Position: " + args.charPosition + "     \n";
            }
            else if (errorType == "RuntimeError") {
                if (args.lineNumber != 0) {
                    errMsg += "Line: " + args.lineNumber + "     \n";
                    errMsg += "Position: " + args.charPosition + "     \n";
                }
                errMsg += "MethodName: " + args.methodName + "     \n";
            }
            alert(errMsg);
            throw new Error(errMsg);
        }
    </script>

</head>
<body>
    <form method="post" action="Page1.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJODExMDE5NzY5ZGR3pKj0yol3dSXA8CS0ZrlCCYJQXLMakDaYymKobcWj8w==" />
</div>

    <span id="Label1">Not Silverlight</span>
    <div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="400px" height="400px">
		  <param name="source" value="..\\ClientBin/Silverlight Object.xap"/>

		  <param name="onError" value="onSilverlightError" />
		  <param name="background" value="blue" />
		  <param name="minRuntimeVersion" value="4.0.50826.0" />
		  <param name="autoUpgrade" value="true" />
		  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
 			  <img src="http://go.microsoft.com/fwlink/?LinkId=161376" 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>
</body>
</html>

GeneralRe: SL Content not displaying Pin
JMurfey26-Sep-11 10:15
JMurfey26-Sep-11 10: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.