上周DevExpress又发布13.2.8版本了,ASP.NET MVC和ASP.NET中部分字段和属性被修改,Dashboard导出的目标元素的过滤值和电子表格相关控件也有所修改。
ASP.NET MVC 导航、布局和多用途扩展。
ClientEnabled 和 ClientVisible 字段已经被从MenuItemState、NavBarItemState 和 TreeViewNodeState 类中移除。
ASP.NET 导航、布局和多用途控件。
相关于ASPxMenu gutter的属性行为已经被改变。
现在,gutter不再影响项目图像和文本位置,如下属性被废弃:
CodedUIExtension.DXTestControls.AppearanceObject 类已经被移动到DevExpress.CodedUIExtension.DXTestControls.v13_2 namespace。
该变化避免当在一个项目上使用几个DevExpress Coded UI扩展程序集产生类型冲突。
为了能够编译一些项目,有必要手动在现有测试中指定新的命名空间。
Dashboard
IDocumentViewModel.Close 方法已经改变,即使IDocument.DestroyOnClose 属性被禁用,它也会被调用。
为回到以前的行为,你可以手动用 IDocumentManagerService对象检查IDocument.DestroyOnClose 属性值,如以下代码所示:
用POCO视图模式:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[C#]
[POCOViewModel]
public
class
MainViewModel : IDocumentViewModel {
bool
IDocumentViewModel.Close() {
if
(!DocumentManagerService.FindDocument(
this
).DestroyOnClose)
return
true
;
// ...
return
true
;
}
protected
virtual
IDocumentManagerService DocumentManagerService {
get
{
return
null
; } }
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
[VB.NET]
Public
Class
MainViewModel
Implements
IDocumentViewModel
Private
Function
IDocumentViewModel_Close()
As
Boolean
Implements
IDocumentViewModel.Close
If
Not
DocumentManagerService.FindDocument(
Me
).DestroyOnClose
Then
Return
True
End
If
' ...
Return
True
End
Function
Protected
Overridable
ReadOnly
Property
DocumentManagerService()
As
IDocumentManagerService
Get
Return
Nothing
End
Get
End
Property
End
Class
|
不用POCO视图模式:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[C#]
public
class
MainViewModel : ViewModelBase, IDocumentViewModel {
bool
IDocumentViewModel.Close() {
if
(!ServiceContainer.GetService
this
).DestroyOnClose)
return
true
;
// ...
return
true
;
}
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
[VB.NET]
Public
Class
MainViewModel
Inherits
ViewModelBase
Implements
IDocumentViewModel
Private
Function
IDocumentViewModel_Close()
As
Boolean
Implements
IDocumentViewModel.Close
If
Not
ServiceContainer.GetService(Of IDocumentManagerService)().FindDocument(
Me
).DestroyOnClose
Then
Return
True
End
If
' ...
Return
True
End
Function
End
Class
|
DXSpreadsheet for WPF
SpreadsheetControl.Options 属性已经改变,返回的是DevExpress.Xpf.Spreadsheet.SpreadsheetControlOptions 对象,而非DevExpress.Spreadsheet.DocumentOptions 类实例。
XtraSpreadsheet
DevExpress.Spreadsheet命名空间——ConditionalFormattingExtremumValue、ConditionalFormattingInsideValue 和 ConditionalFormattingIconSetInsideValue 界面已经被废弃。
ConditionalFormattingCollection 集的CreateExtremumValue/CreateInsideValue 和CreateIconSetInsideValue 方法已经被废弃。
从前:
1
2
3
4
5
6
7
8
9
10
|
[C#]
ConditionalFormattingExtremumValue CreateExtremumValue(ConditionalFormattingValueType valueType,
string
value);
ConditionalFormattingExtremumValue CreateExtremumValue();
ConditionalFormattingInsideValue CreateInsideValue(ConditionalFormattingValueType valueType,
string
value);
ConditionalFormattingIconSetInsideValue CreateIconSetInsideValue(ConditionalFormattingValueType valueType,
string
value, ConditionalFormattingValueOperator comparisonOperator);
|
现在:
1
2
3
4
5
6
7
8
|
[C#]
ConditionalFormattingValue CreateValue(ConditionalFormattingValueType valueType,
string
value);
ConditionalFormattingValue CreateValue(ConditionalFormattingValueType valueType);
ConditionalFormattingIconSetValue CreateIconSetValue(ConditionalFormattingValueType valueType,
string
value, ConditionalFormattingValueOperator comparisonOperator);
|
ConditionalFormattingCollection 集的AddColorScale2ConditionalFormatting、AddColorScale3ConditionalFormatting、AddDataBarConditionalFormatting 和 AddIconSetConditionalFormatting 方法已经被改变。
从前:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[C#]
ColorScale2ConditionalFormatting AddColorScale2ConditionalFormatting(Range range,
ConditionalFormattingExtremumValue minPoint, Color minPointColor, ConditionalFormattingExtremumValue maxPoint, Color maxPointColor);
ColorScale3ConditionalFormatting AddColorScale3ConditionalFormatting(Range range,
ConditionalFormattingExtremumValue minPoint, Color minPointColor, ConditionalFormattingInsideValue midPoint,
Color midPointColor, ConditionalFormattingExtremumValue maxPoint, Color maxPointColor);
DataBarConditionalFormatting AddDataBarConditionalFormatting(Range range, ConditionalFormattingExtremumValue lowBound,
ConditionalFormattingExtremumValue highBound, Color color);
IconSetConditionalFormatting AddIconSetConditionalFormatting(Range range, IconSetType iconSet,
ConditionalFormattingIconSetInsideValue[] points);
|
现在:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[C#]
ColorScale2ConditionalFormatting AddColorScale2ConditionalFormatting(Range range, ConditionalFormattingValue minPoint,
Color minPointColor, ConditionalFormattingValue maxPoint, Color maxPointColor);
ColorScale3ConditionalFormatting AddColorScale3ConditionalFormatting(Range range, ConditionalFormattingValue minPoint,
Color minPointColor, ConditionalFormattingValue midPoint, Color midPointColor, ConditionalFormattingValue maxPoint, Color maxPointColor);
DataBarConditionalFormatting AddDataBarConditionalFormatting(Range range, ConditionalFormattingValue lowBound,
ConditionalFormattingValue highBound, Color color);
IconSetConditionalFormatting AddIconSetConditionalFormatting(Range range, IconSetType iconSet, ConditionalFormattingIconSetValue[] points);
|
SpreadsheetBehaviorOptions.Printing 属性已经被 SpreadsheetBehaviorOptions.Print 属性取代。
带有Bar UI的标准打印预览窗口已经被带Ribbon UI的窗口取代。
默认情况下,当终端用户在SpreadsheetControl的UI中点击Print Preview按钮时,Ribbon Print Preview 被调用。
为了让带有Bar UI的打印预览窗口对于终端用户可用,禁用 SpreadsheetPrintOptions.RibbonPreview 属性。
为了在代码中调用Ribbon Print Preview形式,需使用SpreadsheetControl.ShowRibbonPrintPreview 方法。
下载DXperience Universal Suite转自慧都控件