extends IHttpHandler
<%@ WebHandler Language="C#" Class="XamlGen" %> using System; using System.Web; public class XamlGen : IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/xaml"; context.Response.Write("<Canvas xmlns='http://schemas.microsoft.com/client/2007' " + "xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>" + "<TextBlock Foreground='lime'><Run>XAML content</Run><LineBreak/>" + "<Run>[generated at " + DateTime.Now + "]</Run>" + "</TextBlock></Canvas>"); } public bool IsReusable { get {return true;} } }