<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
>

<channel>
	<title>Yohan Jasdid&#039;s Blog &#38; Stories &#187; Bits</title>
	<atom:link href="http://yohan.jasdid.com/http:/yohan.jasdid.com/bits/feed/" rel="self" type="application/rss+xml" />
	<link>http://yohan.jasdid.com</link>
	<description>Around the world..</description>
	<lastBuildDate>Fri, 11 Nov 2011 17:20:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<!-- podcast_generator="Blubrry PowerPress/2.0.4" -->
	<itunes:summary>Around the world..</itunes:summary>
	<itunes:author>Yohan Jasdid&#039;s Blog &amp; Stories</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://yohan.jasdid.com/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:subtitle>Around the world..</itunes:subtitle>
	<image>
		<title>Yohan Jasdid&#039;s Blog &amp; Stories &#187; Bits</title>
		<url>http://yohan.jasdid.com/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://yohan.jasdid.com/http:/yohan.jasdid.com/bits/</link>
	</image>
		<item>
		<title>Suma de Riemann</title>
		<link>http://yohan.jasdid.com/2011/10/suma-de-riemann/</link>
		<comments>http://yohan.jasdid.com/2011/10/suma-de-riemann/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 00:51:28 +0000</pubDate>
		<dc:creator>yohan.jasdid</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Bits]]></category>
		<category><![CDATA[Ph.D.]]></category>

		<guid isPermaLink="false">http://yohan.jasdid.com/?p=1939</guid>
		<description><![CDATA[En matemáticas, la suma de Riemann es un método de integración numérica que nos sirve para calcular el valor de una integral definida es decir el área bajo una curva, este metodo es muy útil cuando no es posible utilizar el Teorema Fundamental del Cálculo. Estas sumas toman su nombre del matemático alemán Bernhard Riemann. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">En matemáticas, la suma de Riemann es un método de integración numérica que nos sirve para calcular el valor de una integral definida es decir el<a href="http://yohan.jasdid.com/wp-content/uploads/2011/10/riemann.gif"><img class="alignright size-full wp-image-1943" title="riemann" src="http://yohan.jasdid.com/wp-content/uploads/2011/10/riemann.gif" alt="" width="312" height="312" /></a> área bajo una curva, este metodo es muy útil cuando no es posible utilizar el Teorema Fundamental del Cálculo. Estas sumas toman su nombre del matemático alemán Bernhard Riemann.</p>
<p style="text-align: justify;">La suma de Riemann consiste básicamente en trazar un número finito de rectangulos dentro de un área irregular, calcular el área de cada uno de los rectangulos y sumarlos. El problema de este método de integración numérica es que al sumar las áreas se obtiene un margen de error muy grande.</p>
<p style="text-align: justify;">Fuente: <a href="http://es.wikipedia.org/wiki/Suma_de_Riemann" target="_blank">Wikipedia</a></p>
<p>Últimamente estuve trabajando en un programa para resolver cuestiones de integración numéricamente ya que fue una de las encomiendas de mi asesor el Dr. Jesus Manzanares creo que este es un &#8220;Baby Step&#8221; que nos llevara a resolver algo mucho mas complejo, creí que era relevante incluir la descripción de la integración numérica por lo que incluí la definición de wikipedia que es buena,</p>
<p>Cabe complementar un poco la definición y agregar que entre mas rectangulos se le agreguen al problema la aproximación de la solución es mucho mas exacta, y de acuerdo a pruebas hechas llegando a 100 ó poco mas de esa cantidad se logra tener una aproximación de la solución bastante aceptable <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Bueno creo que ya fue demasiada teoría aunque realmente la teoría nunca es suficiente, a continuación se presenta una implementación en web de la Suma de Riemann, para tener información mas amplia de como realizar un programa en web puedes visitar el post <a title="¿Como portar una aplicacion existente a una solucion web?" href="http://yohan.jasdid.com/2011/10/%C2%BFcomo-portar-una-aplicacion-existente-a-una-solucion-web/" rel="bookmark" target="_blank">¿Como portar una aplicacion existente a una solucion web?</a></p>
<p>La aplicación esta diseñada para resolver 3 tipos de integrales, las siguientes:</p>
<p class="ql-center-displayed-equation" style="line-height: 58px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://yohan.jasdid.com/wp-content/ql-cache/quicklatex.com-a9e209f50affd9c1ab7434564d30521c_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91; &#92;&#98;&#111;&#120;&#101;&#100;&#123;&#102;&#40;&#120;&#41;&#61;&#92;&#105;&#110;&#116;&#95;&#48;&#94;&#49;&#123;&#120;&#94;&#50;&#125;&#92;&#44;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#100;&#125;&#120;&#125; &#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p class="ql-center-displayed-equation" style="line-height: 58px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://yohan.jasdid.com/wp-content/ql-cache/quicklatex.com-05fcc68b1a270e81e21ed8c2146f923d_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91; &#92;&#98;&#111;&#120;&#101;&#100;&#123;&#102;&#40;&#120;&#41;&#61;&#92;&#105;&#110;&#116;&#95;&#48;&#94;&#49;&#123;&#120;&#94;&#51;&#125;&#92;&#44;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#100;&#125;&#120;&#125; &#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p class="ql-center-displayed-equation" style="line-height: 58px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://yohan.jasdid.com/wp-content/ql-cache/quicklatex.com-528e1d408f749f29baf613d7246c1ea4_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91; &#92;&#98;&#111;&#120;&#101;&#100;&#123;&#102;&#40;&#120;&#41;&#61;&#92;&#105;&#110;&#116;&#95;&#48;&#94;&#49;&#92;&#99;&#111;&#115;&#40;&#120;&#41;&#92;&#44;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#100;&#125;&#120;&#125; &#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p>Donde el rango de la integral es totalmente parametrizable en la implementacion, y en donde para realizar la integración numérica se deberá hacer una sumatoria, a continuación se enlista el código en C++ de la implementación, seguido de la aplicación en sí corriendo en web.</p>
<pre class="brush: cpp; title: ; notranslate">
/*
 * File:   NumericalIntegral.cpp
 * Author: Yohan Jasdid
 *
 * Created on October 15, 2011, 4:36 PM
 */
#include
#include
#include
#include

#include
#include
#include
#include
#include
#include

#include &quot;getpost.h&quot;
#include &quot;json/reader.h&quot;
#include &quot;json/writer.h&quot;
#include &quot;json/elements.h&quot;

using namespace std;
using namespace json;

string exec(char* cmd);
void ReturnError(string error);

/**
 * Main function
 * @return
 */
int main()
{
    map  Post;
    initializePost(Post);   //notice that the variable are passed by reference!

    cout &lt;&lt; &quot;content-type: application/json&quot; &lt;&lt; endl &lt;&lt; endl;

    string userData;
    string message = &quot;&quot;;
    if (Post.find(&quot;UserData&quot;) != Post.end())
    {
        userData = Post[&quot;UserData&quot;].c_str();
    }
    else
    {
        ReturnError(&quot;Some requiered parameters were not provided, try again.
&quot;);
        return 1;
    }

    Object objDocument;
    try
    {
        std::istringstream jsonData(userData);
        Reader::Read(objDocument, jsonData);

        // Get and parse parameters
        String jsonSX = objDocument[&quot;SX&quot;];
        String jsonEX = objDocument[&quot;EX&quot;];
        String jsonN = objDocument[&quot;N&quot;];
        String jsonFnc = objDocument[&quot;Fnc&quot;];

        double start_x = atof(jsonSX.Value().c_str());
        double end_x = atof(jsonEX.Value().c_str());
        double interval = end_x - (start_x);
        double max_n = atof(jsonN.Value().c_str());
        int fnction = atoi(jsonFnc.Value().c_str());

        // We must generate a unique ID for naming our data graph file
        char uuidgen[] = &quot;uuidgen&quot;;
        string uuid = exec(uuidgen);

        // Define files and folders
        string gpFolder = &quot;../gnuplot/&quot;;
        string gpDataFile = gpFolder + uuid + &quot;.dat&quot;;          // data file
        string gpGraphFile =  gpFolder + uuid + &quot;.png&quot;;        // graph file
        string gpCommandFile =  gpFolder + uuid + &quot;.gnuplot&quot;;  // gnuplot command file

        // Create data file
        ofstream gpData;
        gpData.open((gpDataFile).c_str());
        if(!gpData)
        {
            ReturnError(&quot;** Failed to create the graph file.
&quot;);
            return 1;
        }

        // search for all n..
        stringstream data;
        for (double i = 1; i         {
            double n = i;
            double delta_x = interval / n;
            double x_i = start_x;
            double total = 0.0;
            double function = 0.0;

            for (double j = 1; j             {
                x_i = x_i + delta_x;
                switch (fnction)
                {
                    case 1:
                        function = x_i * x_i;
                        break;
                    case 2:
                        function = x_i * x_i * x_i;
                        break;
                    case 3:
                        function = cos(x_i);
                        break;
                }
                total = total + ((function) * delta_x);
            }

            data &lt;&lt; data &lt;&lt; i &lt;&lt; &quot; &quot; &lt;&lt; total &lt;&lt; endl;
            gpData &lt;&lt; i &lt;&lt; &quot; &quot; &lt;&lt; total &lt;&lt; &quot;\n&quot;;
        }
        gpData.close();

        // We must build a gnuplot commands file
        ofstream gpCommands;
        gpCommands.open((gpCommandFile).c_str());
        if(!gpCommands)
        {
            ReturnError(&quot;** Failed to create the graph file.
&quot;);
            return 1;
        }

        gpCommands &lt;&lt; &quot;set title 'Integral Numerica'&quot; &lt;&lt; &quot;\n&quot;;
        gpCommands &lt;&lt; &quot;set term png small&quot; &lt;&lt; &quot;\n&quot;;
        gpCommands &lt;&lt; &quot;set output &quot; &lt;&lt; &quot;'&quot; &lt;&lt; gpGraphFile &lt;&lt; &quot;'&quot; &lt;&lt; &quot;\n&quot;;
        gpCommands &lt;&lt; &quot;set nokey&quot; &lt;&lt; &quot;\n&quot;;
        gpCommands &lt;&lt; &quot;plot '&quot; &lt;&lt; gpDataFile &lt;&lt; &quot;' using 1:2 with lines&quot; &lt;&lt; &quot;\n&quot;;
        gpCommands.close();

        // Execute gnuplot and generate graph
        string commds = &quot;gnuplot '&quot; + gpCommandFile + &quot;'&quot;;
        char *cmds = (char*)commds.c_str();
        exec(cmds);

        // Results ***
        // Build a json object to return as response of the request
        message += &quot;Calculations finished without errors.
&quot;;
        Object objResponse;
        objResponse[&quot;Error&quot;] = String(&quot;&quot;);
        objResponse[&quot;Message&quot;] = String(message.c_str());
        objResponse[&quot;DataFile&quot;] = String(gpDataFile.c_str());
        objResponse[&quot;CommandFile&quot;] = String(gpCommandFile.c_str());
        objResponse[&quot;GraphFile&quot;] = String(gpGraphFile.c_str());
        objResponse[&quot;PlainData&quot;] = String(data.str());

        std::stringstream jsonStream;
        Writer::Write(objResponse, jsonStream);
        cout &lt;&lt; jsonStream.str();
    }
    catch (exception&amp; e)
    {
        ReturnError(&quot;** Something went wrong, please report this problem to the system administrator.
&quot;);
        return 1;
    }
    return 0;
}

/**
 * @brief Returns an error in json format
 * @error The error description to be returned
 *
 * This method executes a bash command using a pipe and a buffer to capture the
 * result of the execution, then return the execution to client code.
 */
void ReturnError(string error)
{
  Object objResponse;
  objResponse[&quot;Error&quot;] = String(error.c_str());

  std::stringstream jsonStream;
  Writer::Write(objResponse, jsonStream);
  cout &lt;&lt; jsonStream.str();
}

/**
 * @brief Executes a shell command
 * @param cmd The command to execute
 * @return The result of the execution
 *
 * This method executes a bash command using a pipe and a buffer to capture the
 * result of the execution, then return the execution to client code.
 */
string exec(char* cmd)
{
    FILE* pipe = popen(cmd, &quot;r&quot;);
    if (!pipe)
        return &quot;ERROR&quot;;

    char buffer[128];
    string result = &quot;&quot;;
    while(!feof(pipe))
    {
        if(fgets(buffer, 128, pipe) != NULL)
            result += buffer;
    }
    pclose(pipe);

    // remove carriage return (new lines)
    result.erase(std::remove(result.begin(), result.end(), '\n'), result.end());
    return result;
}
</pre>
<p style="text-align: justify;">Los resultados del programa muestran la resolución de la integral numérica para un numero de particiones (n) dado, que son los rectángulos a resolver y sumar, entre mayor sea el número de rectángulos mayor sera la exactitud del resultado, a continuación se muestran los resultados para n=5, n=50 y n=100.</p>
<p style="text-align: justify;">N=5</p>
<p style="text-align: justify;"><a href="http://yohan.jasdid.com/wp-content/uploads/2011/10/n51.png"><img class="aligncenter size-full wp-image-1957" title="n5" src="http://yohan.jasdid.com/wp-content/uploads/2011/10/n51.png" alt="" width="640" height="480" /></a>N=50</p>
<p style="text-align: justify;"><a href="http://yohan.jasdid.com/wp-content/uploads/2011/10/n50.png"><img class="aligncenter size-full wp-image-1958" title="n50" src="http://yohan.jasdid.com/wp-content/uploads/2011/10/n50.png" alt="" width="640" height="480" /></a>N=100</p>
<p style="text-align: justify;"><a href="http://yohan.jasdid.com/wp-content/uploads/2011/10/n100.png"><img class="aligncenter size-full wp-image-1959" title="n100" src="http://yohan.jasdid.com/wp-content/uploads/2011/10/n100.png" alt="" width="640" height="480" /></a></p>
<p style="text-align: justify;">Como se puede ver en los resultados anteriores el resultado converge rápidamente con el resultado real lo cual es bueno ya que se puede obtener una aproximación muy decente utilizando el poder de procesamiento y la fuerza bruta de la computadora..</p>
<p style="text-align: justify;">Como punto final se anexa a continuación la implementación de dicha integral numérica donde se puede jugar con los parámetros de entrada para obtener un resultado deseado y su gráfica correspondiente.</p>
<div class="pageview">
	
  <iframe src="http://phoxonics.dyndns.org:8080/NumericalIntegral.htm" frameborder="0" style="" scrolling="auto" height="100%" width="100%">Get a better browser!</iframe>
</div>

<p>enjoy! <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Suma+de+Riemann+http%3A%2F%2Fis.gd%2FKhMa4Y" title="Post to Twitter"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://yohan.jasdid.com/2011/10/suma-de-riemann/&amp;title=Suma+de+Riemann" title="Post to Delicious"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://yohan.jasdid.com/2011/10/suma-de-riemann/&amp;t=Suma+de+Riemann" title="Post to Facebook"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Suma+de+Riemann&amp;body=Link:+http://yohan.jasdid.com/2011/10/suma-de-riemann/%0D%0A%0D%0A----%0D%0A+En+matem%C3%A1ticas%2C+la+suma+de+Riemann+es+un+m%C3%A9todo+de+integraci%C3%B3n+num%C3%A9rica+que+nos+sirve+para+calcular+el+valor+de+una+integral+definida+es+decir+el+%C3%A1..." title="Send Gmail"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/gmail/tt-gmail-micro3.png" alt="Send Gmail" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://yohan.jasdid.com/2011/10/suma-de-riemann/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Firestarter</title>
		<link>http://yohan.jasdid.com/2010/12/silverlight-firestarter/</link>
		<comments>http://yohan.jasdid.com/2010/12/silverlight-firestarter/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 18:52:32 +0000</pubDate>
		<dc:creator>yohan.jasdid</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[silverlight firestarter]]></category>

		<guid isPermaLink="false">http://yohan.jasdid.com/?p=1141</guid>
		<description><![CDATA[Un post rapido solo para recomendar que si pueden ver el dia de hoy el Silverlight Firestarter entren al stream esta muy interesante estara todo el dia y es en vivo tocando temas de nuevas tecnologias aqui les dejo el enlace para los interesados.. http://www.silverlight.net/news/events/firestarter/ Y por ultimo es raro trabajar en media pantalla pero [...]]]></description>
			<content:encoded><![CDATA[<p>Un post rapido solo para recomendar que si pueden ver el dia de hoy el Silverlight Firestarter entren al stream esta muy interesante estara todo el dia y es en vivo tocando temas de nuevas tecnologias aqui les dejo el enlace para los interesados..</p>
<p><a href="http://www.silverlight.net/news/events/firestarter/" target="_blank">http://www.silverlight.net/news/events/firestarter/</a></p>
<p><a href="http://yohan.jasdid.com/wp-content/uploads/2010/12/desktop3.jpg"><img class="alignnone size-large wp-image-1149" title="desktop" src="http://yohan.jasdid.com/wp-content/uploads/2010/12/desktop3-1024x606.jpg" alt="" width="737" height="437" /></a></p>
<p>Y por ultimo es raro trabajar en media pantalla pero no tengo de otra jajaj asi luce mi desktop el dia de hoy..</p>
<p>Saludos! <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Silverlight+Firestarter+http%3A%2F%2Fis.gd%2FHET5fj" title="Post to Twitter"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://yohan.jasdid.com/2010/12/silverlight-firestarter/&amp;title=Silverlight+Firestarter" title="Post to Delicious"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://yohan.jasdid.com/2010/12/silverlight-firestarter/&amp;t=Silverlight+Firestarter" title="Post to Facebook"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Silverlight+Firestarter&amp;body=Link:+http://yohan.jasdid.com/2010/12/silverlight-firestarter/%0D%0A%0D%0A----%0D%0A+Un+post+rapido+solo+para+recomendar+que+si+pueden+ver+el+dia+de+hoy+el+Silverlight+Firestarter+entren+al+stream+esta+muy+interesante+estara+todo+el..." title="Send Gmail"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/gmail/tt-gmail-micro3.png" alt="Send Gmail" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://yohan.jasdid.com/2010/12/silverlight-firestarter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extraño comportamiento usando yield y manejo de exceptiones</title>
		<link>http://yohan.jasdid.com/2010/11/extrano-comportamiento-usando-yield-y-manejo-de-exceptiones/</link>
		<comments>http://yohan.jasdid.com/2010/11/extrano-comportamiento-usando-yield-y-manejo-de-exceptiones/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 19:11:13 +0000</pubDate>
		<dc:creator>yohan.jasdid</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[yield postsharp behavior]]></category>

		<guid isPermaLink="false">http://yohan.jasdid.com/?p=1118</guid>
		<description><![CDATA[Trabajando en un proyecto y de alguna manera llegue a ver el escenario que a continuacion describo al momento de utilizar el operaror yield y manejo de excepciones con PostSharp.. Resulta que cuando utilizas yield para regresar una lista tipo IEnumerable y en el metodo hijo en el cual utilizas yield ocurre una exception hay [...]]]></description>
			<content:encoded><![CDATA[<p>Trabajando en un proyecto y de alguna manera llegue a ver el escenario que a continuacion describo al momento de utilizar el operaror yield y manejo de excepciones con PostSharp..</p>
<p>Resulta que cuando utilizas yield para regresar una lista tipo IEnumerable y en el metodo hijo en el cual utilizas yield ocurre una exception hay un comportamiento un tanto raro o al menos para mi que no soy un experto en C#, quise hacer un proyecto de ejemplo para ilustrar mejor el comportamiento que describo, a continuacion pongo la clase de un proyecto de consola que hice:</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PostSharpYieldSample
{
    public class Program
    {
        public static void Main(string[] args)
        {
            ParentMethod();
            Console.WriteLine(&quot;press any key to end.&quot;);
            Console.ReadLine();
        }

        private static IEnumerable&lt;string&gt; _myList;

        /// &lt;summary&gt;
        /// Parent
        /// &lt;/summary&gt;
        [ExceptionHandlerAspect]
        public static void ParentMethod()
        {
            Console.WriteLine(&quot;In parent Method.&quot;);
            _myList = ChildYieldMethod();

            // comment the lines below to &quot;EAT&quot; the exception message
            foreach (string str in _myList)
                Console.Write(str);
        }

        /// &lt;summary&gt;
        /// Child method using yield
        /// &lt;/summary&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public static IEnumerable&lt;string&gt; ChildYieldMethod()
        {
            Console.WriteLine(&quot;In child Method.&quot;);
            String[] data = { &quot;Item 1&quot;, &quot;Item 2&quot;, &quot;Item 3&quot; };

            foreach (string myString in data)
            {
                yield return myString;
                throw new Exception(&quot;Some exception happen here&quot;);
            }
        }
    }
}
</pre>
<p>Como se puede ver estoy utilizando un Aspecto de PostSharp en el metodo ParentMethod() para &#8220;cachar&#8221; todas las excepciones que pudieran ocurrir en el metodo, a continuacion enlisto el aspecto que estoy utilizando:</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PostSharp.Aspects;
using System.Diagnostics;

namespace PostSharpYieldSample
{
    /// &lt;summary&gt;
    /// Aspect class that handles errors using postsharp
    /// &lt;/summary&gt;
    [Serializable]
    public sealed class ExceptionHandlerAspect : OnExceptionAspect
    {
        /// &lt;summary&gt;
        /// The flow behavior to use.
        /// &lt;/summary&gt;
        private FlowBehavior flowBehavior;

        /// &lt;summary&gt;
        /// Default Constructor
        /// &lt;/summary&gt;
        public ExceptionHandlerAspect()
            : this(FlowBehavior.Return)
        {
        }

        /// &lt;summary&gt;
        /// Creates an instance specifying the flow behavior to use
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;flowBehavior&quot;&gt;The flow behavior&lt;/param&gt;
        public ExceptionHandlerAspect(FlowBehavior flowBehavior)
        {
            this.flowBehavior = flowBehavior;
        }

        /// &lt;summary&gt;
        /// Method invoked upon failure of the method to which the current
        /// aspect is applied.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;args&quot;&gt;Information about the method being executed.&lt;/param&gt;
        public override void OnException(MethodExecutionArgs args)
        {
            string errorInfo = string.Format(&quot;{0}() {1} - PostSharp message.&quot;, args.Method.Name, args.Exception.Message);
            Console.WriteLine(errorInfo);
            args.FlowBehavior = flowBehavior;
        }

    }
}
</pre>
<p>Este aspecto es muy sencillo y lo utilice solo para fines de la demostracion y lo unico que hace es que me regresa un mensaje personalizado de la excepcion que ocurrio en el metodo donde se definio el aspecto (atributo), al ejecutar la aplicacion de ejemplo se vera la siguiente pantalla:</p>
<p><a href="http://yohan.jasdid.com/wp-content/uploads/2010/11/PostSharpYieldSample.jpg"><img class="size-full wp-image-1125 alignnone" title="PostSharpYieldSample" src="http://yohan.jasdid.com/wp-content/uploads/2010/11/PostSharpYieldSample.jpg" alt="" width="677" height="342" /></a></p>
<p>Cosa que tiene sentido ya que el flujo del programa entro en el metodo donde utilizo yield y solo regreso el primer elemento para despues lanzar la excepcion especificada, en este caso PostSharp &#8220;atrapa&#8221; correctamente la excepcion y la muestra en pantalla, este es el comportamiennto esperado, El problema viene cuando comentamos las lineas del parent method donde se hace referencia a la lista que se lleno mediante yield, estas lineas comentadas son las siguientes:</p>
<pre class="brush: csharp; title: ; notranslate">
            // comment the lines below to &quot;EAT&quot; the exception message
            //foreach (string str in _myList)
            //    Console.Write(str);
</pre>
<p>Al momento de comentar estas lineas y volver a ejecutar el programa algo &#8220;raro&#8221; ocurre con la excepcion, lo que ocurre es que practicamente la excepcion es omitida o practicamente nuca llegamos a ejecutar el metodo donde utilizamos yield, el resultado luciria algo como lo siguiente:</p>
<p><a href="http://yohan.jasdid.com/wp-content/uploads/2010/11/yield-behavior.jpg"><img class="size-full wp-image-1126 alignnone" title="yield behavior" src="http://yohan.jasdid.com/wp-content/uploads/2010/11/yield-behavior.jpg" alt="" width="677" height="342" /></a></p>
<p>Habra que investigar mas sobre lo que la palabra reservada yield hace en este caso internamente ya que a mi punto de vista no es un comportamiento obvio al que uno concluiria facilmente, a continuacion pongo el enlace del codigo fuente de la aplicacion ejemplo..</p>
<p><a href="http://yohan.jasdid.com/wp-content/uploads/2010/11/PostSharpYieldSample.rar" target="_blank"><img class="alignnone size-full wp-image-1131" title="download" src="http://yohan.jasdid.com/wp-content/uploads/2010/11/download.png" alt="" width="128" height="128" /></a></p>
<p><a href="http://yohan.jasdid.com/wp-content/uploads/2010/11/PostSharpYieldSample.rar" target="_blank">PostSharpYieldSample</a></p>
<p>Pd. Creo que se me olvido hablar un poco mas acerca de PostSharp y programacion orientada a aspectos, es buen tema para un post que publicare mas adelante en estos dias por si te interesa saber mas sobre el tema de todos modos en la red hay mucha informacion sobre ello..</p>
<p>Saludos! <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Extra%C3%B1o+comportamiento+usando+yield+y+manejo+de+exceptiones+http%3A%2F%2Fis.gd%2FlbEkAe" title="Post to Twitter"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://yohan.jasdid.com/2010/11/extrano-comportamiento-usando-yield-y-manejo-de-exceptiones/&amp;title=Extra%C3%B1o+comportamiento+usando+yield+y+manejo+de+exceptiones" title="Post to Delicious"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://yohan.jasdid.com/2010/11/extrano-comportamiento-usando-yield-y-manejo-de-exceptiones/&amp;t=Extra%C3%B1o+comportamiento+usando+yield+y+manejo+de+exceptiones" title="Post to Facebook"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Extra%C3%B1o+comportamiento+usando+yield+y+manejo+de+exceptiones&amp;body=Link:+http://yohan.jasdid.com/2010/11/extrano-comportamiento-usando-yield-y-manejo-de-exceptiones/%0D%0A%0D%0A----%0D%0A+Trabajando+en+un+proyecto+y+de+alguna+manera+llegue+a+ver+el+escenario+que+a+continuacion+describo+al+momento+de+utilizar+el+operaror+yield+y+manej..." title="Send Gmail"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/gmail/tt-gmail-micro3.png" alt="Send Gmail" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://yohan.jasdid.com/2010/11/extrano-comportamiento-usando-yield-y-manejo-de-exceptiones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caliburn y Silverlight ejemplo sencillo..</title>
		<link>http://yohan.jasdid.com/2010/06/caliburn-y-silverlight-ejemplo-sencillo/</link>
		<comments>http://yohan.jasdid.com/2010/06/caliburn-y-silverlight-ejemplo-sencillo/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 22:34:02 +0000</pubDate>
		<dc:creator>yohan.jasdid</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[Caliburn]]></category>
		<category><![CDATA[MVVM Framework]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[Splitter]]></category>

		<guid isPermaLink="false">http://yohan.jasdid.com/?p=864</guid>
		<description><![CDATA[Estos ultimos dias he estado checando Caliburn (MVVM framework) debido a la posibilidad de trabajar con el en un futuro cercano, asi que he decidido postear un muy parecido ejemplo al que publique hace poco donde trabajaban un expander y un splitter de manera conjunta, ahora como estoy utilizando Silverlight pues voy a deberles el [...]]]></description>
			<content:encoded><![CDATA[<p>Estos ultimos dias he estado checando Caliburn (MVVM framework) debido a la posibilidad de trabajar con el en un futuro cercano, asi que he decidido postear un muy parecido ejemplo al que publique hace poco donde trabajaban un expander y un splitter de manera conjunta, ahora como estoy utilizando Silverlight pues voy a deberles el expander ya que al parecer ese control no es soportado por esta tecnologia <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  tal vez en el Silverlight Toolkit venga uno pero ese sera un tema para despues..</p>
<p>Caliburn me ha dejado impresionado con la cantidad de cosas que puedes hacer con tan poco codigo debido a la manera que esta diseniado el framework practicamente te permite enlazar controles y eventos y un monton de cosas que hace por ti detras del telon, lo unico malo es que la documentacion no es muy extensa y no existen tantas aplicaciones como ejemplo o quickstarts (como PRISM por ejemplo) asi que habra que contribuir con un granito de arena en la promocion de este excelente framework.</p>
<p>Bueno para empezar debemos crear un nuevo proyecto de tipo Silverlight, yo estoy utilizando el VS2010 y el Silverlight 4 que es una instalacion separada, una vez creado este proyecto y configurado automaticamente por Visual Studio removemos el control MainWindow.xaml y lo reemplazamos por ShellView.xaml que sera nuestro contenedor de contenido, a continuacion lo configuramos de la siguiente manera en el App.xaml principal para soportar Caliburn,</p>
<p>App.xaml</p>
<pre class="brush: plain; title: ; notranslate">
&lt;am:CaliburnApplication
    xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    xmlns:am=&quot;clr-namespace:Caliburn.PresentationFramework.ApplicationModel;assembly=Caliburn.PresentationFramework&quot;
    x:Class=&quot;ExpanderAndSplitter.Caliburn.App&quot;&gt;

    &lt;!--This is a caliburn application --&gt;
    &lt;Application.Resources&gt;
    &lt;/Application.Resources&gt;
&lt;/am:CaliburnApplication&gt;
</pre>
<p>Y a continuacion modificamos el code behind para que derive de la clase CaliburnApplication,<br />
App.xaml.cs</p>
<pre class="brush: csharp; title: ; notranslate">
using ExpanderAndSplitter.Caliburn.ViewModels;
using Caliburn.PresentationFramework.ApplicationModel;

namespace ExpanderAndSplitter.Caliburn
{
     public partial class App :  CaliburnApplication
    {

        public App()
        {
            InitializeComponent();
        }

        /// &lt;summary&gt;
        /// Creating the root view model of the app, the shell
        /// &lt;/summary&gt;
        /// &lt;returns&gt;Root view model (shell)&lt;/returns&gt;
        protected override object CreateRootModel()
        {
            return new ShellViewModel();
        }

     }
}
</pre>
<p>En los pasos anteriores definimos la applicacion como un applicacion Caliburn y a continuacion hacemos Override al CreatRootModel() donde le diremos a Caliburn cual es el objeto de la vista que queremos como Root object o sea como contenedor principal de la aplicacion, cabe mencionar que caliburn es orientado a modelos y majena mucho el concepto de convenciones por lo que el framework detras del telon hara una serie de comprobaciones para ubicar la vista que pertenece al &#8220;ViewModel&#8221; que especificamos como contenedor principal en el Override por lo que no tendremos que hacer nada especial para que la vista de tal modelo este bindeada al modelo, MAGIA PURA!!!</p>
<p>ShellViewModel.cs</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Caliburn.Core;
using System.Collections.ObjectModel;
using ExpanderAndSplitter.Caliburn.Models;

namespace ExpanderAndSplitter.Caliburn.ViewModels
{
    public class ShellViewModel : PropertyChangedBase
    {

        #region Fields

        private GridLength _masterRowHeight = new GridLength(1, GridUnitType.Star);
        private GridLength _splitterRowHeight = new GridLength(0);
        private GridLength _detailRowHeight = new GridLength(1, GridUnitType.Auto);

        public ObservableCollection&lt;ItemViewModel&gt; _masterItems = null;
        public ObservableCollection&lt;ItemViewModel&gt; _detailItems = null;

        #endregion // Fields

        public ShellViewModel()
        {
            MasterRowHeight = new GridLength(1, GridUnitType.Star);
            SplitterRowHeight = new GridLength(20);
            DetailRowHeight = new GridLength(1, GridUnitType.Star);

            MasterItems = new ObservableCollection&lt;ItemViewModel&gt;();
            DetailItems = new ObservableCollection&lt;ItemViewModel&gt;();

            for (int i = 0; i &lt; 1000; i++)
            {
                ItemModel masterIM = new ItemModel(&quot;Master Item Dummy &quot; + i.ToString(), i.ToString());
                ItemModel detailIM = new ItemModel(&quot;Detail Item Dummy &quot; + i.ToString(), i.ToString());

                ItemViewModel masterIVM = new ItemViewModel(masterIM);
                ItemViewModel detailIVM = new ItemViewModel(detailIM);

                MasterItems.Add(masterIVM);
                DetailItems.Add(detailIVM);
            }

        }

        #region Properties

        public GridLength MasterRowHeight
        {
            get { return _masterRowHeight; }
            set
            {
                _masterRowHeight = value;
                NotifyOfPropertyChange(&quot;MasterRowHeight&quot;);
            }
        }

        public GridLength SplitterRowHeight
        {
            get { return _splitterRowHeight; }
            set
            {
                _splitterRowHeight = value;
                NotifyOfPropertyChange(&quot;SplitterRowHeight&quot;);
            }
        }

        public GridLength DetailRowHeight
        {
            get { return _detailRowHeight; }
            set
            {
                _detailRowHeight = value;
                NotifyOfPropertyChange(&quot;DetailRowHeight&quot;);
            }
        }

        public ObservableCollection&lt;ItemViewModel&gt; MasterItems
        {
            get { return _masterItems; }
            set
            {
                _masterItems = value;
                NotifyOfPropertyChange(&quot;MasterItems&quot;);
            }
        }

        public ObservableCollection&lt;ItemViewModel&gt; DetailItems
        {
            get { return _detailItems; }
            set
            {
                _detailItems = value;
                NotifyOfPropertyChange(&quot;DetailItems&quot;);
            }
        }

        #endregion // Properties

    }
}
</pre>
<p>Siguiendo las convenciones definidas por el framework por default sabemos que las vistas deberan estar situadas en una carpeta llamada Views, los ViewModels al igual deberan estar en su carpeta llamada ViewModels, siendo todo esto configurable, ademas con el codigo fuente podemos definir nuestras propias convenciones <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ShellView.xaml</p>
<pre class="brush: plain; title: ; notranslate">
&lt;UserControl x:Class=&quot;ExpanderAndSplitter.Caliburn.Views.ShellView&quot;
    xmlns:sdk=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk&quot;
    xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
    xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
    mc:Ignorable=&quot;d&quot;
    d:DesignHeight=&quot;300&quot; d:DesignWidth=&quot;400&quot;&gt;

    &lt;Grid x:Name=&quot;MainContainer&quot; Margin=&quot;5,5,5,5&quot; VerticalAlignment=&quot;Stretch&quot;
          HorizontalAlignment=&quot;Stretch&quot; Background=&quot;Transparent&quot;&gt;
        &lt;Grid.ColumnDefinitions&gt;
            &lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
            &lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
            &lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
            &lt;ColumnDefinition Width=&quot;*&quot; /&gt;
            &lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
        &lt;/Grid.ColumnDefinitions&gt;
        &lt;Grid.RowDefinitions&gt;
            &lt;RowDefinition Height=&quot;Auto&quot;/&gt;
            &lt;RowDefinition Height=&quot;*&quot;/&gt;
        &lt;/Grid.RowDefinitions&gt;

        &lt;sdk:Label x:Name=&quot;DummyLabel&quot; Content=&quot;Dummy Label&quot; /&gt;
        &lt;ComboBox x:Name=&quot;DummyComboBox&quot; Grid.Column=&quot;1&quot; MinWidth=&quot;100&quot;
                      Margin=&quot;0,0,5,0&quot;/&gt;

        &lt;Button Grid.Column=&quot;2&quot; Width=&quot;100&quot; Content=&quot;Dummy Button&quot; /&gt;
        &lt;sdk:Label x:Name=&quot;Label&quot; Content=&quot;Dummy Label 2&quot; Grid.Column=&quot;4&quot; HorizontalAlignment=&quot;Right&quot; /&gt;

        &lt;Grid Grid.Row=&quot;1&quot; Grid.ColumnSpan=&quot;5&quot; Margin=&quot;0,5,0,0&quot;
              VerticalAlignment=&quot;Stretch&quot; HorizontalAlignment=&quot;Stretch&quot; Background=&quot;Transparent&quot;&gt;
            &lt;Grid.ColumnDefinitions&gt;
                &lt;ColumnDefinition /&gt;
            &lt;/Grid.ColumnDefinitions&gt;
            &lt;Grid.RowDefinitions&gt;
                &lt;RowDefinition x:Name=&quot;MasterRow&quot; Height=&quot;{Binding MasterRowHeight, Mode=TwoWay}&quot; /&gt;
                &lt;RowDefinition x:Name=&quot;SplitterRow&quot; Height=&quot;{Binding SplitterRowHeight, Mode=TwoWay}&quot; /&gt;
                &lt;RowDefinition x:Name=&quot;DetailRow&quot; Height=&quot;{Binding DetailRowHeight, Mode=TwoWay}&quot; /&gt;
            &lt;/Grid.RowDefinitions&gt;

            &lt;Grid Background=&quot;Transparent&quot;&gt;
                &lt;Grid.ColumnDefinitions&gt;
                    &lt;ColumnDefinition Width=&quot;*&quot; /&gt;
                &lt;/Grid.ColumnDefinitions&gt;
                &lt;Grid.RowDefinitions&gt;
                    &lt;RowDefinition Height=&quot;*&quot;/&gt;
                &lt;/Grid.RowDefinitions&gt;

                &lt;sdk:DataGrid x:Name=&quot;MasterGrid&quot;
                            AutoGenerateColumns=&quot;False&quot;
                            ColumnWidth=&quot;*&quot;
                            HorizontalAlignment=&quot;Stretch&quot; VerticalAlignment=&quot;Stretch&quot;
                            ItemsSource=&quot;{Binding MasterItems}&quot;&gt;

                    &lt;sdk:DataGrid.Columns&gt;
                        &lt;sdk:DataGridTextColumn Binding=&quot;{Binding Path=Name}&quot; Header=&quot;Master Name&quot; /&gt;
                        &lt;sdk:DataGridTextColumn Binding=&quot;{Binding Path=ID}&quot; Header=&quot;ID&quot; /&gt;
                    &lt;/sdk:DataGrid.Columns&gt;
                &lt;/sdk:DataGrid&gt;
            &lt;/Grid&gt;

            &lt;sdk:GridSplitter Grid.Row=&quot;1&quot; Background=&quot;Gray&quot;
                              BorderThickness=&quot;1,1,1,1&quot; Width=&quot;Auto&quot; HorizontalAlignment=&quot;Stretch&quot;
                              Height=&quot;6&quot; VerticalContentAlignment=&quot;Top&quot;
                              Padding=&quot;0,0,0,0&quot; Margin=&quot;5,0,5,0&quot; VerticalAlignment=&quot;Center&quot;/&gt;

            &lt;Grid Background=&quot;Transparent&quot; Grid.Row=&quot;2&quot; Margin=&quot;0,5,0,0&quot; &gt;
                &lt;Grid.ColumnDefinitions&gt;
                    &lt;ColumnDefinition Width=&quot;*&quot; /&gt;
                &lt;/Grid.ColumnDefinitions&gt;
                &lt;Grid.RowDefinitions&gt;
                    &lt;RowDefinition Height=&quot;*&quot;/&gt;
                &lt;/Grid.RowDefinitions&gt;

                &lt;sdk:DataGrid x:Name=&quot;DetailGrid&quot;
                            AutoGenerateColumns=&quot;False&quot;
                            ColumnWidth=&quot;*&quot;
                            HorizontalAlignment=&quot;Stretch&quot; VerticalAlignment=&quot;Stretch&quot;
                            ItemsSource=&quot;{Binding DetailItems}&quot;&gt;

                    &lt;sdk:DataGrid.Columns&gt;
                        &lt;sdk:DataGridTextColumn Binding=&quot;{Binding Path=Name}&quot; Header=&quot;Detail Name&quot; /&gt;
                        &lt;sdk:DataGridTextColumn Binding=&quot;{Binding Path=ID}&quot; Header=&quot;ID&quot; /&gt;
                    &lt;/sdk:DataGrid.Columns&gt;
                &lt;/sdk:DataGrid&gt;
            &lt;/Grid&gt;
        &lt;/Grid&gt;
    &lt;/Grid&gt;
&lt;/UserControl&gt;
</pre>
<p>ItemModel.cs</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ExpanderAndSplitter.Caliburn.Models
{
    public class ItemModel
    {

        public ItemModel(string name, string id)
        {
            this.Name = name;
            this.ID = id;
        }

        public string Name
        {
            get;
            set;
        }

        public string ID
        {
            get;
            set;
        }

    }
}
</pre>
<p>Al final la aplicacion luce casi igual que la del post pasado solo que utilizando Caliburn y Silverlight y a excepcion que no se tuvo que utilizar codigo para especificar la relacion entre vista y view model ya que caliburn se encarga de todo esto y muchisimo mas.</p>
<p><a href="http://yohan.jasdid.com/wp-content/uploads/2010/06/Splitter.jpg"><img class="alignnone size-medium wp-image-868" title="Splitter" src="http://yohan.jasdid.com/wp-content/uploads/2010/06/Splitter-450x407.jpg" alt="" width="450" height="407" /></a></p>
<p>Mas adelante si tengo tiempo publicare algo relacionado con los Comandos, Triggers, Efectos y un monton de cosas que puedes aprovechar con caliburn de una manera sencilla, espero les haya gustado y no duden en dejar un comentario pues tal vez hize algo mal ya que apenas son mis inicios con Caliburn.</p>
<p>Puedes bajar el codigo fuente completo y el proyecto del siguiente enlace:  <a href="http://yohan.jasdid.com/wp-content/uploads/2010/06/ExpanderAndSplitter.Caliburn.rar">ExpanderAndSplitter.Caliburn</a></p>
<p>Saludos!<br />
YR</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Caliburn+y+Silverlight+ejemplo+sencillo..+http%3A%2F%2Fis.gd%2FW6c39D" title="Post to Twitter"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://yohan.jasdid.com/2010/06/caliburn-y-silverlight-ejemplo-sencillo/&amp;title=Caliburn+y+Silverlight+ejemplo+sencillo.." title="Post to Delicious"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://yohan.jasdid.com/2010/06/caliburn-y-silverlight-ejemplo-sencillo/&amp;t=Caliburn+y+Silverlight+ejemplo+sencillo.." title="Post to Facebook"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Caliburn+y+Silverlight+ejemplo+sencillo..&amp;body=Link:+http://yohan.jasdid.com/2010/06/caliburn-y-silverlight-ejemplo-sencillo/%0D%0A%0D%0A----%0D%0A+Estos+ultimos+dias+he+estado+checando+Caliburn+%28MVVM+framework%29+debido+a+la+posibilidad+de+trabajar+con+el+en+un+futuro+cercano%2C+asi+que+he+decidid..." title="Send Gmail"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/gmail/tt-gmail-micro3.png" alt="Send Gmail" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://yohan.jasdid.com/2010/06/caliburn-y-silverlight-ejemplo-sencillo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WPF Expander y Splitter trabajando juntos..</title>
		<link>http://yohan.jasdid.com/2010/06/wpf-expander-y-splitter-trabajando-juntos-3/</link>
		<comments>http://yohan.jasdid.com/2010/06/wpf-expander-y-splitter-trabajando-juntos-3/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 23:19:40 +0000</pubDate>
		<dc:creator>yohan.jasdid</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[splitter expander wpf approach]]></category>

		<guid isPermaLink="false">http://yohan.jasdid.com/?p=842</guid>
		<description><![CDATA[Bueno aqui dejo publicado la solucion de un problemita que recientemente tuve haciendo que funcionarian juntos un Expander y un splitter bueno la meta final era tener 2 expanders separados por 1 splitter y que cada expander contuviera algun tipo de grids o incluso una vista con este aproach ya se puede jugar con lo [...]]]></description>
			<content:encoded><![CDATA[<p>Bueno aqui dejo publicado la solucion de un problemita que recientemente tuve haciendo que funcionarian juntos un Expander y un splitter bueno la meta final era tener 2 expanders separados por 1 splitter y que cada expander contuviera algun tipo de grids o incluso una vista con este aproach ya se puede jugar con lo que uno quiera poner en cada region,</p>
<p>Yo anduve buscando algo similar y no pude encontrar mucho al respecto asi que aqui dejo mi solucion y espero que a alguien pueda servirle..</p>
<p>Aqui tenemos el XAML con el codigo que contiene al expander y al splitter o mas bien dos expander conteniendo un grid cada uno separados por un splitter..</p>
<pre class="brush: plain; title: ; notranslate">
&lt;window x:Class=&quot;ExpanderAndSplitter.MainWindow&quot;
        xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
        xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
        Title=&quot;MainWindow&quot; Height=&quot;350&quot; Width=&quot;525&quot; x:Name=&quot;MainWdw&quot;&gt;

    &lt;grid x:Name=&quot;MainContainer&quot; Loaded=&quot;MainContainer_Loaded&quot; Margin=&quot;5,5,5,5&quot; VerticalAlignment=&quot;Stretch&quot;
          HorizontalAlignment=&quot;Stretch&quot; Background=&quot;Transparent&quot;&gt;
        &lt;/grid&gt;&lt;grid .ColumnDefinitions&gt;
            &lt;columndefinition Width=&quot;Auto&quot; /&gt;
            &lt;columndefinition Width=&quot;Auto&quot; /&gt;
            &lt;columndefinition Width=&quot;Auto&quot; /&gt;
            &lt;columndefinition Width=&quot;*&quot; /&gt;
            &lt;columndefinition Width=&quot;Auto&quot; /&gt;
        &lt;/grid&gt;
        &lt;grid .RowDefinitions&gt;
            &lt;rowdefinition Height=&quot;Auto&quot;/&gt;
            &lt;rowdefinition Height=&quot;*&quot;/&gt;
        &lt;/grid&gt;

        &lt;label x:Name=&quot;DummyLabel&quot; Content=&quot;Dummy Label&quot; /&gt;
        &lt;combobox x:Name=&quot;DummyComboBox&quot; Grid.Column=&quot;1&quot; MinWidth=&quot;100&quot;
                      Margin=&quot;0,0,5,0&quot;/&gt;

        &lt;button Grid.Column=&quot;2&quot; Width=&quot;100&quot; Content=&quot;Dummy Button&quot; /&gt;
        &lt;label x:Name=&quot;Label&quot; Content=&quot;Dummy Label 2&quot; Grid.Column=&quot;4&quot; HorizontalAlignment=&quot;Right&quot; /&gt;

        &lt;grid Grid.Row=&quot;1&quot; Grid.ColumnSpan=&quot;5&quot;
              VerticalAlignment=&quot;Stretch&quot; HorizontalAlignment=&quot;Stretch&quot; Background=&quot;Transparent&quot;&gt;
            &lt;/grid&gt;&lt;grid .ColumnDefinitions&gt;
                &lt;columndefinition /&gt;
            &lt;/grid&gt;
            &lt;grid .RowDefinitions&gt;
                &lt;rowdefinition x:Name=&quot;MasterRow&quot; Height=&quot;{Binding MasterRowHeight, Mode=TwoWay}&quot; /&gt;
                &lt;rowdefinition x:Name=&quot;SplitterRow&quot; Height=&quot;{Binding SplitterRowHeight, Mode=TwoWay}&quot; /&gt;
                &lt;rowdefinition x:Name=&quot;DetailRow&quot; Height=&quot;{Binding DetailRowHeight, Mode=TwoWay}&quot; /&gt;
            &lt;/grid&gt;

            &lt;expander x:Name=&quot;MasterExpander&quot; IsExpanded=&quot;True&quot;
                      BorderBrush=&quot;Gray&quot; Margin=&quot;0,5,0,0&quot;
                      BorderThickness=&quot;1&quot;  IsEnabled=&quot;True&quot;
                      ExpandDirection=&quot;Down&quot; Background=&quot;Transparent&quot;
                      Expanded=&quot;MasterExpander_Expanded&quot;
                      Collapsed=&quot;MasterExpander_Collapsed&quot; &gt;
                &lt;/expander&gt;&lt;expander .Header&gt;
                    &lt;textblock FontWeight=&quot;Bold&quot; Text=&quot;Master Region&quot; /&gt;
                &lt;/expander&gt;

                &lt;grid Background=&quot;Transparent&quot;&gt;
                    &lt;/grid&gt;&lt;grid .ColumnDefinitions&gt;
                        &lt;columndefinition Width=&quot;*&quot; /&gt;
                    &lt;/grid&gt;
                    &lt;grid .RowDefinitions&gt;
                        &lt;rowdefinition Height=&quot;*&quot;/&gt;
                    &lt;/grid&gt;

                    &lt;datagrid x:Name=&quot;MasterGrid&quot;
                              Loaded=&quot;MasterGrid_Loaded&quot;
                              AutoGenerateColumns=&quot;True&quot;
                              CanUserDeleteRows=&quot;False&quot;
                              ColumnWidth=&quot;*&quot;
                              HorizontalAlignment=&quot;Stretch&quot; VerticalAlignment=&quot;Stretch&quot;/&gt;

            &lt;gridsplitter Grid.Row=&quot;1&quot; Background=&quot;Gray&quot;
                      BorderThickness=&quot;1,1,1,1&quot; Width=&quot;Auto&quot; HorizontalAlignment=&quot;Stretch&quot;
                      Height=&quot;6&quot; VerticalContentAlignment=&quot;Top&quot;
                      Padding=&quot;0,0,0,0&quot; Margin=&quot;5,0,5,0&quot; VerticalAlignment=&quot;Center&quot;/&gt;

            &lt;expander x:Name=&quot;DetailExpander&quot; Grid.Row=&quot;2&quot; Margin=&quot;0,5,0,0&quot;
                      BorderBrush=&quot;Gray&quot; BorderThickness=&quot;1&quot;  IsEnabled=&quot;True&quot;
                      ExpandDirection=&quot;Down&quot; Background=&quot;Transparent&quot;
                      Expanded=&quot;DetailExpander_Expanded&quot;
                      Collapsed=&quot;DetailExpander_Collapsed&quot; &gt;
                &lt;/expander&gt;&lt;expander .Header&gt;
                    &lt;textblock FontWeight=&quot;Bold&quot; Text=&quot;Detail Region&quot; /&gt;
                &lt;/expander&gt;

                &lt;grid Background=&quot;Transparent&quot;&gt;
                    &lt;/grid&gt;&lt;grid .ColumnDefinitions&gt;
                        &lt;columndefinition Width=&quot;*&quot; /&gt;
                    &lt;/grid&gt;
                    &lt;grid .RowDefinitions&gt;
                        &lt;rowdefinition Height=&quot;*&quot;/&gt;
                    &lt;/grid&gt;

                    &lt;datagrid x:Name=&quot;DetailGrid&quot;
                              Loaded=&quot;DetailGrid_Loaded&quot;
                              AutoGenerateColumns=&quot;True&quot;
                              CanUserDeleteRows=&quot;False&quot;
                              ColumnWidth=&quot;*&quot;
                              HorizontalAlignment=&quot;Stretch&quot; VerticalAlignment=&quot;Stretch&quot;/&gt;

&lt;/window&gt;
</pre>
<p>Y su respectivo code behind que se encarga de hacer las operaciones correspondientes de tamanio para que estos controles funcionen armoniosamente uno con el otro..</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace ExpanderAndSplitter
{
    /// &lt;summary&gt;
    /// Interaction logic for MainWindow.xaml
    /// &lt;/summary&gt;
    public partial class MainWindow : Window
    {

        #region Fields

        private static double _oldMasterHeight = 1;
        private static double _oldDetailHeight = 1;

        #endregion // Fields

        #region Properties

        public GridLength MasterRowHeight
        {
            get { return (GridLength)GetValue(MasterRowHeightProperty); }
            set { SetValue(MasterRowHeightProperty, value); }
        }

        // Using a DependencyProperty as the backing store for MasterRowHeight.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty MasterRowHeightProperty =
            DependencyProperty.Register(&quot;MasterRowHeight&quot;, typeof(GridLength), typeof(MainWindow), new UIPropertyMetadata(new GridLength(1, GridUnitType.Star)));

        public GridLength SplitterRowHeight
        {
            get { return (GridLength)GetValue(SplitterRowHeightProperty); }
            set { SetValue(SplitterRowHeightProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SplitterRowHeight.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SplitterRowHeightProperty =
            DependencyProperty.Register(&quot;SplitterRowHeight&quot;, typeof(GridLength), typeof(MainWindow), new UIPropertyMetadata(new GridLength(0)));

        public GridLength DetailRowHeight
        {
            get { return (GridLength)GetValue(DetailRowHeightProperty); }
            set { SetValue(DetailRowHeightProperty, value); }
        }

        // Using a DependencyProperty as the backing store for DetailRowHeight.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty DetailRowHeightProperty =
            DependencyProperty.Register(&quot;DetailRowHeight&quot;, typeof(GridLength), typeof(MainWindow), new UIPropertyMetadata(new GridLength(1, GridUnitType.Auto)));

        public ObservableCollection&lt;DummyItem&gt; MasterItems
        {
            get;
            set;
        }

        public ObservableCollection&lt;DummyItem&gt; DetailItems
        {
            get;
            set;
        }

        #endregion // Properties

        #region Constructors

        public MainWindow()
        {
            InitializeComponent();

            MasterItems = new ObservableCollection&lt;DummyItem&gt;();
            DetailItems = new ObservableCollection&lt;DummyItem&gt;();

            for (int i=0; i&lt;1000; i++)
            {
                MasterItems.Add(new DummyItem(&quot;Master Dummy &quot; + i.ToString(), i.ToString()));
                DetailItems.Add(new DummyItem(&quot;Detail Dummy &quot; + i.ToString(), i.ToString()));
            }
        }

        #endregion // Constructors

        #region Events

        private void MasterExpander_Expanded(object sender, RoutedEventArgs e)
        {
            DoHandleExpandCollapse();
        }

        private void MasterExpander_Collapsed(object sender, RoutedEventArgs e)
        {
            if (DetailExpander.IsExpanded)
            {
                _oldMasterHeight = MasterRowHeight.Value;
                _oldDetailHeight = DetailRowHeight.Value;
            }
            DoHandleExpandCollapse();
        }

        private void DetailExpander_Expanded(object sender, RoutedEventArgs e)
        {
            DoHandleExpandCollapse();
        }

        private void DetailExpander_Collapsed(object sender, RoutedEventArgs e)
        {
            if (MasterExpander.IsExpanded)
            {
                _oldMasterHeight = MasterRowHeight.Value;
                _oldDetailHeight = DetailRowHeight.Value;
            }
            DoHandleExpandCollapse();
        }

        private void MasterGrid_Loaded(object sender, RoutedEventArgs e)
        {
            if (MasterGrid.ItemsSource == null)
                MasterGrid.ItemsSource = MasterItems;
        }

        private void DetailGrid_Loaded(object sender, RoutedEventArgs e)
        {
            if (DetailGrid.ItemsSource == null)
                DetailGrid.ItemsSource = DetailItems;
        }

        private void MainContainer_Loaded(object sender, RoutedEventArgs e)
        {
            MainContainer.DataContext = this;
        }

        #endregion // Events

        #region Helpers

        private void DoHandleExpandCollapse()
        {
            if (MasterExpander == null || DetailExpander == null)
                return;

            SplitterRowHeight = new GridLength(0);
            if (MasterExpander.IsExpanded &amp;&amp; DetailExpander.IsExpanded)
            {
                MasterRowHeight = new GridLength(_oldMasterHeight, GridUnitType.Star);
                DetailRowHeight = new GridLength(_oldDetailHeight, GridUnitType.Star);
                SplitterRowHeight = new GridLength(20);
                return;
            }

            if (MasterExpander.IsExpanded)
                MasterRowHeight = new GridLength(1, GridUnitType.Star);
            else
                MasterRowHeight = new GridLength(1, GridUnitType.Auto);

            if (DetailExpander.IsExpanded)
                DetailRowHeight = new GridLength(1, GridUnitType.Star);
            else
                DetailRowHeight = new GridLength(1, GridUnitType.Auto);
        }

        #endregion // Helpers

    }

    public class DummyItem
    {
        public DummyItem(string name, string id)
        {
            this.Name = name;
            this.ID = id;
        }
        public string Name
        {
            get;
            set;
        }
        public string ID
        {
            get;
            set;
        }
    }
}
</pre>
<p>Al final asi es como luce la solucion:</p>
<p><a href="http://yohan.jasdid.com/wp-content/uploads/2010/06/expander-splitter.jpg"><img class="alignnone size-medium wp-image-850" title="expander-splitter" src="http://yohan.jasdid.com/wp-content/uploads/2010/06/expander-splitter-450x299.jpg" alt="" width="450" height="299" /></a></p>
<p>La solucion ejemplo esta hecha con Visual Studio 2010 y el codigo fuente lo puedes bajar del siguiente link <a title="ExpanderAndSplitter.rar" href="http://yohan.jasdid.com/wp-content/uploads/2010/06/ExpanderAndSplitter.rar">ExpanderAndSplitter</a>.</p>
<p>Enjoy! <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Yohan Rodriguez</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Expander+y+Splitter+trabajando+juntos..+http%3A%2F%2Fis.gd%2FfMCJTJ" title="Post to Twitter"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://yohan.jasdid.com/2010/06/wpf-expander-y-splitter-trabajando-juntos-3/&amp;title=WPF+Expander+y+Splitter+trabajando+juntos.." title="Post to Delicious"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://yohan.jasdid.com/2010/06/wpf-expander-y-splitter-trabajando-juntos-3/&amp;t=WPF+Expander+y+Splitter+trabajando+juntos.." title="Post to Facebook"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=WPF+Expander+y+Splitter+trabajando+juntos..&amp;body=Link:+http://yohan.jasdid.com/2010/06/wpf-expander-y-splitter-trabajando-juntos-3/%0D%0A%0D%0A----%0D%0A+Bueno+aqui+dejo+publicado+la+solucion+de+un+problemita+que+recientemente+tuve+haciendo+que+funcionarian+juntos+un+Expander+y+un+splitter+bueno+la+m..." title="Send Gmail"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/gmail/tt-gmail-micro3.png" alt="Send Gmail" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://yohan.jasdid.com/2010/06/wpf-expander-y-splitter-trabajando-juntos-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OutOfMemory exception</title>
		<link>http://yohan.jasdid.com/2009/10/outofmemory-exception/</link>
		<comments>http://yohan.jasdid.com/2009/10/outofmemory-exception/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 19:37:28 +0000</pubDate>
		<dc:creator>yohan.jasdid</dc:creator>
				<category><![CDATA[Bits]]></category>

		<guid isPermaLink="false">http://www.codeandchess.com/?p=115</guid>
		<description><![CDATA[Bueno, pues ultimamente he estado perdiendo mucho tiempo en mi trabajo por este tipo de errores, que mas que error pues creo que es un poco obvio que necesito mas memoria en mi PC, Bueno tal vez se deba a que tengo siempre abierto 3 o 4 instancias del Visual Studio 2008, itunes, Google Chrome [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://farm3.static.flickr.com/2568/4005781038_1f13ff16a8.jpg" alt="Out Of Memory by you." width="435" height="213" /> Bueno, pues ultimamente he estado perdiendo mucho tiempo en mi trabajo por este tipo de errores, que mas que error pues creo que es un poco obvio que necesito mas memoria en mi PC,</p>
<p>Bueno tal vez se deba a que tengo siempre abierto 3 o 4 instancias del Visual Studio 2008, itunes, Google Chrome (unas 5 instancias), Messenger, Skype, Sql Server 2005, Blend 3, Outlook, y el antivirus chafa que me pusieron que se pone a escanear la computadora como burro sin mecate!</p>
<p>Pues yo la verdad considero que lo que regularmente tengo abierto al mismo tiempo cualquier programador podria usar esa misma cantidad de programas al mismo tiempo si no es que mucho mas pero bueno, por lo visto estoy corriendo vista y casi cada vez que compilo sale este error molesto el cual desaparece si cierro y vuelvo a abrir el proyecto en VS2008</p>
<p>Saludos!</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=OutOfMemory+exception+http%3A%2F%2Fis.gd%2F11WtV0" title="Post to Twitter"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://yohan.jasdid.com/2009/10/outofmemory-exception/&amp;title=OutOfMemory+exception" title="Post to Delicious"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://yohan.jasdid.com/2009/10/outofmemory-exception/&amp;t=OutOfMemory+exception" title="Post to Facebook"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=OutOfMemory+exception&amp;body=Link:+http://yohan.jasdid.com/2009/10/outofmemory-exception/%0D%0A%0D%0A----%0D%0A++Bueno%2C+pues+ultimamente+he+estado+perdiendo+mucho+tiempo+en+mi+trabajo+por+este+tipo+de+errores%2C+que+mas+que+error+pues+creo+que+es+un+poco+obvio+..." title="Send Gmail"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/gmail/tt-gmail-micro3.png" alt="Send Gmail" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://yohan.jasdid.com/2009/10/outofmemory-exception/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Primeros pasos con WPF,</title>
		<link>http://yohan.jasdid.com/2008/11/primeros-pasos-con-wpf/</link>
		<comments>http://yohan.jasdid.com/2008/11/primeros-pasos-con-wpf/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 03:48:42 +0000</pubDate>
		<dc:creator>yohan.jasdid</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[first steps]]></category>
		<category><![CDATA[Science & Technology]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://yohan.jasdid.com/?p=149</guid>
		<description><![CDATA[Hoy sabado me di un tiempo para investigar un poco sobre WPF ya que me acaban de asignar a un proyecto bastannnnnte interesante y estare utilizando tecnologias mas nuevas como el framework 3.0 y 3.5 por lo que me di un espacio para investigar un poco, Al final del dia (bueno todavia no se acaba [...]]]></description>
			<content:encoded><![CDATA[<p>Hoy sabado me di un tiempo para investigar un poco sobre WPF ya que me acaban de asignar a un proyecto bastannnnnte interesante y estare utilizando tecnologias mas nuevas como el framework 3.0 y 3.5 por lo que me di un espacio para investigar un poco,</p>
<p>Al final del dia (bueno todavia no se acaba jejej) he logrado comprender en un buen porcentaje el manejo de XAML asi como la creacion del mismo desde dentro de C# y la flexibilidad que esto significa, proximamente espero darme otro tiempo para hacer unas pruebas de estos mismos XAML&#8217;s con Silverlight y colgarlos a la web esperemos que tenga un tiempesillo jej..</p>
<p style="text-align: left;"><a href="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf1.jpg"><img class="alignnone size-medium wp-image-145" title="wpf1" src="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf1-450x441.jpg" alt="" width="450" height="441" /></a></p>
<p style="text-align: left;">No podia faltar el clasico hello WPF <img src='http://yohan.jasdid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: right;"> </p>
<p style="text-align: right;"><a href="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf2.jpg"><img class="alignnone size-medium wp-image-146" title="wpf2" src="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf2-450x276.jpg" alt="" width="450" height="276" /></a></p>
<p style="text-align: left;">Cabe mencionar que estos ejemplos los lei en un buen libro que me encontre por ahi llamado windows presentation foundation unleashed</p>
<p style="text-align: left;"><a href="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf4.jpg"><img class="alignnone size-medium wp-image-147" title="wpf4" src="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf4-450x251.jpg" alt="" width="450" height="251" /></a></p>
<p style="text-align: left;">Y el ejemplo que alimenta a mi ego jejej la verdad que estos combos enriquecidos y en general cualquier tipo de control son tremendamente flexibles!</p>
<p style="text-align: right;"><a href="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf5.jpg"><img class="alignnone size-medium wp-image-148" title="wpf5" src="http://yohan.jasdid.com/wp-content/uploads/2008/11/wpf5-450x309.jpg" alt="" width="450" height="309" /></a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Primeros+pasos+con+WPF%2C+http%3A%2F%2Fis.gd%2FCNlRru" title="Post to Twitter"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://yohan.jasdid.com/2008/11/primeros-pasos-con-wpf/&amp;title=Primeros+pasos+con+WPF%2C" title="Post to Delicious"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://yohan.jasdid.com/2008/11/primeros-pasos-con-wpf/&amp;t=Primeros+pasos+con+WPF%2C" title="Post to Facebook"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Primeros+pasos+con+WPF%2C&amp;body=Link:+http://yohan.jasdid.com/2008/11/primeros-pasos-con-wpf/%0D%0A%0D%0A----%0D%0A+Hoy+sabado+me+di+un+tiempo+para+investigar+un+poco+sobre+WPF+ya+que+me+acaban+de+asignar+a+un+proyecto+bastannnnnte+interesante+y+estare+utilizando..." title="Send Gmail"><img class="nothumb" src="http://yohan.jasdid.com/wp-content/plugins/tweet-this/icons/en/gmail/tt-gmail-micro3.png" alt="Send Gmail" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://yohan.jasdid.com/2008/11/primeros-pasos-con-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

