<?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>oliana.de &#187; Visual Studio 2008</title>
	<atom:link href="http://oliana.de/blog/tag/visual-studio-2008/feed/" rel="self" type="application/rss+xml" />
	<link>http://oliana.de/blog</link>
	<description>Das Problem zwischen Stuhl und Bildschirm</description>
	<lastBuildDate>Sun, 29 Jan 2012 17:41: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>
		<item>
		<title>Maskedtextbox in WPF implementieren</title>
		<link>http://oliana.de/blog/2009/07/29/maskedtextbox-in-wpf-implementieren/</link>
		<comments>http://oliana.de/blog/2009/07/29/maskedtextbox-in-wpf-implementieren/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 13:21:57 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://oliana.de/blog/?p=237</guid>
		<description><![CDATA[Heute beschreibe ich mal, wie man in WPF ein Control erstellt, dass von TextBox erbt und die Funktionalität einer Maskedtextbox bietet. Als ich vor kurzem diese Funktionalität brauchte hat sich herausgestellt, dass das ganze innerhalb von kurzer Zeit erledigt werden kann. Zunächst erzeugt man in Visual Studio ein entsprechendes Projekt mit der Vorlage WPF-Benutzersteuerelementbibliothek. In [...]]]></description>
			<content:encoded><![CDATA[<p>Heute beschreibe ich mal, wie man in WPF ein Control erstellt, dass von TextBox erbt und die Funktionalität einer Maskedtextbox bietet. Als ich vor kurzem diese Funktionalität brauchte hat sich herausgestellt, dass das ganze innerhalb von kurzer Zeit erledigt werden kann.</p>
<p> <span id="more-237"></span>
</p>
<ol>
<li>Zunächst erzeugt man in Visual Studio ein entsprechendes Projekt mit der Vorlage WPF-Benutzersteuerelementbibliothek. </li>
<li>In diesem Projekt kann man das automatisch erzeugte UserControl1 guten Gewissens entfernen (wir wollen ja ein WPF-Steuerelement erstellen). </li>
<li>Dafür muss man unser WPF-Steuerelement hinzufügen. (Einfügen –&gt; neues Element –&gt; Benutzersteuerelement) </li>
<li>Jetzt geht es darum, aus dem Usercontrol ein Steuerelement zu machen, welches von der Standard-TextBox erbt, damit man die ganzen Standard Geschichten schon fertig hat. Dazu einfach im XAML-Code UserControl durch TextBox ersetzen, und alle Attribute außer den namespaces und dem Klassennamen entfernen, so dass es in etwa so ausschaut:
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:5a579f08-8001-485d-945e-e246591268a5" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">TextBox </span><span style="color: #FF0000;">x:Class</span><span style="color: #0000FF;">="Denis.WPF_Controls.MaskedTextBoxWPF"</span><span style="color: #FF0000;">
    xmlns</span><span style="color: #0000FF;">="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: #FF0000;">
    xmlns:x</span><span style="color: #0000FF;">="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: #FF0000;">
</span><span style="color: #0000FF;">/&gt;</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Dadurch sagen wir einfach, dass wir ein Steuerelement erzeugen dass von TextBox erbt. Da es ja auch noch eine entsprechende CodeDatei gibt müssen wir dort ebenfalls sagen, dass wir nicht mehr die partielle Klasse UserControl erweitern, sondern Textbox:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:b2df5a21-75f0-4068-abcb-6f0d5ec7ca91" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">partial</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> MaskedTextBoxWPF : UserControl
</span><span style="color: #008000;">//</span><span style="color: #008000;">ersetzen durch</span><span style="color: #008000;">
</span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">partial</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> MaskedTextBoxWPF : TextBox</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</li>
<li>Jetzt brauchen wir noch ein paar Events die wir behandeln um abzufangen wenn Text eingegeben, gelöscht und eingefügt (copy/paste) wird. Dazu einfach den XAML-Code so erweitern:
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:a1c6b245-442f-47bb-93ea-299407f12939" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">TextBox </span><span style="color: #FF0000;">x:Class</span><span style="color: #0000FF;">="Denis.WPF_Controls.MaskedTextBoxWPF"</span><span style="color: #FF0000;">
    xmlns</span><span style="color: #0000FF;">="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: #FF0000;">
    xmlns:x</span><span style="color: #0000FF;">="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: #FF0000;">
    DataObject.Pasting</span><span style="color: #0000FF;">="TextBox_Pasting"</span><span style="color: #FF0000;">
    PreviewTextInput</span><span style="color: #0000FF;">="TextBox_PreviewTextInput"</span><span style="color: #FF0000;">
    KeyDown</span><span style="color: #0000FF;">="TextBox_KeyDown"</span><span style="color: #FF0000;">
</span><span style="color: #0000FF;">/&gt;</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</li>
<li>Als erstes brauchen wir eine Klassen-Variable, welche den MaskedTextBoxProvider enthält (wofür ein Verweis auf SystemComponentModel benötigt wird). Diese wird dann im Konstruktor mit einer Standardmaske gefüllt und dann initialisiert:
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:5f0af161-7a69-49c0-a8fc-d951b44b6ddf" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #000000;">MaskedTextProvider mktProvider;

</span><span style="color: #0000FF;">public</span><span style="color: #000000;"> MaskedTextBoxWPF()
{
    InitializeComponent();
    mktProvider </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> MaskedTextProvider(</span><span style="color: #800000;">"</span><span style="color: #800000;">???</span><span style="color: #800000;">"</span><span style="color: #000000;">);
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</li>
<li>Außerdem geben wir die Mask-Eigenschaft nach außen weiter, lassen die im Designer bearbeiten und geben auch ne kleine Doku für das Bearbeiten im Designer an:
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:72080bea-049c-46cb-99e5-e8c76560a2cf" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #000000;">[Browsable(</span><span style="color: #0000FF;">true</span><span style="color: #000000;">)]
[DesignOnly(</span><span style="color: #0000FF;">true</span><span style="color: #000000;">)]
[Description(</span><span style="color: #800000;">"</span><span style="color: #800000;">0 Ziffer - erforderlich; 9 Ziffer oder Leerzeichen - opt.;</span><span style="color: #800000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;">
          </span><span style="color: #800000;">"</span><span style="color: #800000;">L Buchstabe - erforderlich; ? Buchstabe - opt.</span><span style="color: #800000;">"</span><span style="color: #000000;">)]
</span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> Mask
{
  </span><span style="color: #0000FF;">get</span><span style="color: #000000;">
  {
      </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> mktProvider.Mask;
  }
  </span><span style="color: #0000FF;">set</span><span style="color: #000000;">
  {
      mktProvider </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> MaskedTextProvider(value);
      Text </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">""</span><span style="color: #000000;">;
  }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</li>
<li>Als letztes müssen wir noch die Events mit Code füllen.Im PreviewTextInput-Ereignis prüfen wir, ob der Buschstabe hinzugefügt werden darf und brechen ggf. ab.Im Pasting-Ereignis machen wir das selbe mit eingefügtem Text und das KeyDown-Ereignis ist dafür da den Text im MaskedTextBoxProvider aktuell zu halten (falls z.B. was gelöscht wird).
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:31ca2506-5b5a-4b31-a9ab-e319fafc8016" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> TextBox_PreviewTextInput(</span><span style="color: #0000FF;">object</span><span style="color: #000000;"> sender, TextCompositionEventArgs e)
{
  </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (mktProvider.Add(e.Text) </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">false</span><span style="color: #000000;">)
  {
      e.Handled </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">true</span><span style="color: #000000;">;
  }
}

</span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> TextBox_Pasting(</span><span style="color: #0000FF;">object</span><span style="color: #000000;"> sender, DataObjectPastingEventArgs e)
{
  </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (e.DataObject.GetDataPresent(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(String)))
  {
      String text </span><span style="color: #000000;">=</span><span style="color: #000000;"> (String)e.DataObject.GetData(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(String));
      </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (mktProvider.Add(text) </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">false</span><span style="color: #000000;">)
      {
          e.CancelCommand();
      }
  }
  </span><span style="color: #0000FF;">else</span><span style="color: #000000;"> e.CancelCommand();
}

</span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> TextBox_KeyDown(</span><span style="color: #0000FF;">object</span><span style="color: #000000;"> sender, KeyEventArgs e)
{
  mktProvider.Clear();
  mktProvider.Add(Text);
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</li>
</ol>
<p>So, das war’s schon. Man könnte das ganze noch etwas schöner machen, indem man wie bei WinForms die Eingabemaske anzeigt, aber die Funktionalität ist vorhanden und kann so benutzt werden.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4859a4d6-694a-46ce-9087-e5144c0cfff3" class="wlWriterEditableSmartContent">Technorati-Tags: <a href="http://technorati.com/tags/WPF" rel="tag">WPF</a>,<a href="http://technorati.com/tags/C%23" rel="tag">C#</a></div>
]]></content:encoded>
			<wfw:commentRss>http://oliana.de/blog/2009/07/29/maskedtextbox-in-wpf-implementieren/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>dynamische Charts im WPF-Toolkit</title>
		<link>http://oliana.de/blog/2009/07/13/dynamische-charts-im-wpf-toolkit/</link>
		<comments>http://oliana.de/blog/2009/07/13/dynamische-charts-im-wpf-toolkit/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 21:14:44 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://oliana.de/blog/2009/07/13/dynamische-charts-im-wpf-toolkit/</guid>
		<description><![CDATA[Ich habe vor kurzem das WPF-Toolkit mit dem darin enthaltenen charting-Steuerelement entdeckt und muss sagen, dass es echt eine schöne Sache ist. Damit ist es wirklich sehr einfach einen Graphen zu erstellen. Es reicht in XAML den Graphen zu deklarieren und ihn dann über die DataSource zu füllen. Falls man so wie ich mehrere Datenreihen [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe vor kurzem das WPF-Toolkit mit dem darin enthaltenen charting-Steuerelement entdeckt und muss sagen, dass es echt eine schöne Sache ist. Damit ist es wirklich sehr einfach einen Graphen zu erstellen.</p>
<p> <span id="more-216"></span>
<p>Es reicht in XAML den Graphen zu deklarieren und ihn dann über die DataSource zu füllen. Falls man so wie ich mehrere Datenreihen dynamisch hinzufügen will kann man einfach eine entsprechende Series per Code hinzufügen und dann über die Itemsource die Datenquelle binden.</p>
<p>Hier mal ein Beispiel-Graph für ein Balkendiagram, welches Daten Monatsweise anzeigt (dafür ist auch die Formatierung gedacht). Dieser enthält immer eine “lineare” Achse, welche einen normalen Liniengraphen darstellt – ich habe Sie explizit definiert, damit der mindest-Wert immer auf 0 steht und nicht automatisch angepasst wird..</p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:19c388b9-b348-4bb9-b7ba-5777b920d437" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">chartingToolkit:Chart </span><span style="color: #FF0000;">Name</span><span style="color: #0000FF;">="chart1"</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
   </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">chartingToolkit:Chart.Axes</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">chartingToolkit:DateTimeAxis
         </span><span style="color: #FF0000;">Orientation</span><span style="color: #0000FF;">="X"</span><span style="color: #FF0000;"> Location</span><span style="color: #0000FF;">="Bottom"</span><span style="color: #FF0000;">
         IntervalType</span><span style="color: #0000FF;">="Months"</span><span style="color: #FF0000;"> Interval</span><span style="color: #0000FF;">="1"</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
         </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">chartingToolkit:DateTimeAxis.AxisLabelStyle</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
            </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">Style </span><span style="color: #FF0000;">TargetType</span><span style="color: #0000FF;">="chartingToolkit:DateTimeAxisLabel"</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
               </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">Setter </span><span style="color: #FF0000;">Property</span><span style="color: #0000FF;">="StringFormat"</span><span style="color: #FF0000;"> Value</span><span style="color: #0000FF;">="</span><span style="color: #808000;">{}{0:MM-yy}</span><span style="color: #0000FF;">"</span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
            </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">Style</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
         </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">chartingToolkit:DateTimeAxis.AxisLabelStyle</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
      </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">chartingToolkit:DateTimeAxis</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">chartingToolkit:LinearAxis </span><span style="color: #FF0000;">Orientation</span><span style="color: #0000FF;">="Y"</span><span style="color: #FF0000;">
         Location</span><span style="color: #0000FF;">="Left"</span><span style="color: #FF0000;"> Minimum</span><span style="color: #0000FF;">="0"</span><span style="color: #FF0000;">
         ShowGridLines</span><span style="color: #0000FF;">="True"</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
   </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">chartingToolkit:Chart.Axes</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">chartingToolkit:Chart</span><span style="color: #0000FF;">&gt;</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>der dann ohne Daten so ausschaut:</p>
<p><a href="http://oliana.de/blog/wp-content/image38.png" rel="lightbox"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://oliana.de/blog/wp-content/image_thumb2.png" width="244" height="184" /></a> </p>
<p>Um diesem dann dynamisch mehr “Series”, also weitere z.B. Balken/Linien hinzuzufügen kann reicht dann dieser Code. Durch das setzen von Title wird der entsprechende Titel in der legende angezeigt.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8589f92f-a198-45ec-ad71-fe6e86811c28" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #000000;">ColumnSeries serie </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> ColumnSeries();
</span><span style="color: #008000;">//</span><span style="color: #008000;"> Alternativ z.B.
</span><span style="color: #008000;">//</span><span style="color: #008000;"> LineSeries serie = new LineSeries();</span><span style="color: #008000;">
</span><span style="color: #000000;">serie.Title </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">Titel für Legende</span><span style="color: #800000;">"</span><span style="color: #000000;">;
serie.DependentValuePath </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">Y-Wert-komponente</span><span style="color: #800000;">"</span><span style="color: #000000;">;
serie.IndependentValuePath </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">X-Wert-komponente</span><span style="color: #800000;">"</span><span style="color: #000000;">;
serie.ItemsSource </span><span style="color: #000000;">=</span><span style="color: #000000;"> daten;
</span><span style="color: #008000;">//</span><span style="color: #008000;"> chart1, weil ich dem Chart im XAML
</span><span style="color: #008000;">//</span><span style="color: #008000;"> diesen kreativen Namen spendiert habe,</span><span style="color: #008000;">
</span><span style="color: #000000;">chart1.Series.Add(serie);</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Eine Sache, welche schon als bug reported wurde ist allerdings, dass momentan ein Graph mit einer DateTimeAxis und einer ColumnSeries keine Daten anzeigt, wenn nur ein Datum in der Liste für die Itemsource vorhanden ist. Dies liegt daran, dass mit Hilfe zumindest eines anderen Balkens versucht wird, die Breite für den Balken zu berechnen. Das wird aber im nächsten Release gefixt werden.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e46ee775-0c57-4e65-b1a1-22d650c17bca" class="wlWriterEditableSmartContent">Technorati-Tags: <a href="http://technorati.com/tags/WPF" rel="tag">WPF</a>,<a href="http://technorati.com/tags/WPF+Toolkit" rel="tag">WPF Toolkit</a></div>
]]></content:encoded>
			<wfw:commentRss>http://oliana.de/blog/2009/07/13/dynamische-charts-im-wpf-toolkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VS2008 Projekte in Expression Blend &#246;ffnen und die Fehler</title>
		<link>http://oliana.de/blog/2008/10/10/vs2008-projekte-in-expression-blend-ffnen-und-die-fehler/</link>
		<comments>http://oliana.de/blog/2008/10/10/vs2008-projekte-in-expression-blend-ffnen-und-die-fehler/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 12:44:26 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Anwendungen]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://oliana.de/blog/?p=150</guid>
		<description><![CDATA[Vor kurzem habe ich mein erstes WPF Projekt erstellt und wollte nun auch mal Expression Blend verwenden um das ganze ein bisschen aufzumotzen. Da kam beim öffnen direkt folgender Fehler: The project File "...Projekt.csproj" is not valid. Das importierte Projekt C:\Microsoft.CSharp.targets wurde nicht gefunden. ... Mit ein wenig Glück konnte ich die Lösung finden: das [...]]]></description>
			<content:encoded><![CDATA[<p>Vor kurzem habe ich mein erstes WPF Projekt erstellt und wollte nun auch mal Expression Blend verwenden um das ganze ein bisschen aufzumotzen. Da kam beim öffnen direkt folgender Fehler:</p>
<p><span id="more-150"></span></p>
<pre>The project File "...Projekt.csproj" is not valid.
Das importierte Projekt C:\Microsoft.CSharp.targets wurde nicht gefunden.
...</pre>
<p>Mit ein wenig Glück konnte ich die Lösung finden: das <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a07196d1-971b-4710-99c8-d3d9603ccfcb&amp;displaylang=en" target="_blank">Service Pack 1 für Expression Blend</a> installieren! Nachdem ich das installiert hatte, funktioniert alles wunderbar. Jetzt wird animiert!</p>
]]></content:encoded>
			<wfw:commentRss>http://oliana.de/blog/2008/10/10/vs2008-projekte-in-expression-blend-ffnen-und-die-fehler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erwachsene SVN-Integration in Visual Studio: AnkhSVN</title>
		<link>http://oliana.de/blog/2008/08/24/erwachsene-svn-integration-in-visual-studio-ankhsvn/</link>
		<comments>http://oliana.de/blog/2008/08/24/erwachsene-svn-integration-in-visual-studio-ankhsvn/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 19:53:34 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Anwendungen]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Projekte]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://oliana.de/blog/?p=112</guid>
		<description><![CDATA[Seit einiger Zeit schon benutze ich zur Quellcode-Verwaltung SVN und zur Integration in Visual Studio das frei verfügbare AnkhSVN. Bisher war die Integration zwar vorhanden und nutzbar, aber es gab einige Schwachpunkte. Z.B. war es nicht möglich ein Outlook-Plugin-Projekt mit AnkhSVN zu verwalten, da dieses das gesamte Projekt zerschossen hat. Vor kurzem ist AnkhSVN 2.0 [...]]]></description>
			<content:encoded><![CDATA[<p>Seit einiger Zeit schon benutze ich zur Quellcode-Verwaltung SVN und zur Integration in Visual Studio das frei verfügbare <a href="http://ankhsvn.open.collab.net/" target="_blank">AnkhSVN</a>. Bisher war die Integration zwar vorhanden und nutzbar, aber es gab einige Schwachpunkte. Z.B. war es nicht möglich ein Outlook-Plugin-Projekt mit AnkhSVN zu verwalten, da dieses das gesamte Projekt zerschossen hat.</p>
<p><span id="more-112"></span></p>
<p>Vor kurzem ist <a href="http://ankhsvn.open.collab.net/" target="_blank">AnkhSVN</a> 2.0 erschienen was eine wesentlich bessere Integration bietet, da es als natives SCC für Visual Studio implementiert wurde. Soweit ich es nach ein paar Tagen testen beurteilen kann hat es sich nicht nur insofern verbessert als dass Outlook-Plugin Projekte nun ohne Probleme damit verwaltet werden können. Die weiteren Pluspunkte sind:</p>
<ul>
<li>subjektive Beschleunigung des Eincheck-Vorgangs</li>
<li>Bessere Integration (eigenes Ausgabe-Fenster)</li>
<li>schönere Symbole <img src='http://oliana.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p>Falls mir noch mehr Punkte einfallen werde ich Sie hinzufügen. Ich werde noch eins der größeren Nachteile testen müssen: Die Zusammenarbeit von mehreren Personen an einem einzigen Projekt. Bisher wurde dabei irgendwann die Projektdatei beschädigt wenn z.B. unterschiedliche Leute gleichzeitig Formulare in ein Projekt eingefügt haben.</p>
]]></content:encoded>
			<wfw:commentRss>http://oliana.de/blog/2008/08/24/erwachsene-svn-integration-in-visual-studio-ankhsvn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WMI-Informationen mit C# auslesen</title>
		<link>http://oliana.de/blog/2008/03/21/wmi-informationen-mit-c-auslesen/</link>
		<comments>http://oliana.de/blog/2008/03/21/wmi-informationen-mit-c-auslesen/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 16:01:09 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://oliana.de/blog/2008/03/21/wmi-informationen-mit-c-auslesen/</guid>
		<description><![CDATA[Ich brauchte für den MAC-Switcher eine einfache Möglichkeit den Namen der Netzwerkverbindungen wie er in der Systemsteuerung angezeigt wird auszulesen. Mit Hilfe von WMI ist dies unglaublich einfach. Zunächst muss man wissen was man sucht. Was WMI alles zur Verfügung stellt kann man hier in der msdn nachlesen. Dann baut man einen string zusammen der [...]]]></description>
			<content:encoded><![CDATA[<p>Ich brauchte für den <a href="http://oliana.de/blog/programme/mac-switcher/">MAC-Switcher</a> eine einfache Möglichkeit den Namen der Netzwerkverbindungen wie er in der Systemsteuerung angezeigt wird auszulesen. Mit Hilfe von WMI ist dies unglaublich einfach.</p>
<p><span id="more-44"></span></p>
<ol>
<li>Zunächst muss man wissen was man sucht. Was WMI alles zur Verfügung stellt kann man <a href="http://msdn2.microsoft.com/en-us/library/aa394084(VS.85).aspx">hier in der msdn</a> nachlesen.</li>
<li>Dann baut man einen string zusammen der die Form einer SQL-Query hat.</li>
<li>Als nächstes benutzt man einen ManagementObjectSearcher um die Daten zu suchen. Dieser gibt eine Collection mit den gefundenen ManagementObject-Objekten zurück. Über diese kann man mit dem Namen gewünschten Eigenschaft zugreifen.</li>
</ol>
<p>Hier ein Beispiel um den Namen, die ID und die MAC-Adresse aller Netzwerkkarten (virtuell oder nicht) in einer MessageBox anzeigen zu lassen:</p>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff;">string</span> query = <span style="color: #006080;">"SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionID IS NOT null"</span>;
ManagementObjectSearcher sucher = <span style="color: #0000ff;">new</span> ManagementObjectSearcher(query);

<span style="color: #0000ff;">string</span> s = <span style="color: #006080;">""</span>;
<span style="color: #0000ff;">foreach</span> (ManagementObject m <span style="color: #0000ff;">in</span> sucher.Get())
{
    <span style="color: #008000;">// NetConnectionID Name der Karte wie in der Systemsteuerung</span>
    <span style="color: #008000;">// DeviceID ID HardwareID wie in der Registry</span>
    s += m[<span style="color: #006080;">"NetConnectionID"</span>] +
        <span style="color: #006080;">" ID "</span> + m[<span style="color: #006080;">"DeviceID"</span>] +
        <span style="color: #006080;">" MAC "</span> + m[<span style="color: #006080;">"MACAddress"</span>] + <span style="color: #006080;">"\n"</span>;
}

MessageBox.Show(s);</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://oliana.de/blog/2008/03/21/wmi-informationen-mit-c-auslesen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2008 Impressionen</title>
		<link>http://oliana.de/blog/2008/03/12/visual-studio-2008-impressionen/</link>
		<comments>http://oliana.de/blog/2008/03/12/visual-studio-2008-impressionen/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 09:33:41 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://oliana.de/blog/2008/03/12/visual-studio-2008-impressionen/</guid>
		<description><![CDATA[Endlich ist das Image für Visual Studio 2008 an meiner Uni verfügbar und ich habe natürlich direkt den Download begonnen. Nach einigen Stunden Deinstallation von Visual Studio 2005 (nach erheblichen Problemen bei der Upgrade-Installation von 2003 versuche ich das nicht nochmal&#8230;) konnte ich es endlich starten. Der erste Eindruck: Alles ist wie vorher, nur etwas [...]]]></description>
			<content:encoded><![CDATA[<p>Endlich ist das Image für Visual Studio 2008 an meiner Uni verfügbar und ich habe natürlich direkt den Download begonnen. Nach einigen Stunden Deinstallation von Visual Studio 2005 (nach erheblichen Problemen bei der Upgrade-Installation von 2003 versuche ich das nicht nochmal&#8230;) konnte ich es endlich starten.</p>
<p>Der erste Eindruck: Alles ist wie vorher, nur etwas aufgeräumter.<span id="more-3"></span></p>
<p>Als erstes habe ich mal ein WPF-Projekt erstellt und mal geprüft was man da so machen kann. Im ersten Moment war ich fasziniert von den Möglichkeiten die der Designer mir jetzt bietet : Man kann das Fenster zoomen, was für die Entwicklung von größeren Fenster extrem cool ist. Dann kam das große Erwachen: Die einzige Möglichkeit hier ein Formular zu erstellen ist indem man es per Hand macht. Aus welchen Gründen auch immer hat Microsoft das schöne und einfache Designen per Maus entfernt und meint, dass wir jetzt alles schreiben müssen. Somit sind wir Programmierer nun zu Webdesignern degradiert worden (obwohl die teilweise komfortablere WYSWIG-Werkzeuge haben&#8230;).</p>
<p>Hier die Sachen die mir negativ aufgefallen sind:</p>
<ul>
<li>Das TabControl-Steuerelement:
<ul>
<li>Wenn man dieses in das Formular zieht kann  man zwar per rechts-klick Reiter hinzufügen, allerdings ist es nicht möglich hier dann Steuerelemente einzufügen. Weder Container-Elemente noch andere.</li>
<li>Man kann (nachdem man per Hand in der XML-Ansicht Steuerelemente in die Registerkarten eingefügt hat) nicht per klick auf die Reiter auf einen anderen als den ersten Reiter wechseln. Der einzige Workaround besteht darin, die <font size="2">SelectedIndex auf den Index des Reiters zu setzen den man sehen möchte</font></li>
</ul>
</li>
<li>Die Toolbox ist nicht mehr gruppiert, so dass man nicht per z.B. alle Container-Steuerelemente zusammen hat.</li>
<li>Es gibt keinen Ereignis-Reiter mehr in den Eigenschaften eines Steuerelements, so dass man Intellisense in der XML-Ansicht durchsuchen muss um das richtige Ereignis zu finden. Dieses ist natürlich schwieriger, da hier auch Eigenschaften der Steuerelemente in der Liste stehen.</li>
</ul>
<p>Nach diesen Eindrücken ist WPF für mich erst einmal gestorben und ich werde weiterhin Windows-Forms benutzen. Mal schauen was das SP1 bzw. die nächste .Net Framework Version bringt.</p>
]]></content:encoded>
			<wfw:commentRss>http://oliana.de/blog/2008/03/12/visual-studio-2008-impressionen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.342 seconds -->

