<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C04FRX4ycCp7ImA9WhRQEE4.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183</id><updated>2011-12-04T12:51:54.098-08:00</updated><category term="xml" /><category term="csharp" /><category term="xaml" /><category term="dotnet" /><category term="wpf" /><title>Between APIs</title><subtitle type="html">Blog about the day to day life of a programmer traveling around languages, APIs, forums and new technologies.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://betweenapis.blogspot.com/" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/BetweenApis" /><feedburner:info uri="betweenapis" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DkUMSXg7eip7ImA9WxFVEEk.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-9043866109259486894</id><published>2010-06-08T17:44:00.000-07:00</published><updated>2010-06-08T17:44:48.602-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-08T17:44:48.602-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wpf" /><category scheme="http://www.blogger.com/atom/ns#" term="dotnet" /><title>WPF #7 - Several Tips</title><content type="html">Some tips right from my day by day issues.&lt;br /&gt;
Hope you enjoy it.&lt;br /&gt;
&lt;br /&gt;
1 - &lt;a href="http://askernest.com/archive/2008/01/23/how-to-programmatically-change-the-selecteditem-in-a-wpf-treeview.aspx"&gt;How to programmatically change the SelectedItem in a WPF TreeView&lt;/a&gt;&lt;br /&gt;
2 - &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/27950e73-0007-4e0b-9f00-568d2db1d979"&gt;Popup tracking position of PlacementTarget&lt;/a&gt;&lt;br /&gt;
3 - &lt;a href="http://www.switchonthecode.com/tutorials/wpf-tutorial-resizeable-popup"&gt;WPF Tutorial - Resizeable Popup | Switch on the Code&lt;/a&gt;&lt;br /&gt;
4 - &lt;a href="http://msdn.microsoft.com/en-us/library/ms753224.aspx"&gt;How to: Position a Popup&lt;/a&gt;&lt;br /&gt;
5 - &lt;a href="http://stackoverflow.com/questions/1442165/wpf-usercontrol-in-datatemplate-within-itemscontrol-how-to-bind-to-parent-of-it"&gt;WPF UserControl in DataTemplate within ItemsControl - how to bind to parent&lt;/a&gt;&lt;br /&gt;
6 - &lt;a href="http://decav.com/blogs/andre/archive/2007/05/27/wpf-binding-to-properties-in-your-usercontrol-or-window.aspx"&gt;WPF: Binding to Properties in your UserControl or Window&lt;/a&gt;&lt;br /&gt;
7 - &lt;a href="http://stackoverflow.com/questions/2650576/how-do-you-override-the-opacity-of-a-parent-control-in-wpf"&gt;How do you override the opacity of a parent control in WPF?&lt;/a&gt;&lt;br /&gt;
8 - &lt;a href="http://stackoverflow.com/questions/371879/wpf-button-isenabled-based-on-combobox-selection-overwriting-default-style"&gt;WPF Button IsEnabled Based on ComboBox Selection Overwriting default style&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
That's pretty much it.&lt;br /&gt;
See ya!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-9043866109259486894?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xubblH6fXn-hDDWwX0mzzCkWork/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xubblH6fXn-hDDWwX0mzzCkWork/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xubblH6fXn-hDDWwX0mzzCkWork/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xubblH6fXn-hDDWwX0mzzCkWork/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/3_FeflfmDSo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/9043866109259486894/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2010/06/wpf-7-several-tips.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/9043866109259486894?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/9043866109259486894?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/3_FeflfmDSo/wpf-7-several-tips.html" title="WPF #7 - Several Tips" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2010/06/wpf-7-several-tips.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04ESH0_cSp7ImA9WxNXF0s.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-6387095406342676153</id><published>2009-10-05T09:58:00.001-07:00</published><updated>2009-10-05T09:58:29.349-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-05T09:58:29.349-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wpf" /><category scheme="http://www.blogger.com/atom/ns#" term="dotnet" /><category scheme="http://www.blogger.com/atom/ns#" term="csharp" /><title>WPF #6 - Creating a RoutedEvent</title><content type="html">&lt;p style="clear: both"&gt;Just to keep &lt;s&gt;my posting average&lt;/s&gt; posting new tips, this is an easy one with an example on how to make a Routed event.&lt;/p&gt;&lt;p style="clear: both"&gt;A routed event is just like a regular event, but it has one other great functionality, &lt;a href="http://msdn.microsoft.com/en-us/library/ms742806.aspx" title="MSDN RoutedEvent page"&gt;it can invoke handlers on multiple listeners in an element tree, rather than just on the object that raised the event (via MSDN)&lt;/a&gt;.&lt;/p&gt;&lt;pre style="clear: both"&gt;&lt;code&gt;public class MyButtonSimple: Button&lt;br /&gt;{&lt;br /&gt;    // Create a custom routed event by first registering a RoutedEventID&lt;br /&gt;    // This event uses the bubbling routing strategy&lt;br /&gt;    public static readonly RoutedEvent TapEvent = EventManager.RegisterRoutedEvent(&lt;br /&gt;        "Tap", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MyButtonSimple));&lt;br /&gt;&lt;br /&gt;    // Provide CLR accessors for the event&lt;br /&gt;    public event RoutedEventHandler Tap&lt;br /&gt;    {&lt;br /&gt;            add { AddHandler(TapEvent, value); } &lt;br /&gt;            remove { RemoveHandler(TapEvent, value); }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // This method raises the Tap event&lt;br /&gt;    void RaiseTapEvent()&lt;br /&gt;    {&lt;br /&gt;            RoutedEventArgs newEventArgs = new RoutedEventArgs(MyButtonSimple.TapEvent);&lt;br /&gt;            RaiseEvent(newEventArgs);&lt;br /&gt;    }&lt;br /&gt;    // For demonstration purposes we raise the event when the MyButtonSimple is clicked&lt;br /&gt;    protected override void OnClick()&lt;br /&gt;    {&lt;br /&gt;        RaiseTapEvent();&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;p style="clear: both"&gt;Source: &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.routedeventargs.aspx"&gt;MSDN RoutedEventArgs examples&lt;/a&gt;&lt;/p&gt;&lt;br class='final-break' style='clear: both' /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-6387095406342676153?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/D_oxskLUzaETLnLn89scN-c8wTo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D_oxskLUzaETLnLn89scN-c8wTo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/D_oxskLUzaETLnLn89scN-c8wTo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D_oxskLUzaETLnLn89scN-c8wTo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/UkZ91y9FGqI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/6387095406342676153/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2009/10/wpf-6-creating-routedevent.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/6387095406342676153?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/6387095406342676153?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/UkZ91y9FGqI/wpf-6-creating-routedevent.html" title="WPF #6 - Creating a RoutedEvent" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2009/10/wpf-6-creating-routedevent.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIDSX4yfip7ImA9WxNXFEU.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-1620686025810069524</id><published>2009-10-02T05:29:00.001-07:00</published><updated>2009-10-02T05:29:38.096-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-02T05:29:38.096-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wpf" /><category scheme="http://www.blogger.com/atom/ns#" term="xaml" /><category scheme="http://www.blogger.com/atom/ns#" term="csharp" /><title>WPF #5 - Styling using MultiTrigger (MultiCondition setter)</title><content type="html">&lt;p style="clear: both"&gt;Hi again, I noticed that I'm not explaining my tips that much, I wonder if this is happening due to the fact that I've only posted quick tips or if it is an actual issue. &lt;/p&gt;&lt;p style="clear: both"&gt;Well, I'm more an example guy than a theory guy, for me is always easy to understand using examples than any other way. So if anyone read one of the tips and didn't understand it, please leave a comment so I can try to explain it better.&lt;/p&gt;&lt;p style="clear: both"&gt;Now, this post tip, how to use MultiTrigger (or MultiConditions setters) in WPF, the following example pretty much explains itself:&lt;/p&gt;&lt;pre style="clear: both"&gt;&lt;code&gt;&amp;lt;Style targettype="{x:Type Button}"&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;  &amp;lt;Style.Triggers&amp;gt;&lt;br /&gt;    &amp;lt;MultiTrigger&amp;gt;&lt;br /&gt;      &amp;lt;MultiTrigger.Conditions&amp;gt;&lt;br /&gt;        &amp;lt;Condition Property="IsMouseOver" Value="True" /&amp;gt;&lt;br /&gt;        &amp;lt;Condition Property="Content" Value="{x:Null}" /&amp;gt;&lt;br /&gt;      &amp;lt;/MultiTrigger.Conditions&amp;gt;&lt;br /&gt;      &amp;lt;Setter Property="Background" Value="Yellow" /&amp;gt;&lt;br /&gt;    &amp;lt;/MultiTrigger&amp;gt;&lt;br /&gt;  &amp;lt;/Style.Triggers&amp;gt;&lt;br /&gt;&amp;lt;/Style&amp;gt; &lt;/code&gt;&lt;/pre&gt;&lt;p style="clear: both"&gt;In this code I'm setting the background of a Button only when the mouse is over and the Content is not filled, don't ask me why I'm doing that, it's just an example, probably taken by the source url and used for something else!&lt;/p&gt;&lt;p style="clear: both"&gt;Source: &lt;a href="http://en.csharp-online.net/WPF_Styles_and_Control_Templates%E2%80%94Multi-Condition_Property_Trigger"&gt;WPF Styles and Control Templates&lt;/a&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;Leave a comment if you guys have any questions.&lt;/p&gt;&lt;br class='final-break' style='clear: both' /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-1620686025810069524?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6jO6jP1mQCrBiHICbSu54EAnKYw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6jO6jP1mQCrBiHICbSu54EAnKYw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6jO6jP1mQCrBiHICbSu54EAnKYw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6jO6jP1mQCrBiHICbSu54EAnKYw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/A5UZMv71Bv0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/1620686025810069524/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2009/10/wpf-5-styling-using-multitrigger.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/1620686025810069524?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/1620686025810069524?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/A5UZMv71Bv0/wpf-5-styling-using-multitrigger.html" title="WPF #5 - Styling using MultiTrigger (MultiCondition setter)" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2009/10/wpf-5-styling-using-multitrigger.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AHSX88fSp7ImA9WxNXFE8.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-5769442458478453879</id><published>2009-10-01T12:35:00.001-07:00</published><updated>2009-10-01T12:35:38.175-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-01T12:35:38.175-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="dotnet" /><category scheme="http://www.blogger.com/atom/ns#" term="csharp" /><title>DOT.NET - Make invalid UTF8 charatcters available in XML</title><content type="html">&lt;p style="clear: both"&gt;To change my posts a little lets talk about .NET, not WPF, a .NET little trick I discovered when creating UTF8 enabled XML files.&lt;/p&gt;&lt;p style="clear: both"&gt;If you want to enable UTF8 files through an editor you would have to do the following:&lt;/p&gt;&lt;pre style="clear: both"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style="clear: both"&gt;And to do the same when you use a XmlWriter (that's the trick), you first have to set the Encoding of the XmlWriter and then you just have to force it to write the start document element.&lt;/p&gt;&lt;pre style="clear: both"&gt;&lt;code&gt;XmlTextWriter objWriter = new XmlTextWriter(sPath, Encoding.UTF8);&lt;br /&gt;objWriter.WriteStartDocument();&lt;/code&gt;&lt;/pre&gt;&lt;p style="clear: both"&gt;Hope it helps!&lt;/p&gt;&lt;br class='final-break' style='clear: both' /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-5769442458478453879?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qMN1TAx1MSfRTl6CcUOgqjGGy7M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qMN1TAx1MSfRTl6CcUOgqjGGy7M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qMN1TAx1MSfRTl6CcUOgqjGGy7M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qMN1TAx1MSfRTl6CcUOgqjGGy7M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/1utlI7UsTjs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/5769442458478453879/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2009/10/dotnet-make-invalid-utf8-charatcters.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/5769442458478453879?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/5769442458478453879?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/1utlI7UsTjs/dotnet-make-invalid-utf8-charatcters.html" title="DOT.NET - Make invalid UTF8 charatcters available in XML" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2009/10/dotnet-make-invalid-utf8-charatcters.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQFRXgzeSp7ImA9WxNXEk4.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-1626301915837993305</id><published>2009-09-29T06:18:00.001-07:00</published><updated>2009-09-29T06:18:34.681-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-29T06:18:34.681-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wpf" /><category scheme="http://www.blogger.com/atom/ns#" term="dotnet" /><category scheme="http://www.blogger.com/atom/ns#" term="csharp" /><title>WPF #4 - Scroll to a ListViewItem programatically</title><content type="html">&lt;p style="clear: both"&gt;Hi guys, now you have to be tired of WPF tips. Aren't you?&lt;/p&gt;&lt;p style="clear: both"&gt;Well, after playing around a little bit with ListView I've bumped into a problem, how to select an item programatically?&lt;/p&gt;&lt;p style="clear: both"&gt;Couldn't be easier:&lt;/p&gt;&lt;pre style="clear: both"&gt;&lt;code&gt;this.listView.ScrollIntoView(this.listView.Items[index]);&lt;/code&gt;&lt;/pre&gt;&lt;p style="clear: both"&gt;Pretty neat right?&lt;br /&gt;&lt;br /&gt;See ya next time!&lt;/p&gt;&lt;br class='final-break' style='clear: both' /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-1626301915837993305?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/U9X6N-VoukaMEvhUwE0ERA2bDdE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U9X6N-VoukaMEvhUwE0ERA2bDdE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/U9X6N-VoukaMEvhUwE0ERA2bDdE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U9X6N-VoukaMEvhUwE0ERA2bDdE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/XeIa4b3VAW8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/1626301915837993305/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2009/09/wpf-4-scroll-to-listviewitem.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/1626301915837993305?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/1626301915837993305?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/XeIa4b3VAW8/wpf-4-scroll-to-listviewitem.html" title="WPF #4 - Scroll to a ListViewItem programatically" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2009/09/wpf-4-scroll-to-listviewitem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEDSX0_fyp7ImA9WxNQGEQ.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-7983609115032864109</id><published>2009-09-25T07:57:00.001-07:00</published><updated>2009-09-25T07:57:58.347-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-25T07:57:58.347-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wpf" /><category scheme="http://www.blogger.com/atom/ns#" term="dotnet" /><category scheme="http://www.blogger.com/atom/ns#" term="csharp" /><title>WPF #3 - Get ListViewItem from its data bound</title><content type="html">&lt;p style="clear: both"&gt;Another WPF tip, aren't you guys tired of them yet?&lt;/p&gt;&lt;p style="clear: both"&gt;Well, this is another quick one, how to get an ListBoxItem or ListViewItem when you have the item that was bound to it.&lt;/p&gt;&lt;pre style="clear: both"&gt;ListViewItem objItem = myListView.ItemContainerGenerator.ContainerFromItem(objMyData);&lt;br /&gt;&lt;/pre&gt;&lt;p style="clear: both"&gt; Pretty easy right? Or as we brazilians say: fácil!&lt;/p&gt;&lt;br class='final-break' style='clear: both' /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-7983609115032864109?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lPKp1QX_FeOqwMZyfDPsOK5808g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lPKp1QX_FeOqwMZyfDPsOK5808g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lPKp1QX_FeOqwMZyfDPsOK5808g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lPKp1QX_FeOqwMZyfDPsOK5808g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/puy9egt_5vA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/7983609115032864109/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2009/09/wpf-3-get-listviewitem-from-its-data.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/7983609115032864109?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/7983609115032864109?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/puy9egt_5vA/wpf-3-get-listviewitem-from-its-data.html" title="WPF #3 - Get ListViewItem from its data bound" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2009/09/wpf-3-get-listviewitem-from-its-data.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMNQ344fip7ImA9WxNQGUw.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-4022669768090832828</id><published>2009-09-24T13:04:00.001-07:00</published><updated>2009-09-25T15:41:32.036-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-25T15:41:32.036-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wpf" /><category scheme="http://www.blogger.com/atom/ns#" term="dotnet" /><category scheme="http://www.blogger.com/atom/ns#" term="csharp" /><title>WPF #2 - How to set focus and bring windows to front</title><content type="html">&lt;div style="clear: both;"&gt;Hi guys,&lt;br /&gt;
&lt;/div&gt;&lt;div style="clear: both;"&gt;I was developing a &lt;b&gt;WPF application&lt;/b&gt; that should open a window after clicking tray icon and bumped with a problem when focusing, The same method would be called whether the window was open or not, so the easiest way I've found to do that is the following: &lt;br /&gt;
&lt;/div&gt;&lt;pre style="clear: both;"&gt;&lt;code&gt;[DllImport("User32.dll")]
public static extern Int32 SetForegroundWindow(int hWnd);
private void BringToFront()
{
    if (!IsVisible)
        Visibility = Visibility.Visible;
    SetForegroundWindow((new System.Windows.Interop.WindowInteropHelper(this)).Handle);
}&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear: both;"&gt;&lt;br /&gt;
Hope this helps!&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&lt;a href="http://www.dotnetspider.com/resources/5772-Bring-e-window-Front-set-It-Active-window.aspx" title="Bring window to front"&gt;http://www.dotnetspider.com/resources/5772-Bring-e-window-Front-set-It-Active-window.aspx&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-4022669768090832828?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RlHN02x8xo7_9SquVecXmjKJlaw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RlHN02x8xo7_9SquVecXmjKJlaw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RlHN02x8xo7_9SquVecXmjKJlaw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RlHN02x8xo7_9SquVecXmjKJlaw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/UmOoruVRgIE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/4022669768090832828/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2009/09/wpf-2-how-to-set-focus-and-bring.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/4022669768090832828?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/4022669768090832828?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/UmOoruVRgIE/wpf-2-how-to-set-focus-and-bring.html" title="WPF #2 - How to set focus and bring windows to front" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2009/09/wpf-2-how-to-set-focus-and-bring.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cDSXo6fip7ImA9WxNQGE8.&quot;"><id>tag:blogger.com,1999:blog-6246305827217941183.post-6237090203781983852</id><published>2009-09-22T14:16:00.001-07:00</published><updated>2009-09-24T12:37:58.416-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-24T12:37:58.416-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wpf" /><category scheme="http://www.blogger.com/atom/ns#" term="dotnet" /><category scheme="http://www.blogger.com/atom/ns#" term="csharp" /><title>WPF #1 - How to get windows handle</title><content type="html">&lt;p style="clear: both"&gt;Hi guys,&lt;/p&gt;&lt;p style="clear: both"&gt;My first post at my &lt;s&gt;not so&lt;/s&gt; recently created blog, Between APIs!&lt;br /&gt;Here I intend to discuss and talk only about my programming daily issues, tips, problems, solutions. If it matter for a developer than its posted here!&lt;/p&gt;&lt;p style="clear: both"&gt;My first one is all about starting WPF. &lt;br /&gt;I've stumbled with this problem when starting a new WPF library that would be used by a WindowsForm application. How to get the current WF window handle to use as owner?&lt;/p&gt;&lt;p style="clear: both"&gt;Very simple:&lt;br /&gt;MyWpfWindow myWindow = new MyWpfWindow();&lt;br /&gt;WindowInteropHelper windowHelper = new WindowInteropHelper(myWindow).Handle;&lt;br /&gt;windowHelper.Owner = myOldWfForm.Handle;&lt;br /&gt;myWindow.ShowDialog();&lt;/p&gt;&lt;p style="clear: both"&gt;Source: &lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/a62f912f-a28e-416b-b0f1-065ae9d6cc01" title="Solution source"&gt;http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/a62f912f-a28e-416b-b0f1-065ae9d6cc01&lt;/a&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;Hope you guys enjoy the blog!&lt;/p&gt;&lt;br class='final-break' style='clear: both' /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6246305827217941183-6237090203781983852?l=betweenapis.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8xTHdeijHmMJEA5AlNIt6W84vAc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8xTHdeijHmMJEA5AlNIt6W84vAc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8xTHdeijHmMJEA5AlNIt6W84vAc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8xTHdeijHmMJEA5AlNIt6W84vAc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BetweenApis/~4/gDUl1wjLows" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://betweenapis.blogspot.com/feeds/6237090203781983852/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://betweenapis.blogspot.com/2009/09/wpf-1-how-to-get-windows-handle.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/6237090203781983852?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6246305827217941183/posts/default/6237090203781983852?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BetweenApis/~3/gDUl1wjLows/wpf-1-how-to-get-windows-handle.html" title="WPF #1 - How to get windows handle" /><author><name>Henrique Rangel</name><uri>https://profiles.google.com/111744385844440261228</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-pNBvurq2wQw/AAAAAAAAAAI/AAAAAAAAA-E/jfqW-doed-U/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://betweenapis.blogspot.com/2009/09/wpf-1-how-to-get-windows-handle.html</feedburner:origLink></entry></feed>

