<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : DialogManager stealing focus</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : DialogManager stealing focus</description>
  <pubDate>Sat, 11 Apr 2026 05:06:39 -700</pubDate>
  <lastBuildDate>Mon, 25 Feb 2013 08:58:21 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3399</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>DialogManager stealing focus :  Reading the above I want to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=15908#15908</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1440" rel="nofollow">giotis</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 25-Feb-2013 at 8:58am<br /><br />Reading the above I want to add a strange behavior of GridView in<br>StaffingResourceSearchView when clicked (left button of mouse)<br>two times in same line loosing the focus.<br><span id="result_" ="short_text"="" lang="en"><span ="hps"="">I tried to find</span> <span ="hps"="">the error without</span> <span ="hps"="">success, why happen this?</span></span>(wpf ver)<br><br><span style="font-size:10px"><br /><br />Edited by giotis - 25-Feb-2013 at 8:59am</span>]]>
   </description>
   <pubDate>Mon, 25 Feb 2013 08:58:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=15908#15908</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus : Just to be clear, you still need...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13381#13381</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 23-Apr-2012 at 5:43pm<br /><br />Just to be clear, you still need to keep the styles for the ContentControl and ItemsControl, otherwise the ContentControl will actually get the initial focus. You can also set IsTabStop to false in your custom view, which is what I'm going to add to the out-of-the-box view in Cocktail.]]>
   </description>
   <pubDate>Mon, 23 Apr 2012 17:43:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13381#13381</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus : John,I looked into it some more...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13380#13380</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 23-Apr-2012 at 5:37pm<br /><br />John,<div>I looked into it some more and apparently we've both been over-engineering this. To set the initial focus you don't need a behavior. You simply set TabIndex="0" as in the following example.</div><div><br></div><div><pre style="font-family: C&#111;nsolas; font-size: 13px; -: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">TextBox</span><span style="color: red; ">&nbsp;</span><span style="color: red; ">TabIndex</span><span style="color: blue; ">=</span><span style="color: blue; ">"0"</span><span style="color: blue; ">&nbsp;/&gt;</span></pre></div><div>The missing link in Cocktail is to set TabIndex="0" on the ContentControl in the dialog host. I will change this for the next release, but you don't have to wait for it. Cocktail actually allows you to replace the out-of-the-box dialog host with your own.&nbsp;</div><div><br></div><div>To do this, add a ChildWindow to your solution and replace the XAML with the following. This is the exact same XAML taken from Cocktail except for TabIndex="0" on the ContentControl. Make sure you replace the x:Class with whatever you want to call it.</div><div><br></div><div><pre style="font-family: C&#111;nsolas; font-size: 13px; -: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">controls</span><span style="color: blue; ">:</span><span style="color: rgb163, 21, 21; ">ChildWindow</span><span style="color: red; ">&nbsp;x</span><span style="color: blue; ">:</span><span style="color: red; ">Class</span><span style="color: blue; ">=</span><span style="color: blue; ">"MyApp.CustomDialogHostView"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;xmlns</span><span style="color: blue; ">=</span><span style="color: blue; ">"http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;xmlns</span><span style="color: blue; ">:</span><span style="color: red; ">x</span><span style="color: blue; ">=</span><span style="color: blue; ">"http://schemas.microsoft.com/winfx/2006/xaml"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;xmlns</span><span style="color: blue; ">:</span><span style="color: red; ">cal</span><span style="color: blue; ">=</span><span style="color: blue; ">"http://www.caliburnproject.org"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;xmlns</span><span style="color: blue; ">:</span><span style="color: red; ">controls</span><span style="color: blue; ">=</span><span style="color: blue; ">"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;xmlns</span><span style="color: blue; ">:</span><span style="color: red; ">d</span><span style="color: blue; ">=</span><span style="color: blue; ">"http://schemas.microsoft.com/expression/blend/2008"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;xmlns</span><span style="color: blue; ">:</span><span style="color: red; ">mc</span><span style="color: blue; ">=</span><span style="color: blue; ">"http://schemas.openxmlformats.org/markup-compatibility/2006"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;d</span><span style="color: blue; ">:</span><span style="color: red; ">DesignHeight</span><span style="color: blue; ">=</span><span style="color: blue; ">"277"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;d</span><span style="color: blue; ">:</span><span style="color: red; ">DesignWidth</span><span style="color: blue; ">=</span><span style="color: blue; ">"800"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;HasCloseButton</span><span style="color: blue; ">=</span><span style="color: blue; ">"False"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;mc</span><span style="color: blue; ">:</span><span style="color: red; ">Ignorable</span><span style="color: blue; ">=</span><span style="color: blue; ">"d"</span><span style="color: blue; ">&gt;</span> <span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">Grid</span><span style="color: red; ">&nbsp;x</span><span style="color: blue; ">:</span><span style="color: red; ">Name</span><span style="color: blue; ">=</span><span style="color: blue; ">"LayoutRoot"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;MinWidth</span><span style="color: blue; ">=</span><span style="color: blue; ">"166"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;Margin</span><span style="color: blue; ">=</span><span style="color: blue; ">"2"</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">Grid.RowDefinitions</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">RowDefinition</span><span style="color: blue; ">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">RowDefinition</span><span style="color: red; ">&nbsp;Height</span><span style="color: blue; ">=</span><span style="color: blue; ">"Auto"</span><span style="color: blue; ">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">Grid.RowDefinitions</span><span style="color: blue; ">&gt;</span> <span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">ItemsControl</span><span style="color: red; ">&nbsp;x</span><span style="color: blue; ">:</span><span style="color: red; ">Name</span><span style="color: blue; ">=</span><span style="color: blue; ">"DialogButtons"</span><span style="color: red; ">&nbsp;Grid.Row</span><span style="color: blue; ">=</span><span style="color: blue; ">"1"</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">ItemsControl.ItemsPanel</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">ItemsPanelTemplate</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">StackPanel</span><span style="color: red; ">&nbsp;HorizontalAlignment</span><span style="color: blue; ">=</span><span style="color: blue; ">"Right"</span><span style="color: red; ">&nbsp;Orientation</span><span style="color: blue; ">=</span><span style="color: blue; ">"Horizontal"</span><span style="color: blue; ">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">ItemsPanelTemplate</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">ItemsControl.ItemsPanel</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">ItemsControl.ItemTemplate</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">DataTemplate</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">Button</span><span style="color: red; ">&nbsp;Width</span><span style="color: blue; ">=</span><span style="color: blue; ">"75"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;Height</span><span style="color: blue; ">=</span><span style="color: blue; ">"23"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;Margin</span><span style="color: blue; ">=</span><span style="color: blue; ">"5"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;cal</span><span style="color: blue; ">:</span><span style="color: red; ">Message.Attach</span><span style="color: blue; ">=</span><span style="color: blue; ">"Close($dataContext)"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;Content</span><span style="color: blue; ">="{</span><span style="color: rgb163, 21, 21; ">Binding</span><span style="color: red; ">&nbsp;Content</span><span style="color: blue; ">}</span><span style="color: blue; ">"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;IsEnabled</span><span style="color: blue; ">="{</span><span style="color: rgb163, 21, 21; ">Binding</span><span style="color: red; ">&nbsp;Enabled</span><span style="color: blue; ">}</span><span style="color: blue; ">"</span><span style="color: blue; ">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">DataTemplate</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">ItemsControl.ItemTemplate</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">ItemsControl</span><span style="color: blue; ">&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;</span><span style="color: rgb163, 21, 21; ">ContentControl</span><span style="color: red; ">&nbsp;x</span><span style="color: blue; ">:</span><span style="color: red; ">Name</span><span style="color: blue; ">=</span><span style="color: blue; ">"ActiveItem"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;Width</span><span style="color: blue; ">=</span><span style="color: blue; ">"Auto"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;Height</span><span style="color: blue; ">=</span><span style="color: blue; ">"Auto"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;HorizontalContentAlignment</span><span style="color: blue; ">=</span><span style="color: blue; ">"Stretch"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;VerticalContentAlignment</span><span style="color: blue; ">=</span><span style="color: blue; ">"Stretch"</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: red; ">&nbsp;TabIndex</span><span style="color: blue; ">=</span><span style="color: blue; ">"0"</span><span style="color: blue; ">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">Grid</span><span style="color: blue; ">&gt;</span><span style="color: blue; ">&lt;/</span><span style="color: rgb163, 21, 21; ">controls</span><span style="color: blue; ">:</span><span style="color: rgb163, 21, 21; ">ChildWindow</span><span style="color: blue; ">&gt;</span></pre></div><div>Now, all you have to do is create a corresponding ViewModel that extends from DialogHostBase. Cocktail will discover your custom ViewModel and through the normal Caliburn.Micro convention it will find your custom view.</div><div><br></div><div><pre style="font-family: C&#111;nsolas; font-size: 13px; -: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><pre style="font-family: C&#111;nsolas; -: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><span style="color: blue; ">namespace</span>&nbsp;MyApp{&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue; ">public</span>&nbsp;<span style="color: blue; ">class</span>&nbsp;<span style="color: rgb43, 145, 175; ">CustomDialogHostViewModel</span>&nbsp;:&nbsp;<span style="color: rgb43, 145, 175; ">DialogHostBase</span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;}}</pre></pre></div>]]>
   </description>
   <pubDate>Mon, 23 Apr 2012 17:37:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13380#13380</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus :   Nice find.I had somebody else...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13369#13369</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 20-Apr-2012 at 12:23pm<br /><br />Nice find.&nbsp;I had somebody else do the styles for me. I didn't realize he turned of the tab stop for the buttons. When I was implementing the behavior for TempHire I was finding numerous posts from people struggling with this. I thought I had it nailed, but apparently not. <div></div>I'm not sure how to make this work based on these findings. I saw a suggestion from somebody to use a delay before assigning focus. So, in the Loaded event instead of calling SetFocus right away, start a timer and then set the focus to essentially steal it back from the button. Don't realy like that approach, but don't have anything better at the moment.<div>&nbsp;</div><div>I'll play around with it when I get a chance to see if I can do anything in the DialogManager.</div>]]>
   </description>
   <pubDate>Fri, 20 Apr 2012 12:23:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13369#13369</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus :   Ok I am able to repo this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13367#13367</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1009" rel="nofollow">JohnBloom</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 20-Apr-2012 at 7:04am<br /><br />Ok I am able to repo this in TempHire now.<div>&nbsp;</div><div>In the Styles.xaml file you have the buttons set to IsTabStop = false:</div><div><pre style=": white; color: black; font-family: C&#111;nsolas;"><span style="color: blue;"><pre style=": white; color: black; font-family: C&#111;nsolas;"><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Style</span><span style="color: red;">&nbsp;TargetType</span><span style="color: blue;">=</span><span style="color: blue;">"Button"</span><span style="color: blue;">&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"FontFamily"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"Verdana"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"FontSize"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"10.667"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"Background"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"#FFFF0000"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"Foreground"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"#FFFFFFFF"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"Padding"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"3"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"BorderThickness"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"0"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"IsTabStop"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"False"</span><span style="color: blue;">&nbsp;/&gt;</span></pre></span></pre><pre style=": white; color: black; font-family: C&#111;nsolas;">If you remove the setter property you can see the button steal focus. </pre><pre style=": white; color: black; font-family: C&#111;nsolas;">We have a few places where we rely on the buttons being tab stops so we cant turn them all off like that.</pre><pre style=": white; color: black; font-family: C&#111;nsolas;">Any suggestions?</pre><pre style=": white; color: black; font-family: C&#111;nsolas;"> </pre></div>]]>
   </description>
   <pubDate>Fri, 20 Apr 2012 07:04:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13367#13367</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus :   Don&amp;#039;t know howyouimplemented...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13360#13360</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 19-Apr-2012 at 2:30pm<br /><br />Don't know how&nbsp;you&nbsp;implemented your behavior. Have you tried the InitialFocusBehavior from TempHire? I'm doing the same thing as you are describing and it works in my case.<div>&nbsp;</div><div><pre style=": white; color: black; font-family: C&#111;nsolas;">&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color: rgb43, 145, 175;">TypeConstraint</span>(<span style="color: blue;">typeof</span>(<span style="color: rgb43, 145, 175;">Control</span>))&#093;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">class</span>&nbsp;<span style="color: rgb43, 145, 175;">InitialFocusBehavior</span>&nbsp;:&nbsp;<span style="color: rgb43, 145, 175;">Behavior</span>&lt;<span style="color: rgb43, 145, 175;">Control</span>&gt;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">protected</span>&nbsp;<span style="color: blue;">override</span>&nbsp;<span style="color: blue;">void</span>&nbsp;OnAttached()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">base</span>.OnAttached(); <span style="color: blue;">#if</span>&nbsp;SILVERLIGHT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">if</span>&nbsp;(!<span style="color: rgb43, 145, 175;">Application</span>.Current.IsRunningOutOfBrowser)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">HtmlPage</span>.Plugin.Focus();<span style="color: blue;">#endif</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AssociatedObject.Loaded&nbsp;+=&nbsp;(sender,&nbsp;args)&nbsp;=&gt;&nbsp;AssociatedObject.Focus();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;}</pre></div>]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 14:30:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13360#13360</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus :   Thanks, those worked. Now...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13359#13359</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1009" rel="nofollow">JohnBloom</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 19-Apr-2012 at 2:09pm<br /><br />Thanks, those worked. Now I am only one tab stop away. Our control is getting focus and then the ok button is taking it. I think that most cases focus on the button would be preferred but in this case we want the focus to be in our control&nbsp;ready for user input. How can we keep the button from stealing focus away from our control?]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 14:09:58 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13359#13359</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus :   Yes, that&amp;#039;s an annoying...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13357#13357</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 19-Apr-2012 at 12:31pm<br /><br />Yes, that's an annoying problem. The culprits are the ContentControl and ItemControl. They are tab stops by default and steal the focus. No idea why anybody throught making them tab stops was a good idea. You can easily fix it for your entire application if you add the following two implicit styles to your app. The ContentControl style as seen below also fixes the sizing problem in Silverlight. You can see these in use in TempHire.<div>&nbsp;</div><div><pre style=": white; color: black; font-family: C&#111;nsolas;"><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Style</span><span style="color: red;">&nbsp;TargetType</span><span style="color: blue;">=</span><span style="color: blue;">"ContentControl"</span><span style="color: blue;">&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"IsTabStop"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"False"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"HorizontalContentAlignment"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"Stretch"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"VerticalContentAlignment"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"Stretch"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;/</span><span style="color: rgb163, 21, 21;">Style</span><span style="color: blue;">&gt;</span></pre><pre style=": white; color: black; font-family: C&#111;nsolas;"> <span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Style</span><span style="color: red;">&nbsp;TargetType</span><span style="color: blue;">=</span><span style="color: blue;">"ItemsControl"</span><span style="color: blue;">&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">Setter</span><span style="color: red;">&nbsp;Property</span><span style="color: blue;">=</span><span style="color: blue;">"IsTabStop"</span><span style="color: red;">&nbsp;Value</span><span style="color: blue;">=</span><span style="color: blue;">"False"</span><span style="color: blue;">&nbsp;/&gt;</span><span style="color: rgb163, 21, 21;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue;">&lt;/</span><span style="color: rgb163, 21, 21;">Style</span><span style="color: blue;">&gt;</span></pre></div>]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 12:31:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13357#13357</guid>
  </item> 
  <item>
   <title>DialogManager stealing focus :   We have written our own behavior...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13355#13355</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1009" rel="nofollow">JohnBloom</a><br /><strong>Subject:</strong> 3399<br /><strong>Posted:</strong> 19-Apr-2012 at 12:06pm<br /><br />We have written our own behavior that sets the focus to a specific control on the screen. We have some dialogs that start with the focus on a specific control. <div></div>When the dialog pops up ee see the focus in our control for a split second and then the childwindow steals it. It takes 3 tabs to get back to our control. Any idea about what is going on?]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 12:06:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3399&amp;PID=13355#13355</guid>
  </item> 
 </channel>
</rss>