DataGrid inside a TabControl problem

I'm having a problem with a datagrid (v1 release) inside a tabcontrol. I have included a sample demonstrating my problem below. In the sample, I create a tab control with two tabs. Both datagrids are set to the same ItemsSource in the tab control's Loaded
event and the XAML for each is the same. However, the datagrid in the first tab has no scrollbar (as expected) while the datagrid in the second tab does have a scrollbar and a wider layout.

The second tab has a button labeled "Reload DataGrid". Press that button to reload the datagrid and will notice that it now looks just like the first datagrid!

And here is the code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

This is a bug and will be addressed in the next release. For a workaround, you can do a type of lazy loading of the DataGrids which would mitigate the issue. You can listen to TabControl.SelectionChanged and set the DataGrid.ItemsSource accordingly (of
course you can optimize by checking if it has been set already).

Hi vinsibal,
I've encountered a similar problem - when creating a datagrid, although specifying the grid's width (which should fit the window contains that grid),the grid is shown with horizontal scroll bar,
and when scrolling it to the right edge, the scroll disappears...(what I would expect to happen instead is that the scroll would not be visible in the first place)