The WPF extension releases 1.0 - 1.4 are deprecated and no new development will be actioned. All new features and functionality for the support of WPF are now handled instead by the .NET XAML extension using the com.castsoftware.wpf extension ID. Please see the section of documentation entitled Existing extensions for WPF and Silverlight for more information about the .NET XAML extension and the impacts of moving to it.
Summary: This document provides information about the extension providing WPF (Windows Presentation Foundation) support for C# and VB.NET.
Description
This extension provides support for WPF (Windows Presentation Foundation). The calculation of Automated Function Points for your .NET analyses will be supplemented through the creation of new objects and links specific to the WPF framework that will link back to objects/links produced by the base .NET analyzer.
In what situation should you install this extension?
If your .NET application contains WPF (Windows Presentation Foundation) source code and you want to view these object types and their links, then you should install this extension.
WPF framework support
The following WPF frameworks are supported by this extension:
Version | Supported |
---|---|
All versions up to 4.5 |
- Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
- Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
Function Points (transactions) | Quality and Sizing |
---|---|
CAST AIP compatibility
CAST AIP release | Supported | Technology |
---|---|---|
8.3.x | C# and VB.NET | |
8.2.x | C# and VB.NET |
Supported DBMS servers
This extension is compatible with the following DBMS servers:
DBMS | Supported |
---|---|
CSS/PostgreSQL | |
Oracle | |
Microsoft SQL Server |
Download and installation instructions
The extension will be automatically downloaded and installed in CAST Console. You can manage the extension using the Application - Extensions interface:
Bug Fix List
Please see WPF 1.2 - Bug Fix List.
What results can you expect?
Once the analysis/snapshot generation has completed, you can view the results in the normal manner. The following objects and links will be displayed in CAST Enlighten:
Objects
All objects are represented under the File browser > Xaml Source file folders in CAST Enlighten as either WPF Custom Controls, or WPF Controls:
Icon | Object type |
---|---|
WPF Control | |
WPF Custom Control |
Note that if the Name Attribute of an object is present, then it will be used to display that object in CAST Enlighten. For example:
Name not present | Name present |
---|---|
The following objects are detected:
Border |
BulletDecorator |
Button |
Calendar |
Canvas |
CheckBox |
ComboBox |
ContextMenu |
DataGrid |
DatePicker |
DockPanel |
DocumentViewer |
DropShadowBitmapEffect |
Expander |
FlowDocumentPageViewer |
FlowDocumentReader |
FlowDocumentScrollViewer |
Frame |
Grid |
GridSplitter |
GroupBox |
Image |
Label |
ListBox |
ListView |
Menu |
Panel |
PasswordBox |
Popup |
ProgressBar |
PrintDialog |
RadioButton |
RepeatButton |
Ribbon (WPF) |
RichTextBox |
ScrollBar |
ScrollViewer |
Separator |
Slider |
StackPanel |
StatusBar |
TabControl |
TextBlock |
TextBox |
ToggleButton |
ToolBar |
ToolTip |
TreeView |
WrapPanel |
Viewbox |
Links
Source | Link type | Target | Example |
---|---|---|---|
XAML Control | call | Action Event method implemented in source file | |
XAML Control | relyOn | Set and get accessors of Property implemented in source file | |
XAML Control | relyOn | XAML Control which is used | |
XAML Custom Control | relyOn | XAML page that contains its definition | |
XAML Custom Control | relyOn | Defined Class | |
XAML Custom Control | AccessExec | Corresponding Property | |
XAML Custom Control | AccessExec | Corresponding Event handler function | |
XAML Source File | relyOn | Referred Class |
Limitations
In this section we list the most significant functional limitations that may affect the analysis of applications using WPF:
- Binding in code is not supported - see https://msdn.microsoft.com/en-us/library/ms742863(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1 for an example
Binding links are not handled correctly when the same binding target exists in different classes
- The direction of the data flow (Binding.Mode properties such as OneWay, TwoWay and OneWayToSource) is not supported - see https://msdn.microsoft.com/en-us/library/ms752347(v=vs.110).aspx#direction_of_data_flow for an example
- The RelativeSource property (Gets or sets the binding source by specifying its location relative to the position of the binding target) is not supported - see https://msdn.microsoft.com/en-us/library/system.windows.data.binding.relativesource(v=vs.110).aspx for an example
- Some XAML control objects which are visible in CAST Enlighten may not be seen in the CAST Engineering Dashboard.
- Links between XAML Control objects and code embedded in XAML are not supported.