none
Silverlight 2 DataGrid 控件补丁程序发布 RRS feed

  • 常规讨论

  •  

    DataGrid 自从10月份和Silverlight 2一起发布以来,获得了一些用户反馈以及新发现的一些Bug.因为DataGrid相对比较独立,比较容易更新,而不需要影响决大多数最终用户,所以单独发布一个补丁版本来解决这些已发现的问题。

     

    下载地址

    http://www.microsoft.com/downloads/details.aspx?FamilyID=084a1bb2-0078-4009-94ee-e659c6409db0&displaylang=en

    Silverlight 2 DataGrid December 2008 Release

    We have just uploaded a new version of the DataGrid that includes a number of bug fixes and a few behavioral breaking changes from the version that shipped with Silverlight 2.  Please take the time to read through and understand all of the changes before you decide to upgrade your DataGrid.  Following this list of changes is a set of instructions on how to start using the new version.

     

    Breaking Changes

    An application that uses the DataGrid will still compile but will no longer work as expected if it was dependent on any of the following behaviors.

    1.       FrozenColumnCount now takes hidden columns into account.  Previously, only the first columns with Visibility set to Visible were included in the range of frozen columns.  A column with Visibility set to Collapsed can now be considered frozen even though it isn’t visible.  This is to ensure that a column’s DisplayIndex corresponds with the DataGrid’s FrozenColumnCount (i.e. if FrozenColumnCount == 3, columns with DisplayIndex < 3 are considered frozen).

    2.       The DataGrid’s current cell is now kept in sync with an ICollectionView’s notion of currency.  Moving the current position or changing the current item of an ICollectionView will now move the current cell and selected item of a DataGrid, and vice versa.  For this to work, the DataGrid’s ItemsSource must be set to a collection that fully implements ICollectionView.

    3.       A developer can now programmatically reorder a non-frozen column to the frozen column range (and vice versa) by changing a column’s DisplayIndex.  The DataGrid used to throw an exception in these cases.  An end-user, however, is still unable to do this through the UI by dragging column headers.

    Bugs Fixed

    The following is a list of bugs fixed in the DataGrid since the version released with Silverlight 2.  If any application had a workaround for these bugs, the workaround is no longer necessary and should be removed.  Its inclusion may cause undesired behavior.

    1.       Horizontal Gridlines do not show in FillerColumn

    2.       DragIndicator does not show during reorder when DataGrid is placed inside StackPanel

    3.       DragIndicatorStyle only exists on the DataGrid level, should also exist at the column level

    4.       DataGrid doesn't support a disabled state in the main template
    By default, the DataGrid is now grayed out when IsEnabled == false, and includes a new visual state.

    5.       EndEdit is called twice
          Any application accounting for IEditableObject.EndEdit accidentally being called twice by the DataGrid will need to be updated.
    6.       Able to leave edited DataGrid without ever triggering EndEdit

    7.    Changing ItemsSource while in Editing Mode causes Exception to be thrown

    8.       Row containing focus disappears after sort or ItemsSource change
    Any application working around the “disappearing row” issue by manipulating focus within the DataGrid will no longer need to do so, and should be updated.

    9.       ColumnHeader button pressed visualization should match the new Button pressed visualization

    10.   SL Designer hits a NullReferenceException while adding an empty HeaderStyle

    11.   Cells out of view do not always show up when a resize of the DataGrid forces them in view

    12.   AutoSizedRows keep growing even when the rows are recycled

    13.   Scrollbar incorrect when ItemsSource changed and DataGrid is on a background Tab

    14.   Incorrect VerticalScrollbar when setting ItemsSource on DataGrid inside a Popup

    15.   HorizontalContentAlignment does not have any effect on the DataGridColumnHeader

    16.   Resizing columns to smaller than column header content removes separator

    17.   SelectedItem is not updated at the time when the CurrentCellChanged event is raised

          Any application accounting for the fact that Selection was out of sync at the time the CurrentCellChanged event was raised will need to be updated.  Now the DataGrid will not raise either of the SelectionChanged or CurrentCellChanged events until both selection and currency have been updated.

    18.   Sorting or Resetting a CollectionView causes incorrect RemovedItems in SelectionChanged event

    19.   ScrollColumnIntoView does not align correctly if there are frozen columns

    20.   Reordering a column should only show DragIndicator for valid reorder positions

          The DataGrid will now clip the ColumnHeader’s DragIndicator so that it doesn’t show up when dragging a frozen column over a non-frozen column, and vice versa.

    21.   Adding or removing columns within the frozen column range should not throw exception

    22.   FrozenColumnCount and the Column’s IsFrozen is getting out of sync when it isn’t visible

    23.   Exception thrown when sorting a DataGrid that has a list of nullable ints as its ItemsSource

    24.   CellStyle Background property doesn’t work

          Previously, setting the Background property inside of CellStyle had no effect.  Applications with unique CellStyles should ensure that the desired background color is applied.

    25.   CellStyle is not applied to Filler Column

    26.   Setting a DataGrid style that overwrites the template after the original template has been loaded causes an Argument exception

    27.   Cannot hold editing mode when using a DatePicker or ComboBox in editing template

          There was a bug that prevented any editing control that uses a Popup to work correctly in the DataGrid.  As soon as the Popup opened, the DataGrid would lose focus and automatically CommitEdit.  It now tracks focus within a child Popup in order to support DatePicker, ComboBox and any other editing control that opens a Popup.

    28.   Double-click required on external Buttons when in editing mode

          A single click on Buttons (or any other control that handles MouseLeftButtonDown) outside of the DataGrid will now register correctly.  Previously, if the user was in editing mode, the first click would CommitEdit and the second click would register on the Button.

    29.   Sorting or resetting the ItemsSource does not raise UnloadingRow events

     

    Installation Instructions

    Visit the Silverlight 2 DataGrid December 2008 Release download page and read the installation instructions carefully.  In order to successfully use the new DataGrid you must do the following.

    1.       Close all instances of Microsoft Visual Studio.2.       Delete all cached toolbox items by removing all files beginning with "toolbox" from %LocalAppData%\Microsoft\VisualStudio\9.0.

    • On Microsoft Windows XP, %LocalAppData% is Documents and Settings\UserName\Local Settings\Application Data.
    • On Microsoft Windows Vista, %LocalAppData% is Users\UserName\AppData\Local.

    3.    Replace the following assemblies with the ones in this package:

    • %ProgramFiles%\Microsoft SDKs\Silverlight\v2.0\Libraries\Client\System.Windows.Controls.Data.dll
    • %ProgramFiles%\Microsoft SDKs\Silverlight\v2.0\Libraries\Client\System.Windows.Controls.Data.Design.dll

    4.       For any existing projects, delete the reference to System.Windows.Controls.Data.dll and then re-add the reference.

     

    2008年12月29日 15:03
    版主

全部回复

  • 解压后应该放在哪个文件夹下?
    还是把原版的dll覆盖?
    All for One,One for All
    2009年9月7日 8:26
  • 把原来的覆盖掉就可以了
    C:\Program Files\Microsoft Silverlight 这里找对应的覆盖掉
    如果您觉得对您有帮助,请在“是否有帮助”点“是”;如果你觉得回复很满意,请“标记为已解答”
    2009年9月7日 10:37
    版主