<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/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>New Features in Silverlight 3</title><link>http://forums.silverlight.net/forums/51.aspx</link><description>Discussions around new functionality in Silverlight 3 such as Out of Browser support</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: vb version</title><link>http://forums.silverlight.net/forums/thread/278016.aspx</link><pubDate>Fri, 28 Aug 2009 16:39:37 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:278016</guid><dc:creator>andrewaggb</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/278016.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=278016</wfw:commentRss><description>&lt;p&gt;you could try&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://www.developerfusion.com/tools/convert/csharp-to-vb"&gt;http://www.developerfusion.com/tools/convert/csharp-to-vb&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;or &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.carlosag.net/Tools/CodeTranslator/"&gt;http://www.carlosag.net/Tools/CodeTranslator/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve used similiar tools in the past to convert vb to c# (I know you&amp;#39;re going the other way) and they work ok.&amp;nbsp; They get 80-90% of it right from my experience.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Re: Re: Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/257355.aspx</link><pubDate>Sat, 25 Jul 2009 16:02:40 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:257355</guid><dc:creator>estern</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/257355.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=257355</wfw:commentRss><description>&lt;p&gt;unforetuneately I&amp;#39;m using vb, translation of the above solutions is not going well,&amp;nbsp;is there a vb solution for this problem?&lt;/p&gt;</description></item><item><title>Re: Re: Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/256986.aspx</link><pubDate>Fri, 24 Jul 2009 19:11:04 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:256986</guid><dc:creator>wackyphill</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/256986.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=256986</wfw:commentRss><description>&lt;p&gt;This was broken in the Beta. I don&amp;#39;t really know why it wasn&amp;#39;t fixed for RTM. I have a hard time believing no one could find a way.&lt;/p&gt;</description></item><item><title>Re: Re: Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/256975.aspx</link><pubDate>Fri, 24 Jul 2009 18:49:06 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:256975</guid><dc:creator>estern</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/256975.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=256975</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve just spent 4 hours chasing this problem.&amp;nbsp; Thanks for the suggestions and workarounds.&amp;nbsp; Doesn&amp;#39;t a regression like this warrant a hotfix?&lt;/p&gt;</description></item><item><title>Re: Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/255536.aspx</link><pubDate>Wed, 22 Jul 2009 19:40:35 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:255536</guid><dc:creator>Brian Braeckel</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/255536.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=255536</wfw:commentRss><description>&lt;p&gt;Another possible workaround is to hook up to the DataGrid&amp;#39;s CellEditEnding event and finalize the DatePicker&amp;#39;s value.&amp;nbsp; The DatePicker doesn&amp;#39;t typically finalize its value until LostFocus, but this will cause it to do so synchronously.&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;void&lt;/span&gt; dataGrid_CellEditEnding(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, DataGridCellEditEndingEventArgs e)
{
    DatePicker datePicker = e.EditingElement &lt;span class="kwd"&gt;as&lt;/span&gt; DatePicker;
    &lt;span class="kwd"&gt;if&lt;/span&gt; (datePicker != &lt;span class="kwd"&gt;null&lt;/span&gt;)
    {
        Queue children = &lt;span class="kwd"&gt;new&lt;/span&gt; Queue();
        children.Enqueue(datePicker);
        &lt;span class="kwd"&gt;while&lt;/span&gt; (children.Count &amp;gt; 0)
        {
            DependencyObject child = children.Dequeue();
            TextBox textBox = child &lt;span class="kwd"&gt;as&lt;/span&gt; TextBox;
            &lt;span class="kwd"&gt;if&lt;/span&gt; (textBox != &lt;span class="kwd"&gt;null&lt;/span&gt;)
            {
                datePicker.Text = textBox.Text;
                &lt;span class="kwd"&gt;return&lt;/span&gt;;
            }
            &lt;span class="kwd"&gt;for&lt;/span&gt; (&lt;span class="kwd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; VisualTreeHelper.GetChildrenCount(child); i++)
            {
                children.Enqueue(VisualTreeHelper.GetChild(child, i));
            }
        }
    }
}
&lt;/pre&gt;&amp;nbsp;</description></item><item><title>Re: Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/251333.aspx</link><pubDate>Thu, 16 Jul 2009 15:29:43 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:251333</guid><dc:creator>avbersSL</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/251333.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=251333</wfw:commentRss><description>&lt;p&gt;I was wondering what the SL team had to say about this issue....&lt;/p&gt;</description></item><item><title>Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/248691.aspx</link><pubDate>Mon, 13 Jul 2009 18:01:08 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:248691</guid><dc:creator>yifung</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/248691.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=248691</wfw:commentRss><description>&lt;p&gt;Thanks, I&amp;#39;m sorry about the inconvenience.&amp;nbsp; This is definitely one of the worst issues in the SL 3 DataGrid.&lt;/p&gt;</description></item><item><title>Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/247460.aspx</link><pubDate>Sat, 11 Jul 2009 21:14:57 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:247460</guid><dc:creator>wackyphill</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/247460.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=247460</wfw:commentRss><description>&lt;p&gt;Unfortunately this problem still exists in SL3 RTW, but thank you &lt;a class="namelink" href="http://silverlight.net/members/yifung.aspx"&gt;&lt;font color="#53b1e3"&gt;yifung&lt;/font&gt;&lt;/a&gt;&amp;nbsp;for the example. I had not seen a DataGridBoundColumn implementation before. I learned something. &lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/238136.aspx</link><pubDate>Fri, 26 Jun 2009 07:26:56 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:238136</guid><dc:creator>avbersSL</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/238136.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=238136</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m hitting this problem this week also, and it is very unfortunate..&lt;/p&gt;
&lt;p&gt;This &amp;#39;workaround&amp;#39; is in my opinion a dirty hack ;) so I hope the SL team is able to fix it in the final SL 3... (which will be very very final if the july 10th release date still stands..)&lt;/p&gt;</description></item><item><title>Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/238036.aspx</link><pubDate>Fri, 26 Jun 2009 01:30:20 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:238036</guid><dc:creator>yifung</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/238036.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=238036</wfw:commentRss><description>&lt;p&gt;Basak is correct.&amp;nbsp; The DataGrid changed to use explicty binding for editing for Silverlight 3, and this looks like an unfortunate side effect of that change.&amp;nbsp; As a workaround, please use the following DateColumn implementation.&amp;nbsp; I know this isn&amp;#39;t ideal, and even the implementation of the DateColumn below isn&amp;#39;t ideal, but I believe it&amp;#39;s the best choice at this time.&lt;/p&gt;
&lt;p&gt;The usage of the DateColumn is simple.&amp;nbsp; It&amp;#39;s similar to using the TextColumn.&amp;nbsp; Of course in your case, you could modify it slightly so that it has a readonly Binding and an editing Binding&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;pre class="coloredcode"&gt;        &amp;lt;&lt;span class="tag"&gt;data:DataGrid&lt;/span&gt;&lt;span class="attr"&gt; x:Name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;dataGrid&amp;quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span class="tag"&gt;data:DataGrid.Columns&lt;/span&gt;&amp;gt;
                &amp;lt;&lt;span class="tag"&gt;local:DataGridDateColumn&lt;/span&gt;&lt;span class="attr"&gt; Binding=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;{Binding Date}&amp;quot;&lt;/span&gt; /&amp;gt;
            &amp;lt;/&lt;span class="tag"&gt;data:DataGrid.Columns&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span class="tag"&gt;data:DataGrid&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;    &lt;span class="kwd"&gt;public class&lt;/span&gt; DataGridDateColumn : DataGridBoundColumn
    {
        &lt;span class="kwd"&gt;private&lt;/span&gt; DatePicker _datePicker;
        &lt;span class="kwd"&gt;private&lt;/span&gt; TextBox _textBox;

        &lt;span class="kwd"&gt;protected override&lt;/span&gt; FrameworkElement GenerateEditingElement(DataGridCell cell, &lt;span class="kwd"&gt;object&lt;/span&gt; dataItem)
        {
            &lt;span class="kwd"&gt;if&lt;/span&gt; (_datePicker == &lt;span class="kwd"&gt;null&lt;/span&gt;)
            {
                _datePicker = &lt;span class="kwd"&gt;new&lt;/span&gt; DatePicker();
                _datePicker.SetBinding(DatePicker.SelectedDateProperty, &lt;span class="kwd"&gt;this&lt;/span&gt;.Binding);
            }
            &lt;span class="kwd"&gt;return&lt;/span&gt; _datePicker;
        }

        &lt;span class="kwd"&gt;protected override&lt;/span&gt; FrameworkElement GenerateElement(DataGridCell cell, &lt;span class="kwd"&gt;object&lt;/span&gt; dataItem)
        {
            TextBlock textBlock = &lt;span class="kwd"&gt;new&lt;/span&gt; TextBlock();
            textBlock.Margin = &lt;span class="kwd"&gt;new&lt;/span&gt; Thickness(6);
            textBlock.VerticalAlignment = VerticalAlignment.Center;
            textBlock.SetBinding(TextBlock.TextProperty, &lt;span class="kwd"&gt;this&lt;/span&gt;.Binding);
            &lt;span class="kwd"&gt;return&lt;/span&gt; textBlock;
        }

        &lt;span class="kwd"&gt;protected override object&lt;/span&gt; PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs)
        {
            &lt;span class="kwd"&gt;if&lt;/span&gt; (_textBox == &lt;span class="kwd"&gt;null&lt;/span&gt;)
            {
                SetUpTextBox(_datePicker);
            }
            &lt;span class="kwd"&gt;return&lt;/span&gt; _datePicker.SelectedDate;
        }

        &lt;span class="kwd"&gt;private void&lt;/span&gt; SetUpTextBox(DependencyObject parent)
        {
            _textBox = parent &lt;span class="kwd"&gt;as&lt;/span&gt; TextBox;
            &lt;span class="kwd"&gt;if&lt;/span&gt; (_textBox == &lt;span class="kwd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; parent != &lt;span class="kwd"&gt;null&lt;/span&gt;)
            {
                &lt;span class="kwd"&gt;for&lt;/span&gt; (&lt;span class="kwd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; VisualTreeHelper.GetChildrenCount(parent); i++)
                {
                    SetUpTextBox(VisualTreeHelper.GetChild(parent, i));
                    &lt;span class="kwd"&gt;if&lt;/span&gt; (_textBox != &lt;span class="kwd"&gt;null&lt;/span&gt;)
                    {
                        &lt;span class="kwd"&gt;break&lt;/span&gt;;
                    }
                }
            }
            &lt;span class="kwd"&gt;if&lt;/span&gt; (_textBox != &lt;span class="kwd"&gt;null&lt;/span&gt;)
            {
                _textBox.TextChanged += TextBox_TextChanged;
            }
        }
        
        &lt;span class="kwd"&gt;private void&lt;/span&gt; TextBox_TextChanged(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, TextChangedEventArgs e)
        {
            &lt;span class="kwd"&gt;string&lt;/span&gt; dateText = _textBox.Text;
            DateTime date;
            &lt;span class="kwd"&gt;if&lt;/span&gt; (DateTime.TryParse(dateText, &lt;span class="kwd"&gt;out&lt;/span&gt; date))
            {
                _textBox.TextChanged -= TextBox_TextChanged;
                &lt;span class="kwd"&gt;int&lt;/span&gt; selectionStart = _textBox.SelectionStart;
                &lt;span class="kwd"&gt;int&lt;/span&gt; selectionLength = _textBox.SelectionLength;
                _datePicker.SelectedDate = date;
                &lt;span class="kwd"&gt;this&lt;/span&gt;.Dispatcher.BeginInvoke(&lt;span class="kwd"&gt;delegate&lt;/span&gt;
                {
                    _textBox.Text = dateText;
                    _textBox.SelectionStart = selectionStart;
                    _textBox.SelectionLength = selectionLength;
                    _textBox.TextChanged += TextBox_TextChanged;
                });
            }
        }
    }&lt;/pre&gt;&amp;nbsp;</description></item><item><title>Re: Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/238005.aspx</link><pubDate>Thu, 25 Jun 2009 22:57:52 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:238005</guid><dc:creator>wackyphill</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/238005.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=238005</wfw:commentRss><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/237896.aspx</link><pubDate>Thu, 25 Jun 2009 17:54:54 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:237896</guid><dc:creator>basak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/237896.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=237896</wfw:commentRss><description>&lt;p&gt;I am a part of the dev team and I was talking about the DatePicker behaviour outside of a DataGrid since nothing has changed in that area in DatePicker since SL2. But the behaviour of DataGrid has changed. I let the teams know about the issue.&lt;/p&gt;</description></item><item><title>Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/237554.aspx</link><pubDate>Thu, 25 Jun 2009 02:36:59 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:237554</guid><dc:creator>wackyphill</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/237554.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=237554</wfw:commentRss><description>&lt;p&gt;OK.....Well I&amp;#39;m not sure if you&amp;#39;ve actually ever used Silverlight 2 before or not but you don&amp;#39;t seem to know what you&amp;#39;re talking about.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a link to a very basic Silverlight 2 program written in 5 minutes to demonstrate that in Silverlight 2 if you place a DatePicker in a Datagrid you can type a date in to it, tab to a new cell, and your date will remain.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sendspace.com/file/7fqli7"&gt;http://www.sendspace.com/file/7fqli7&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m hoping someone out there who might be&amp;nbsp;in a position to let the SL3 devs know, would please do so.&amp;nbsp;This seems&amp;nbsp;to be broken in SL3.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/237409.aspx</link><pubDate>Wed, 24 Jun 2009 17:45:34 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:237409</guid><dc:creator>basak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/237409.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=237409</wfw:commentRss><description>&lt;p&gt;It was the same behavior in Silverlight 2. SelectedDate was only committed when Enter key is hit. Can you please post all your project?&lt;/p&gt;</description></item><item><title>Re: Datepicker problem or bug?</title><link>http://forums.silverlight.net/forums/thread/236480.aspx</link><pubDate>Mon, 22 Jun 2009 22:14:54 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:236480</guid><dc:creator>wackyphill</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/236480.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=51&amp;PostID=236480</wfw:commentRss><description>&lt;p&gt;Really? Silverlight 2 doesn&amp;#39;t work that way. Why change&amp;nbsp;the expected behavior&amp;nbsp;in Silverlight 3?&lt;/p&gt;
&lt;p&gt;Plus that&amp;#39;s really unintuitive for a user. I have a hard time imagining anyone would want that behavior. When you type into a textbox you expect what you entered to remain unless what you typed was invalid. I can&amp;#39;t think of a UI I&amp;#39;ve used in the past that requires the Enter key be pressed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>