Web
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);
}
Today I'm going to show you a very simple way to turn any ContentControl or a ListBox control into an AdRotator control. "What is AdRotator control?", you would ask. A common definition for an AdRotator is a control that lets you to show some data (most commonly ads) and change it periodically. An AdRotator control should be a control that lets you do that out-of-the-box without writing any code. Furthermore, switching the ads with a nice animation will give our AdRotator more polished and glamorous look. To accomplish this, we are going to use RadTransitionControl (a ContentControl) and RadCoverFlow (a ListBox)...