<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Centering WPF Windows with WPF and Non-WPF Owner Windows</title><link>http://blogs.msdn.com/b/wpfsdk/archive/2007/04/03/centering-wpf-windows-with-wpf-and-non-wpf-owner-windows.aspx</link><description>This post demonstrates how to manually center a window with respect to both a WPF and non-WPF owner window. 
 Centering a Window with a WPF Owner Window 
 To center a window over another window in WPF, you need to do two things. First, you need to set</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Centering WPF Windows with WPF and Non-WPF Owner Windows</title><link>http://blogs.msdn.com/b/wpfsdk/archive/2007/04/03/centering-wpf-windows-with-wpf-and-non-wpf-owner-windows.aspx#10178093</link><pubDate>Thu, 23 Jun 2011 08:38:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10178093</guid><dc:creator>oddsignals</dc:creator><description>&lt;p&gt;I don&amp;#39;t know when this changed, but at least in .NET 4.0 WPF will honor the WindowStartupLocation=&amp;quot;CenterOwner&amp;quot; setting even with a non-WPF owner window.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10178093" width="1" height="1"&gt;</description></item><item><title>设置WPF窗口相对于非WPF窗口的位置 </title><link>http://blogs.msdn.com/b/wpfsdk/archive/2007/04/03/centering-wpf-windows-with-wpf-and-non-wpf-owner-windows.aspx#2637480</link><pubDate>Tue, 15 May 2007 04:20:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2637480</guid><dc:creator>Yiling Lai</dc:creator><description>&lt;p&gt;在前一个Post当中，指出了在WPF的WindowInteropHelper类中的一个BUG：通过WindowInteropHelper的Owner属性不能实现把WPF窗口的Owner属性设置为一个非WPF窗口的句柄。在我的Post帖出后不到一天，在WPF SDK的Blog上，就针对这个BUG给出了一个非常完美的解决方案。既然不同通过设置WindowStartupLocation.CenterOwner来改变窗口的位置。那么我们就用WindowStartupLocation.Manual来手动计算设置窗口的位置&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2637480" width="1" height="1"&gt;</description></item></channel></rss>