Click here to Skip to main content
15,889,216 members
Home / Discussions / WPF
   

WPF

 
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 
QuestionDynamicly load DLL's Pin
columbos1492718-Sep-11 22:54
columbos1492718-Sep-11 22:54 
AnswerRe: Dynamicly load DLL's Pin
Daniel.Grondal19-Sep-11 23:31
Daniel.Grondal19-Sep-11 23:31 
Question"XmlDataProvider has inline XML that does not explicitly set its XmlNamespace (xmlns="")" Pin
devvvy18-Sep-11 16:41
devvvy18-Sep-11 16:41 
AnswerRe: "XmlDataProvider has inline XML that does not explicitly set its XmlNamespace (xmlns="")" Pin
Mamta D19-Sep-11 18:29
Mamta D19-Sep-11 18:29 
AnswerRe: ToString vs Simple DataTemplate Pin
SledgeHammer0115-Sep-11 13:10
SledgeHammer0115-Sep-11 13:10 
GeneralRe: ToString vs Simple DataTemplate Pin
Member 103390715-Sep-11 22:47
Member 103390715-Sep-11 22:47 
AnswerRe: ToString vs Simple DataTemplate Pin
Kim Breugelmans15-Sep-11 22:54
Kim Breugelmans15-Sep-11 22:54 
AnswerRe: ToString vs Simple DataTemplate Pin
Member 103390715-Sep-11 22:57
Member 103390715-Sep-11 22:57 
GeneralRe: ToString vs Simple DataTemplate Pin
Member 103390717-Sep-11 9:34
Member 103390717-Sep-11 9:34 
AnswerRe: ToString vs Simple DataTemplate Pin
Simon Bang Terkildsen16-Sep-11 6:05
Simon Bang Terkildsen16-Sep-11 6:05 
AnswerRe: Tab Change DataContext becomes Null Pin
Pete O'Hanlon15-Sep-11 4:52
mvePete O'Hanlon15-Sep-11 4:52 
QuestionBind to property in static instance of class Pin
Mc_Topaz14-Sep-11 2:30
Mc_Topaz14-Sep-11 2:30 
AnswerRe: Bind to property in static instance of class Pin
Pete O'Hanlon14-Sep-11 3:23
mvePete O'Hanlon14-Sep-11 3:23 
GeneralRe: Bind to property in static instance of class Pin
Mc_Topaz14-Sep-11 4:15
Mc_Topaz14-Sep-11 4:15 
GeneralRe: Bind to property in static instance of class Pin
Ian Shlasko14-Sep-11 4:27
Ian Shlasko14-Sep-11 4:27 
GeneralRe: Bind to property in static instance of class Pin
Mc_Topaz14-Sep-11 4:54
Mc_Topaz14-Sep-11 4:54 

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.