<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rodrigo Díaz Concha &#187; XAML</title>
	<atom:link href="http://rdiazconcha.com/tag/xaml/feed/" rel="self" type="application/rss+xml" />
	<link>http://rdiazconcha.com</link>
	<description>Silverlight y XAML en Español para México, Latinoamérica y España</description>
	<lastBuildDate>Thu, 02 Feb 2012 20:54:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>La importancia de XAML</title>
		<link>http://rdiazconcha.com/2011/12/la-importancia-de-xaml/</link>
		<comments>http://rdiazconcha.com/2011/12/la-importancia-de-xaml/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 00:06:53 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[Windows Phone 7.1]]></category>
		<category><![CDATA[wpf4]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://rdiazconcha.com/2011/12/la-importancia-de-xaml/</guid>
		<description><![CDATA[El desarrollo de aplicaciones cliente para el sistema operativo Windows ha evolucionado de gran manera en los últimos años.  Una de las tecnologías clave que impulsaron la innovación en el área de las plataformas de desarrollo fue, sin lugar a dudas, XAML.
XAML (acrónimo de eXtensible Application Markup Language) nació hace más de 5 años y [...]]]></description>
			<content:encoded><![CDATA[<p>El desarrollo de aplicaciones cliente para el sistema operativo Windows ha evolucionado de gran manera en los últimos años.  Una de las tecnologías clave que impulsaron la innovación en el área de las plataformas de desarrollo fue, sin lugar a dudas, XAML.</p>
<p>XAML (acrónimo de eXtensible Application Markup Language) nació hace más de 5 años y es pieza fundamental en diversas tecnologías, como por ejemplo Windows Presentation Foundation (WPF), Silverlight, Silverlight para Windows Phone, Microsoft Surface e incluso Workflow Foundation.  Este lenguaje declarativo basado en XML nos permite declarar estructuras de objetos –generalmente visuales pero en realidad, prácticamente podemos instanciar cualquier objeto desde este lenguaje-.  Desde el .NET Framework 3.0 contamos en Windows con un intérprete (parser) bastante eficiente y poderoso, el cual ha sido mejorado con cada versión del Framework.  Además, a XAML lo respaldan herramientas de desarrollo y diseño súmamente sofisticadas como Visual Studio y Expression Blend.  Inclusive hay herramientas de terceros que también cuentan con la opción de exportar hacia XAML (Adobe Photoshop e Illustrator por ejemplo).</p>
<p>Esto quiere decir, que si tu objetivo <span style="text-decoration: underline;">hoy en día</span> es construir Aplicaciones para Windows, muy probablemente tengas que conocer XAML.</p>
<p>Claramente, XAML es una tecnología de vital importancia también para el futuro.  Microsoft durante el evento <a href="http://www.buildwindows.com" target="_blank">//Build/</a> mostró al mundo entero el próximo Windows 8 y su plataforma de desarrollo, y pudimos apreciar una cualidad única que por primera vez aparece en un sistema operativo Windows: el parser de XAML es parte del core del sistema operativo para las nuevas aplicaciones Metro en Windows 8.</p>
<p><a href="http://rdiazconcha.com/wp-content/uploads/2011/12/win8-platform-and-tools1.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="win8-platform-and-tools" src="http://rdiazconcha.com/wp-content/uploads/2011/12/win8-platform-and-tools_thumb.jpg" alt="win8-platform-and-tools" width="504" height="285" border="0" /></a></p>
<p>El significado de esta importante incorporación en Windows 8 es que podemos utilizar XAML como tecnología para la creación de Interfaces de Usuario. Es la primera vez que en un sistema operativo Windows sucede esto, ya que generalmente tenemos que instalar el .NET Framework para poder ejecutar aplicaciones que hagan uso de XAML.</p>
<p>Las Aplicaciones Metro son aquellas que tienen como enfoque principal su uso en dispositivos táctiles como tablets.  Las Aplicaciones de Escritorio que usamos día con día y que generalmente están expresadas con ventanas, seguirán funcionando como tal en Windows 8 y podrán ser construidas con las plataformas de desarrollo como Silverlight o WPF (en donde podemos asimismo encontrar XAML como comenté anteriormente).</p>
<p>Muchos ven esto como una muestra clara de la importancia de XAML para Microsoft, otros tantos ven esto como el “Silverlight Nativo” o el “Silverlight 6”, lo cierto es que hay concordancia con la plataforma de desarrollo que desde hace mucho tiempo se ha ido perfilando: XAML como tecnología de Interfaz de Usuario y alguno de los lenguajes disponibles en la plataforma para dar funcionalidad y vida a dicha IU (C, C++, C# o VB).</p>
<p><a href="http://rdiazconcha.com/wp-content/uploads/2011/12/Xaml.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Xaml" src="http://rdiazconcha.com/wp-content/uploads/2011/12/Xaml_thumb.png" alt="Xaml" width="500" height="375" border="0" /></a></p>
<p>XAML entonces toca un amplio espectro de tecnologías, y este hecho debería ser un “abrir de ojos” para todos aquellos desarrolladores que deseen construir soluciones nativas para Windows.  Aprender XAML no es complicado y una vez comprendido el paradigma adecuado de programación, podrás apreciar lo robusto y poderosa que es esta tecnología.</p>
<p>Salu2!</p>
]]></content:encoded>
			<wfw:commentRss>http://rdiazconcha.com/2011/12/la-importancia-de-xaml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tutoriales de Desarrollo para Windows Phone&#8211;totalmente en espa&#241;ol y gratuitos</title>
		<link>http://rdiazconcha.com/2011/06/tutoriales-de-desarrollo-para-windows-phonetotalmente-en-espaol-y-gratuitos/</link>
		<comments>http://rdiazconcha.com/2011/06/tutoriales-de-desarrollo-para-windows-phonetotalmente-en-espaol-y-gratuitos/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 20:09:12 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Cursos]]></category>
		<category><![CDATA[La Liga Silverlight]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[capacitación]]></category>
		<category><![CDATA[curso]]></category>
		<category><![CDATA[entrenamiento]]></category>
		<category><![CDATA[formación]]></category>
		<category><![CDATA[latam]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://rdiazconcha.com/2011/06/tutoriales-de-desarrollo-para-windows-phonetotalmente-en-espaol-y-gratuitos/</guid>
		<description><![CDATA[En La Liga Silverlight, hemos traducido al idioma español el contenido original de todos los tutoriales para el desarrollo de aplicaciones en Windows Phone, disponibles en App Hub.&#160; 
¡Son un total de 27 tutoriales!
Este material de entrenamiento completamente gratuito y en español te servirá para iniciar en el mundo de la programación de la nueva [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><a href="http://create.msdn.com/en-us/education/quickstarts" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="windowsphone_logo" border="0" alt="windowsphone_logo" align="right" src="http://rdiazconcha.com/wp-content/uploads/2011/06/windowsphone_logo.png" width="177" height="62" /></a>En <a href="http://blogs.LigaSilverlight.com" target="_blank">La Liga Silverlight</a>, hemos traducido al idioma español el contenido original de <strong>todos los tutoriales para el desarrollo de aplicaciones en Windows Phone</strong>, disponibles en <a href="http://create.msdn.com/en-us/education/quickstarts" target="_blank">App Hub</a>.&#160; </p>
<p align="left">¡Son un total de 27 tutoriales!</p>
<p>Este material de <strong>entrenamiento completamente gratuito y en español</strong> te servirá para<a title="La Liga Silverlight - La Primera Comunidad MSDN en español acerca de Silverlight y tecnologías relacionadas" href="http://blogs.ligasilverlight.com/tutoriales-windows-phone-7/" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="LigaSilverlight150x150" border="0" alt="LigaSilverlight150x150" align="right" src="http://rdiazconcha.com/wp-content/uploads/2011/06/LigaSilverlight150x150.png" width="133" height="150" /></a> iniciar en el mundo de la programación de la nueva versión del sistema operativo móvil de Microsoft: <a href="http://www.windowsphone7.com" target="_blank">Windows Phone 7</a>, o si ya eres desarrollador para este dispositivo estos tutoriales sin duda alguna te ayudarán a reforzar tus conocimientos.</p>
<p>Cada tutorial trata un tema específico, por lo que no están vinculados directamente uno con otro pero definitivamente les recomiendo que los sigan en el orden establecido.&#160; Los tutoriales comienzan con temas básicos de XAML y <a href="http://silverlight.net" target="_blank">Silverlight</a>, y posteriormente se van analizando conceptos más a detalle acerca de esta plataforma de desarrollo.</p>
<p>La lista completa de tutoriales es la siguiente:</p>
<h3>Iniciando y Fundamentos</h3>
<ol>
<li><font style="background-color: #ffffff"><a title="http://blogs.ligasilverlight.com/2011/06/empezar-a-crear-una-aplicacin-de-windows-phone/" href="http://blogs.ligasilverlight.com/2011/06/empezar-a-crear-una-aplicacin-de-windows-phone/" target="_blank">Empezar a crear una aplicación de Windows Phone</a></font></li>
<li><font style="background-color: #ffffff"><a title="Creando la interfaz de usuario de Windows Phone (XAML)" href="http://blogs.ligasilverlight.com/2011/06/creando-la-interfaz-de-usuario-de-windows-phone-xaml/" target="_blank">Creando la interfaz de usuario de Windows Phone (XAML)</a></font></li>
<li><font style="background-color: #ffffff"><a title="Usando controles" href="http://blogs.ligasilverlight.com/2011/06/usando-controles-3/" target="_blank">Usando controles</a></font></li>
<li><font style="background-color: #ffffff"><a title="Tipo de Controles" href="http://blogs.ligasilverlight.com/2011/06/tipo-de-controles/" target="_blank">Tipo de Controles</a></font></li>
<li><font style="background-color: #ffffff"><a title="Controles Panorama y Pivot" href="http://blogs.ligasilverlight.com/2011/06/controles-panorama-y-pivot/" target="_blank">Controles Panorama y Pivot</a></font></li>
<li><font style="background-color: #ffffff"><a title="Trabajando con texto en Windows Phone" href="http://blogs.ligasilverlight.com/2011/06/trabajando-con-texto-en-windows-phone/" target="_blank">Trabajando con texto en Windows Phone</a></font></li>
<li><font style="background-color: #ffffff"><a title="Distribución en la pantalla" href="http://blogs.ligasilverlight.com/2011/06/distribucin-en-la-pantalla/" target="_blank">Distribución en la pantalla</a></font></li>
<li><font style="background-color: #ffffff"><a title="Orientaciones de la pantalla" href="http://blogs.ligasilverlight.com/2011/06/orientaciones-de-la-pantalla/" target="_blank">Orientaciones de la pantalla</a></font></li>
<li><font style="background-color: #ffffff"><a title="Entrada táctil" href="http://blogs.ligasilverlight.com/2011/06/entrada-tctil/" target="_blank">Entrada táctil</a></font></li>
<li><font style="background-color: #ffffff"><a title="Navegación" href="http://blogs.ligasilverlight.com/2011/06/navegacin/" target="_blank">Navegación</a></font></li>
<li><font style="background-color: #ffffff"><a title="Ejecutando un aplicación en segundo plano (tombstoning)" href="http://blogs.ligasilverlight.com/2011/06/ejecutando-una-aplicacin-en-segundo-plano-tombstoning/" target="_blank">Ejecutando un aplicación en segundo plano (tombstoning)</a></font></li>
<li><font style="background-color: #ffffff"><a title="Notificaciones de empuje para el desarrollo de Windows Phone" href="http://blogs.ligasilverlight.com/2011/06/notificaciones-de-empuje-para-el-desarrollo-de-windows-phone/" target="_blank">Notificaciones de empuje para el desarrollo de Windows Phone</a></font></li>
<li><font style="background-color: #ffffff"><a title="Publicando tu aplicación en el Marketplace" href="http://blogs.ligasilverlight.com/2011/06/publicando-tu-aplicacin-en-el-marketplace/" target="_blank">Publicando tu aplicación en el Marketplace</a></font></li>
</ol>
<h3>Visuales y Medios</h3>
<ol>
<li><font style="background-color: #ffffff"><a title="Imágenes" href="http://blogs.ligasilverlight.com/2011/06/imgenes/" target="_blank">Imágenes</a></font></li>
<li><font style="background-color: #ffffff"><a title="Animaciones" href="http://blogs.ligasilverlight.com/2011/06/animaciones/" target="_blank">Animaciones</a></font></li>
<li><font style="background-color: #ffffff"><a title="Video y Audio" href="http://blogs.ligasilverlight.com/2011/06/video-y-audio/" target="_blank">Video y Audio</a></font></li>
<li><font style="background-color: #ffffff"><a title="Gráficos" href="http://blogs.ligasilverlight.com/2011/06/grficos/" target="_blank">Gráficos</a></font></li>
<li><font style="background-color: #ffffff"><a title="Brochas" href="http://blogs.ligasilverlight.com/2011/06/brochas/" target="_blank">Brochas</a></font></li>
</ol>
<h3>Trabajando con Datos</h3>
<ol>
<li><font style="background-color: #ffffff"><a title="Obteniendo datos en tus aplicaciones de Windows Phone" href="http://blogs.ligasilverlight.com/2011/06/obteniendo-datos-en-tus-aplicaciones-de-windows-phone/" target="_blank">Obteniendo datos en tus aplicaciones de Windows Phone</a></font></li>
<li><font style="background-color: #ffffff"><a title="Enlazando a controles" href="http://blogs.ligasilverlight.com/2011/06/enlazando-datos-a-controles/" target="_blank">Enlazando a controles</a></font></li>
<li><font style="background-color: #ffffff"><a title="Almacenamiento Aislado" href="http://blogs.ligasilverlight.com/2011/06/almacenamiento-aislado/" target="_blank">Almacenamiento Aislado</a></font></li>
<li><font style="background-color: #ffffff"><a title="Accediendo a un servicio web REST" href="http://blogs.ligasilverlight.com/2011/06/accediendo-a-un-servicio-web-rest/" target="_blank">Accediendo a un servicio web REST</a></font></li>
<li><a title="Consumiendo el servicio de datos de Windows Azure utilizando el cliente OData" href="http://blogs.ligasilverlight.com/2011/06/consumiendo-servicio-de-datos-de-windows-azure-utilizando-el-cliente-odata/" target="_blank">Consumiendo el servicio de datos de Windows Azure utilizando el cliente OData</a></li>
</ol>
<h3>Sensores y otras características específicas del teléfono</h3>
<ol>
<li><font style="background-color: #ffffff"><a title="Lanzadores y Selectores" href="http://blogs.ligasilverlight.com/2011/06/lanzadores-y-selectores/" target="_blank">Lanzadores y Selectores</a></font></li>
<li><font style="background-color: #ffffff"><a title="Detección de movimiento (acelerómetro)" href="http://blogs.ligasilverlight.com/2011/06/deteccin-de-movimiento-acelermetro/" target="_blank">Detección de movimiento (acelerómetro)</a></font></li>
<li><font style="background-color: #ffffff"><a title="Desarrollando con el GPS de Windows Phone (servicios de ubicación)" href="http://blogs.ligasilverlight.com/2011/06/desarrollando-con-el-gps-de-windows-phone-servicios-de-ubicacin/" target="_blank">Desarrollando con el GPS de Windows Phone (Servicios de Ubicación)</a></font></li>
<li><font style="background-color: #ffffff"><a title="Desarrollando con la cámara de Windows Phone" href="http://blogs.ligasilverlight.com/2011/06/desarrollando-con-la-cmara-de-windows-phone/" target="_blank">Desarrollando con la cámara de Windows Phone</a></font></li>
</ol>
<p>También pueden ver el índice completo <a href="http://blogs.ligasilverlight.com/tutoriales-windows-phone-7/" target="_blank">en esta página de La Liga Silverlight</a>.</p>
<p>¡Esperamos que les sean de utilidad!</p>
]]></content:encoded>
			<wfw:commentRss>http://rdiazconcha.com/2011/06/tutoriales-de-desarrollo-para-windows-phonetotalmente-en-espaol-y-gratuitos/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Mapa de la Rep&#250;blica Mexicana en XAML (nuevamente)</title>
		<link>http://rdiazconcha.com/2010/11/mapa-de-la-repblica-mexicana-en-xaml/</link>
		<comments>http://rdiazconcha.com/2010/11/mapa-de-la-repblica-mexicana-en-xaml/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 17:21:59 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[codigo]]></category>
		<category><![CDATA[mexico]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://rdiazconcha.com/2010/11/mapa-de-la-repblica-mexicana-en-xaml/</guid>
		<description><![CDATA[Hace más de 2 años publiqué un Mapa de México en XAML, para que lo pudieran utilizar en sus aplicaciones de Silverlight (versión 2 beta en aquel entonces si no mal recuerdo…).&#160; No obstante el hospedaje en donde estaba el archivo sufrió diversas modificaciones y ajustes a lo largo de todo este tiempo y el [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rdiazconcha.com/2008/11/mapa-de-m-233-xico-en-xaml/" target="_blank">Hace más de 2 años publiqué</a> un Mapa de <a href="http://es.wikipedia.org/wiki/M%C3%A9xico" target="_blank">México</a> en XAML, para que lo pudieran utilizar en sus aplicaciones de <a href="http://silverlight.net" target="_blank">Silverlight</a> (versión 2 beta en aquel entonces si no mal recuerdo…).&#160; No obstante el hospedaje en donde estaba el archivo sufrió diversas modificaciones y ajustes a lo largo de todo este tiempo y el vínculo quedó roto.</p>
<p><a href="http://ligasilverlight.com/codigo/Mexico.rar" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://rdiazconcha.com/wp-content/uploads/2010/11/image20.png" width="501" height="269" /></a></p>
<p><a href="http://ligasilverlight.com/codigo/Mexico.rar" target="_blank">Aquí se los vuelvo a poner</a> para que lo utilicen en sus aplicativos, espero que les sirva!&#160; Por favor comenten aquí si les sirve y para qué lo están utilizando!</p>
<p>El vínculo de descarga es:</p>
<p><a title="http://ligasilverlight.com/codigo/Mexico.rar" href="http://ligasilverlight.com/codigo/Mexico.rar" target="_blank">http://ligasilverlight.com/codigo/Mexico.rar</a></p>
<p>Salu2!</p>
]]></content:encoded>
			<wfw:commentRss>http://rdiazconcha.com/2010/11/mapa-de-la-repblica-mexicana-en-xaml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creando contenido din&#225;mico en PHP para Silverlight</title>
		<link>http://rdiazconcha.com/2009/08/creando-contenido-dinmico-en-php-para-silverlight/</link>
		<comments>http://rdiazconcha.com/2009/08/creando-contenido-dinmico-en-php-para-silverlight/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 16:40:42 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight 3]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://rdiazconcha.com/?p=342</guid>
		<description><![CDATA[Introducción
Como mencionábamos en el artículo anterior, Silverlight puede ser hospedado en prácticamente cualquier tecnología Web del lado del Servidor.&#160; Asimismo podemos utilizar las características de la tecnología que estemos utilizando para poder crear Xaml de manera dinámica y enviar dicho contenido a la aplicación Silverlight ya sea a través de parámetros de inicialización (parámetro InitParams [...]]]></description>
			<content:encoded><![CDATA[<h3>Introducción</h3>
<p>Como mencionábamos en el artículo anterior, <a href="http://www.microsoft.com/silverlight" target="_blank">Silverlight</a> puede ser hospedado en prácticamente cualquier tecnología Web del lado del Servidor.&#160; Asimismo podemos utilizar las características de la tecnología que estemos utilizando para poder crear Xaml de manera dinámica y enviar dicho contenido a la aplicación Silverlight ya sea a través de parámetros de inicialización (parámetro InitParams en &lt;object&gt;) o a través de un endpoint que podamos descargar por medio de un objeto de tipo WebClient.&#160; Es este último caso el que usaremos en este artículo para crear contenido dinámico con PHP.</p>
<h3>Creación del proyecto</h3>
<p>Siguiendo los mismos pasos que usamos en el artículo anterior para la creación de un Sitio Web en IIS y una aplicación Silverlight, crearemos un nuevo proyecto de tipo Silverlight Application en Visual Studio .NET con el nombre PHPDynamicXaml.&#160; Inmediatamente después de haber creado el proyecto borraremos los archivos Default.aspx y PHPDynamixXamlTestPage.aspx y sus archivos relacionados, dejando únicamente el archivo .html.</p>
<p>Agreguemos ahora un archivo llamado Content.php usando la plantilla de Archivo de Texto disponible al seleccionar la opción “Agregar nuevo elemento” en el menú contextual del proyecto.&#160; La siguiente figura muestra la ventana de Solution Explorer y la Solución actual:</p>
<p> <img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" src="http://farm4.static.flickr.com/3503/3814459647_a1eb394baf_o.png" />
<p>Será en el archivo Content.php en donde escribiremos el código necesario para la creación dinámica de contenido Xaml.&#160; En nuestro ejemplo el contenido será una serie de rectángulos, el cual su número será definido por medio de un parámetro en el Querystring llamado r.&#160; El siguiente fragmento ejemplifica el código de PHP necesario para la construcción dinámica de contenido en Xaml:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&lt;?php</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">header(<span style="color: #006080">'Content-Type: text/xaml'</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$cuantos = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">if</span> ($_GET[<span style="color: #006080">&quot;r&quot;</span>]!=<span style="color: #0000ff">null</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  $cuantos = $_GET[<span style="color: #006080">&quot;r&quot;</span>];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">echo</span> <span style="color: #006080">&quot;&lt;Canvas xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Width='800' Height='600'&gt;&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">for</span> ($i=1; $i&lt;=$cuantos; $i++)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  <span style="color: #0000ff">echo</span> <span style="color: #006080">&quot;&lt;Rectangle Canvas.Top='&quot;</span> . $i * 10 . <span style="color: #006080">&quot;' Canvas.Left='&quot;</span> . $i * 10 . <span style="color: #006080">&quot;' Width='30' Height='30' Fill='Red' Stroke='Black' /&gt;&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">echo</span> <span style="color: #006080">&quot;&lt;/Canvas&gt;&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">?&gt;</pre>
<p><!--CRLF--></div>
</div>
<p>Es importante resaltar en especial la siguiente línea:</p>
<p><em>header(&#8216;Content-Type: text/xaml&#8217;);</em></p>
<p>la cual establece que el tipo de contenido que regresará la página .php será de tipo Xaml (también funciona con el content type text/xml ya que Xaml no es más que Xml).&#160; Lo anterior es de suma de importancia ya que estamos redefiniendo el comportamiento predeterminado que tiene PHP de regresar HTML.</p>
<p>Ahora bien, como podrán darse cuenta el código obtiene el número de rectángulos a crear por medio del parámetro r del Querystring.&#160; Lo que hacemos es simplemente hacer un bucle <em>for</em> para la creación dinámica del Xaml que represente el número buscado de rectángulos.&#160; Recuerden que cuando generamos Xaml dinámico es necesario incluir el xmlns por default en el contenedor raíz, si es que interpretaremos este código Xaml utilizando XamlReader.Load().</p>
<p>Lo que resta será escribir el código necesario en nuestra aplicación Silverlight para ejecutar la página php y obtener el resultado de su ejecución (lo cual será efectivamente contenido Xaml).&#160; El siguiente código muestra el manejador del evento Loaded del UserControl MainPage:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">public</span> <span style="color: #0000ff">partial</span> <span style="color: #0000ff">class</span> MainPage : UserControl</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">public</span> MainPage()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        InitializeComponent();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">this</span>.Loaded += <span style="color: #0000ff">new</span> RoutedEventHandler(MainPage_Loaded);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">void</span> MainPage_Loaded(<span style="color: #0000ff">object</span> sender, RoutedEventArgs e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        WebClient client = <span style="color: #0000ff">new</span> WebClient();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        client.DownloadStringCompleted += (s, a) =&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">            <span style="color: #0000ff">if</span> (a.Error == <span style="color: #0000ff">null</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">            {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">                <span style="color: #0000ff">string</span> result = a.Result;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">                var newElement = XamlReader.Load(result) <span style="color: #0000ff">as</span> UIElement;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">                LayoutRoot.Children.Clear();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">                LayoutRoot.Children.Add(newElement);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">            }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">int</span> r = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">try</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">            <span style="color: #0000ff">if</span> (HtmlPage.Document.QueryString[<span style="color: #006080">&quot;r&quot;</span>] != <span style="color: #0000ff">null</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">            {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">                r = <span style="color: #0000ff">int</span>.Parse(HtmlPage.Document.QueryString[<span style="color: #006080">&quot;r&quot;</span>]);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">            }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">catch</span> (Exception)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">            r = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">string</span> url = <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;/Content.php?r={0}&quot;</span>, r);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        client.DownloadStringAsync(<span style="color: #0000ff">new</span> Uri(url, UriKind.RelativeOrAbsolute));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">}</pre>
<p><!--CRLF--></div>
</div>
<p>La propiedad HtmlPage.Document.QueryString (parte del Puente HTML) permite leer el parámetro r que puede establecer el usuario en la página .html y que a su vez será utilizado para la invocación de la página Content.php.&#160; El resto del código se encarga de obtener el resultado de la descarga del endpoint (Content.php) e interpretar el resultado por medio del método XamlReader.Load().</p>
<p>La siguiente figura muestra el resultado de ejecutar la siguiente página:</p>
<p><a title="http://localhost:9050/PHPDynamicXamlTestPage.html?r=12" href="http://localhost:9050/PHPDynamicXamlTestPage.html?r=12">http://localhost:9050/PHPDynamicXamlTestPage.html?r=12</a></p>
<p><img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" src="http://farm3.static.flickr.com/2477/3815269774_2a49c85b40.jpg" /> </p>
<p>Lo anterior demuestra que PHP, además de permitirnos hospedar las aplicaciones Silverlight, lo podemos usar para la creación dinámica de contenido Xaml.</p>
]]></content:encoded>
			<wfw:commentRss>http://rdiazconcha.com/2009/08/creando-contenido-dinmico-en-php-para-silverlight/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Otro mapa de M&#233;xico en XAML</title>
		<link>http://rdiazconcha.com/2008/11/otro-mapa-de-mxico-en-xaml/</link>
		<comments>http://rdiazconcha.com/2008/11/otro-mapa-de-mxico-en-xaml/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 00:23:12 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[La Liga Silverlight]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://rdiazconcha.com/?p=23</guid>
		<description><![CDATA[Siguiendo la iniciativa que mencioné hace algunos días, mi buen amigo y colega Martín Uresti me pasó otro mapa de la República Mexicano en XAML más detallado y preciso para usarlo en nuestras aplicaciones Silverlight / WPF.  Muchas gracias Martín por tu colaboración y por compartirnos este gran recurso que será sin duda alguna de [...]]]></description>
			<content:encoded><![CDATA[<p>Siguiendo la iniciativa que mencioné <a href="http://rdiazconcha.com/?p=22" target="_blank">hace algunos días</a>, mi buen amigo y colega Martín Uresti me pasó <a href="http://www.ligasilverlight.com/home/LinkClick.aspx?fileticket=HHTul%2fHsHf8%3d&amp;tabid=57&amp;mid=376" target="_blank">otro mapa de la República Mexicano en XAML</a> más detallado y preciso para usarlo en nuestras aplicaciones Silverlight / WPF.  Muchas gracias Martín por tu colaboración y por compartirnos este gran recurso que será sin duda alguna de mucha ayuda para más de una persona.</p>
<p>El mapa lo pueden descargar de <a href="http://www.LigaSilverlight.com" target="_blank">La Liga Silverlight</a> en su sección “Contenido” o haciendo clic directamente <a href="http://www.ligasilverlight.com/home/LinkClick.aspx?fileticket=HHTul%2fHsHf8%3d&amp;tabid=57&amp;mid=376" target="_blank">aquí</a>.</p>
<p><a href="http://farm4.static.flickr.com/3027/3046267003_14296a3052_b.jpg" target="_blank"><img src="http://farm4.static.flickr.com/3027/3046267003_14296a3052.jpg" alt="" /></a></p>
<p><em>Haz clic en la foto para verla más grande</em></p>
<p>Espero les sea de ayuda!</p>
]]></content:encoded>
			<wfw:commentRss>http://rdiazconcha.com/2008/11/otro-mapa-de-mxico-en-xaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapa de M&#233;xico en XAML !!!</title>
		<link>http://rdiazconcha.com/2008/11/mapa-de-m-233-xico-en-xaml/</link>
		<comments>http://rdiazconcha.com/2008/11/mapa-de-m-233-xico-en-xaml/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 00:11:48 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[La Liga Silverlight]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://rdiazconcha.com/?p=22</guid>
		<description><![CDATA[Acabo de terminar la primer versión del mapa de mi querido país México en versión XAML (de hecho, creo que es el primer mapa de México con sus estados en XAML  ) para todos aquellos desarrolladores y entusiastas de las tecnologías Silverlight o Windows Presentation Foundation –principalmente mexicanos- que deseen incorporarlo en sus soluciones.  [...]]]></description>
			<content:encoded><![CDATA[<p>Acabo de terminar la primer versión del mapa de mi querido país México <strong>en versión XAML</strong> (de hecho, creo que es el primer mapa de México con sus estados en XAML <img src='http://rdiazconcha.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) para todos aquellos desarrolladores y entusiastas de las tecnologías <a href="http://silverlight.net/" target="_blank">Silverlight</a> o Windows Presentation Foundation –principalmente mexicanos- que deseen incorporarlo en sus soluciones.  Este mapa puede ser punto de inicio para nuevas y emocionantes interfaces de usuario para brindar a los usuarios de nuestras aplicaciones una mejor experiencia en su uso.  Incluso para aplicaciones didácticas novedosas que deseen mostrar información relacionada con cada estado de la República, o para aplicaciones que necesiten filtrar información para cada estado, etc.  (Atención INEGI) <img src='http://rdiazconcha.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .  Crearlo me llevó algunas horas de trabajo y el uso de diversas herramientas como Expression Design, Photoshop y Expression Blend.</p>
<p>El mapa incluye los 32 estados de la República Mexicana, cada uno implementado en un <span style="font-family: Consolas; font-size: medium;">&lt;Canvas&gt;</span> con el nombre de estado para poder identificarlos apropiadamente cuando deseemos programar algún tipo de comportamiento o funcionalidad en ellos.</p>
<p><a href="http://farm4.static.flickr.com/3160/3004854132_67fabc89ce_b.jpg" target="_blank"><img title="Visual Studio .NET 2008 mostrando el mapa de México hecho XAML" src="http://farm4.static.flickr.com/3160/3004854132_67fabc89ce.jpg" alt="Visual Studio .NET 2008 mostrando el mapa de México hecho XAML" /></a></p>
<p><em>Haz clic en la imagen para ver la versión completa</em></p>
<p>Asimismo, para aquellos desarrolladores que deseen tener un código de ejemplo de cómo podemos utilizar este mapa, aquí les dejo a continuación el código necesario para identificar por medio de un color diferente el estado que esté seleccionado (que esté obteniendo el foco por medio del cursor del mouse):</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: #f4f4f4; width: 97.5%; font-family: consolas,'Courier New',courier,monospace; max-height: 200px; font-size: 8pt; cursor: text;">
<div style="border-style: none; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"><span style="color: #0000ff;">namespace</span> Rodrigo.Maps</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">{</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">partial</span> <span style="color: #0000ff;">class</span> Mexico : UserControl</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">    {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        Brush original;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #0000ff;">public</span> Mexico()</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            InitializeComponent();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            original = (Brush)<span style="color: #0000ff;">this</span>.Resources[<span style="color: #006080;">"brochaVerde"</span>];</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            <span style="color: #0000ff;">foreach</span> (UIElement estado <span style="color: #0000ff;">in</span> <span style="color: #0000ff;">this</span>.mexico.Children)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">                <span style="color: #0000ff;">if</span> (estado <span style="color: #0000ff;">is</span> Canvas)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">                {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">                    RegisterEvents(estado <span style="color: #0000ff;">as</span> Canvas);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">                }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            <span style="color: #008000;">//Español: También podemos hacer esto:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            <span style="color: #008000;">//English: We could do this as well:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            <span style="color: #008000;">//RegisterEvents(Aguascalientes);</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            <span style="color: #008000;">//RegisterEvents(BC);</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            <span style="color: #008000;">//RegisterEvents(NuevoLeon);</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            <span style="color: #008000;">//...</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// Español: Registra los manejadores de eventos para el estado especificado en el parámetro</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// English: Register the event handlers for the state specified in the parameter</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;/summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;param name="estado"&gt;&lt;/param&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #0000ff;">void</span> RegisterEvents(Canvas estado)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            estado.MouseEnter += <span style="color: #0000ff;">new</span> MouseEventHandler(<span style="color: #0000ff;">this</span>.Estado_MouseEnter);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            estado.MouseLeave += <span style="color: #0000ff;">new</span> MouseEventHandler(<span style="color: #0000ff;">this</span>.Estado_MouseLeave);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            estado.MouseLeftButtonUp += <span style="color: #0000ff;">new</span> MouseButtonEventHandler(<span style="color: #0000ff;">this</span>.Estado_MouseButtonUp);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// Español: Muestra el nombre del estado en una alerta al hacer clic</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// English: Displays the state name when clicked</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;/summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;param name="sender"&gt;&lt;/param&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;param name="e"&gt;&lt;/param&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #0000ff;">void</span> Estado_MouseButtonUp(<span style="color: #0000ff;">object</span> sender, MouseButtonEventArgs e)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            HtmlPage.Window.Alert(((Canvas)sender).Name);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// Español: Cambia el color del estado que está recibiendo el foco</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// English: Changes the state color when the mouse cursor hovers</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;/summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;param name="sender"&gt;&lt;/param&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;param name="e"&gt;&lt;/param&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #0000ff;">void</span> Estado_MouseEnter(<span style="color: #0000ff;">object</span> sender, MouseEventArgs e)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            ((Path)((Canvas)sender).Children[0]).Fill = <span style="color: #0000ff;">new</span> SolidColorBrush(Colors.Magenta);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// Español: Regresa el color original del estado al perder el foco</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// English: Rolls back to the original color when the mouse cursor leaves</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;/summary&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;param name="sender"&gt;&lt;/param&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #008000;">/// &lt;param name="e"&gt;&lt;/param&gt;</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        <span style="color: #0000ff;">void</span> Estado_MouseLeave(<span style="color: #0000ff;">object</span> sender, MouseEventArgs e)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">            ((Path)((Canvas)sender).Children[0]).Fill = original;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">}</pre>
</div>
</div>
<p>Y claro está, no olviden modificar la propiedad <span style="font-family: Consolas; font-size: medium;">RootVisual</span> de la aplicación para ejecutar correctamente Mexico.xaml:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: #f4f4f4; width: 97.5%; font-family: consolas,'Courier New',courier,monospace; max-height: 200px; font-size: 8pt; cursor: text;">
<div style="border-style: none; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"><span style="color: #0000ff;">private</span> <span style="color: #0000ff;">void</span> Application_Startup(<span style="color: #0000ff;">object</span> sender, StartupEventArgs e)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">{</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">    <span style="color: #0000ff;">this</span>.RootVisual = <span style="color: #0000ff;">new</span> Rodrigo.Maps.Mexico();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">}</pre>
</div>
</div>
<p>El mapa de México en XAML lo pueden <a href="http://cid-7565606b158be329.skydrive.live.com/self.aspx/Public/Mexico.xaml" target="_blank">descargar aquí</a></p>
<p>Próximamente estaré escribiendo un artículo de cómo podemos hacer un control reutilizable para <a href="http://silverlight.net/" target="_blank">Silverlight</a> utilizando este mapa de México hecho XAML.</p>
<p>Espero les sea de utilidad.</p>
<p>Salu2!</p>
]]></content:encoded>
			<wfw:commentRss>http://rdiazconcha.com/2008/11/mapa-de-m-233-xico-en-xaml/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

