need favicon for SL5 applicaiton.
-
Tuesday, September 11, 2012 5:29 PM
I am using SL5 + entity framework .
Is there anyone who have face issues with favicon with silverlight 5. Please let me know how can we get Favicon in SL5.
I have tried to put a tag inside .html page of my web project but didn't work.
?? any idea.
All Replies
-
Wednesday, September 12, 2012 2:09 PM
azam50004
Member
Favicon belong to the header tag like these.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>Mileage Stats | Know where your gas takes you</title>
<link href="@Url.Content("~/Content/static.css")" rel="stylesheet" />
<link rel="shortcut icon" type="image/x-icon" href="@Url.Content("~/favicon.ico")" />
<link rel="icon" type="image/ico" href="@Url.Content("~/favicon.ico")" />
<meta name="application-name" content="Mileage Stats" />
<meta name="msapplication-tooltip" content="Mileage Stats Reference Implementation" />
<meta name="msapplication-window" content="width=1100;height=800" />
<meta name="msapplication-navbutton-color" content="#6DE3E3" />
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js">
</script>
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/Debug/mstats.pinnedsite.js")">
</script>
</head>
http://msdn.microsoft.com/en-us/library/gg131029(v=vs.85).aspx
Favicon + Pin Site
-
Thursday, September 20, 2012 4:54 PM
Thank you for your reply,
I want to use favicon for the whole app my code looks something like this under page FastAppTestHtml.html
where do you want me to insert favicon and how should I use your code will be gre8 help.
<head>
<title>FastTest</title>
<style type="text/css">
html, body {
height: 100%;
overflow: auto;
}
body {
padding: 0;
margin: 0;
}
#silverlightControlHost {
height: 100%;
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";
}throw new Error(errMsg);
}
</script>
</head> -
Thursday, September 20, 2012 6:22 PM
azam50004
If you just need favicon not pinsite just add following code will work within the head tag..
You can also specify the favicon to use by following existing webpage syntax:
<LINK rel="shortcut icon" type=image/x-icon href="http://host/favicon.ico"><LINK rel=icon type=image/ico href="./favicon.ico"> -
Friday, September 21, 2012 3:41 PM
still not getting looks like when I try to use Type =image/ico its not displaing intellisense option like Type="image/ico" inside <link rel=icon/>
I am still trying to get my favicon in my app but don't understand what's the problem , where do you recommend to put my .ico image under what folder or project ?????
My application won't load if I try to include ico image in .html page , Do I have to include under header tag of Default.aspx page or someother page??
using IE 8 can't have access to other browsers right now due to security restrictions.
having difficulty in downloading my content ..........
[Fiddler] The socket connection to 127.0.0.1 failed. <br /> No connection could be made because the target machine actively refused it 127.0.0.1:80
-
Sunday, September 23, 2012 2:32 AM
azam50004
Run the web under iis mode or try these links.
<link rel="shortcut icon" type="image/x-icon" href="http://www.veryicon.com/icon/ico/Food%20%26%20Drinks/HandBrake%201/HandBrake.ico" />
<link rel="icon" type="image/ico" href="http://www.veryicon.com/icon/ico/Food%20%26%20Drinks/HandBrake%201/HandBrake.ico" />
-
Wednesday, October 10, 2012 5:07 PM
Thank you @thai carrot

