Search This Blog

Saturday, June 9, 2018

ATTENTION !!! This personal blog no longer gets new posts

Please follow the official XAF Team and XPO Team blogs, which are regularly updated by me and other DevExpress members.
Thanks, Dennis.

------------------------------------------
In XAF, users of the Model Editor and Report Designer tools are likely to be affected by this issue. Well, advanced users who enabled the ShowPropertyGrid property in the layout control or made custom PropertyGridControl integrations may be affected too - at least we all know a few😉

Our XtraVerticalGrid developers are aware of this problem and have already fixed it in v18.1.4 (it should be out in 1.5-2 weeks). In the meantime, the hotfix is already available for download at T638535: PropertyGridControl - The NullReferenceException is thrown when scrolling and an editor is active. Please accept sincerely apologies from our XAF, XtraReports and XtraVerticalGrid teams for all the inconvenience here.

Here is the error callstack for your reference:

System.NullReferenceException at DevExpress.XtraVerticalGrid.PGEditingState.MouseWheel(DevExpress.Utils.MouseWheelScrollClientArgs) at DevExpress.XtraVerticalGrid.BaseHandler.DevExpress.Utils.IMouseWheelScrollClient.OnMouseWheel(DevExpress.Utils.MouseWheelScrollClientArgs) at DevExpress.Utils.MouseWheelScrollHelper.OnScrollLine(DevExpress.Utils.DXMouseEventArgs, Int32, Boolean) at DevExpress.Utils.MouseWheelScrollHelper.OnMouseWheel(System.Windows.Forms.MouseEventArgs) at DevExpress.XtraVerticalGrid.BaseHandler.OnMouseWheel(System.Windows.Forms.MouseEventArgs) at DevExpress.XtraVerticalGrid.VGridControlBase.OnMouseWheelCore(System.Windows.Forms.MouseEventArgs) at DevExpress.XtraEditors.Container.EditorContainer.OnMouseWheel(System.Windows.Forms.MouseEventArgs) at System.Windows.Forms.Control.WmMouseWheel(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef) at DevExpress.XtraEditors.Container.EditorContainer.WndProc(System.Windows.Forms.Message ByRef) at DevExpress.XtraVerticalGrid.VGridControlBase.WndProc(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)


Tip 1: The How to obtain a design-time exception call stack KB article describes how to locate these important error details, especially if your Visual Studio crashed. This information is helpful when submitting to support. BTW, to improve your chances of getting a faster and helpful answer from support, check these related tips as well:
   How do I ask a good question? (StackOverFlow)
   How to Report Bugs Effectively (Simon Tatham)
   A request for simple example programs (Julian Bucknall)
   Collect and Analyze the Diagnostic Information (XAF documentation)


Tip 2: When you located the call stack information and determined from it that an exception is raised from DevExpress code, I recommend you search for one or several topmost call stack method names in our support database. This behavior might be reported by someone else, e.g.: https://www.google.com/search?q=PGEditingState.MouseWheel


FreeImages.com

Friday, June 1, 2018

Concurrent Record Updates Merging in XPO-based XAF ASP.NET apps (v18.1)

From the Optimistic Concurrency Control help topic:
"In multi-user data-aware applications, there are times when one user edits a record while another user is editing the same record. As long as the changes being made do not affect the same field (e.g., one user modifies the task description while another user attaches a file), XAF applications can resolve the situation, and merge simultaneous changes made by different users. To enable field-level locking, set the XpoDefault.TrackPropertiesModifications static property to true."

Previously, this feature was available only for WinForms apps. With v18.1, ASP.NET WebForms XAF applications can handle concurrent record updates by merging simultaneous changes (by two or more different users) as well:


Here is also a video from our MainDemo.Web app (run from the Demo Center):



Notice that two different users can edit different properties (e.g., NickName and SpouseName) and then merge  these non-conflicting changes.

Have you already enabled this feature in your XAF Web apps? Please let us know how this works for you.

How to access and manipulate a custom ASP.NET user control from a Controller in a Module project


We have updated our How to: Show a Custom Data-Bound Control in an XAF View (ASP.NET) tutorial with more information on how to pass external data to custom Web user controls

Previously, our customers had the following difficulties with this task:

- In which project to create web user controls. By default, ASP.NET suggests doing this in the YourSolution.Web project. Adding an *.ASCX control into the YourSolutionName.Module.Web project led to errors.

- How to deal with circular references when attempting to reference the YourSolution.Web project from a Controller defined in the YourSolutionName.Module.Web project.
- How to pass an IObjectSpace, XafApplication or current View object to a custom user control.


A common way to resolve such a dependency (unrelated to XAF itself) is to define an interface within your class library (a XAF module project) and implement it by using your custom user control.


Thursday, May 31, 2018

WinForms - How to manage long text in DocumentManager tabs

Please check out the Problem and Solutions sections in the T629226: WinForms - Long text is cut off in DocumentManager tabs ticket.

We are going to improve this in the upcoming v18.1+. Our designer's favorite is #2, but we cannot implement it in a minor version due to a breaking change. BTW, option #1 shown in the screenshot below also looks fine. Take note of solution #3 as well - you can customize this behavior without writing any code.


Please let me know what option you prefer or if you are handling it differently. Thanks.

BTW, have you modernized your XAF WinForms apps using SVG icons and Light Style in v18.1? Click the screenshot below to see the new look & feel. Do you like it?


Friday, May 25, 2018

Web - How to avoid issues with data-bound controls due to missing or non-unique key values

Check out the Web - How to avoid issues with data-bound controls due to missing or non-unique key values KB article to make sure that your business model is aligned with the best practices. Here is a short extract:


Symptoms
You may notice the following side-effects in a Web ListView while it may work fine in WinForms:
- A wrong DetailView may be selected when an unsaved record is clicked in ListView;
- ListView may have no selection column;
- In inline edit or batch mode, all records may become selected or editable.
These effects are especially frequent in a non-persistent class ListView or a nested ListView for an aggregated details collection with newly added or unsaved records.

Explanation
All new records added to the ListView and not yet saved to the database will be assigned with a temporary key value (e.g. -1 or an empty Guid/String value depending on your key type). In a Web application, ListView uses a business class key property to identify records, because there is no way to access real business objects from the web browser. Hence, there is a requirement that each business object must have a unique value assigned to the key property. ASPxGridView and other data-bound controls require this for the correct operation of such features like selection, filtering, sorting, grouping and the standard XAF functionality that depends on them (see also ASPxGridBase > KeyFieldName). 
If a key property is missing in a business class completely or if a key property is not initialized with a unique value immediately after the record is created, these duplicate or invalid records may lead to a data-bound control malfunction as expected.


Please inform me of your health-check results!

FreeImages.Com

Friday, May 11, 2018

Improved diagnostics for ListView errors in Server Mode

From the Core - ListView shows blank rows or freezes in certain scenarios in Server Mode ticket:


In certain scenarios, a list view with DataAccessMode set to Server may show empty rows or operate slowly. This behavior is usually caused by exceptions thrown during data loading that are handled internally. Such situations can be diagnosed using the debugger (see What to do when the grid displays blank rows in Server Mode and ASPxGridView displays empty rows when bound via Server Mode).

Starting with v18.1, we improved the XAF built-in diagnostics for errors occurring in Server Mode data sources. Now, server-side errors (intercepted via the ServerExceptionThrown event) are written to the application log. In addition, when the log level is set to 4 (Verbose), errors reported via the InconsistencyDetected event are also written to the log. While the latter event doesn't always indicate a problem, the error message may be helpful in researching the cause of performance issues.



Wednesday, May 9, 2018

Quick questions on our change log

Q1: How often do you check the "Resolved Issues", "Known Issues", "Breaking Changes" pages in our What's New documentation? For instance: "never, did not know about this page"; "every minor"; "every major"; "rarely, only when I encounter an issue"; "once 1-2 year when we upgrade"; your option.
Q2: What would you like to improve about these pages to make your work more comfortable?
Q3: Are you missing anything important from the "New Major Features" section like this for v18.1?



This post idea came after looking at the fixed XAF issues for the upcoming v17.2.8:

As you can see, titles have different formatting and it is not easy to find all issues for a certain platform or module, e.g. Mobile.

This is how a bit better formatted list looks now:

This needs a little bit more discipline from our team, but may be more helpful for our customers. I am  still hesitating because this problem may not exist for many, because Google Analytics reports low visits for these pages.

I hope you can help us see whether to focus on more important things by answering my questions above. Your other thoughts and suggestions are welcome too, as always.

See Also: General Information > Installation > Upgrade Notes

SVG images in RichTextPropertyEditor

UPDATED:
With v18.2, the ForcePngIcons option is no longer required. Use the ImageLoader.Instance.UseSvgImages property instead.
----------------------------
We've temporarily disabled SVG icons in RichTextPropertyEditor (a part of the new Office module in v18.1.3) in an XAF app until we redraw all default PNG images (by the end of 2018). Our designers aimed to avoid bad UX after mixing PNG and SVG images within one screen. For instance, the merged main and RichEditControl's menus may look inconsistent. Different images in independent UI contexts are acceptable, e.g., SVG in a separate report designer and PNG in the main form.

To force SVG images in v18.1, set the static DevExpress.ExpressApp.Office.Win.OfficeWindowsFormsModule.ForcePngIcons property to False in the Main method of the YourSolutionName.Win/Program.xx file (available in v18.1.3+).



To check our progress with regard to SVG icons support for WinForms and to help future development by answering questions from our team or sharing early feedback, please visit this knowledge base article.

Wednesday, April 25, 2018

Update on WinForms SVG Images Support in v18.1

Please do not miss our recent update in the WinForms SVG Images Support - Preview in v18.1 KB article:

We've extended the number of scenarios where SVG images are now correctly shown in a WinForms XAF application with the following:
● SVG images used for SingleChoiceAction itself and its items shown in the bar and ribbon controls.


● SVG images used for SingleChoiceAction shown in the popup menu.



● SVG images used for ParametrizedAction shown in the bar and ribbon controls and in the popup menu.



● SVG images used for ParametrizedAction shown in ButtonsContainer on a detail view.



● SVG images used for nodes in TreeListEditor via the new DevExpress.Persistent.Base.General.ITreeNodeSvgImageProvider interface.



Your feedback is needed!
If you want to test this feature with your real world applications on a virtual machine (or another suitable test environment) prior to the official release, download the v18.1 preview build here: DevExpress XAF v18.1 Preview installer 

UPDATE on Customization Forms - XAF WinForms v18.1.3+

With v18.1.3 (RTM or Beta2), a tooltip will be shown for complex property paths to avoid confusion from fields with the same name. Refer to the attached video:



Note that since multiple customization forms can be opened at the same time, now the form's header also includes the View's caption. We hope your end-users will appreciate these minor usability improvements. Refer to the original Support Center ticket for more details.

See Also:
Customization Forms and Model Editor Improvements - XAF v17.2.6

The future of old RichTextPropertyEditor and HtmlPropertyEditor with the introduction of the new Office-inspired Word Processing Module - YOUR FEEDBACK IS NEEDED!!!


Why bothering?
As many of you already heard, we are shipping the Office module with the Rich Text Editor in v18.1. It allows end-users to create, load, change, print, save and convert documents in different formats, including HTML. At this stage, this new module is for WinForms only. We see ways to support more Office functionality and cover other platforms in the future.

As you know, there are two very old XAF Property Editors, which perform similar functions, but with lower quality. They are both based on standard Microsoft controls:
DevExpress.ExpressApp.HtmlPropertyEditor.Win.HtmlPropertyEditor - this is a part of HTML Property Editor Module that integrates the System.Windows.Forms.WebBrowser component. 
DevExpress.ExpressApp.Win.Editors.RichTextPropertyEditor - this is a part of the standard DevExpress.ExpressApp.Win module that integrates the System.Windows.Forms.RichTextBox component.

We created them almost 10 years ago when DevExpress did not provide controls with similar functions. Today, their usage is not justified also because of missing High DPI support, nice icons and useful functions like Mail Merge. Workarounds can be implemented for these standard controls too, but it does not make much sense to invest our resources into this when much better options are already available. These editors have not recently received updates in other areas anyway. This is still a maintenance work for our team that could have been spent on something else.

What we want to change and how?

Friday, April 20, 2018

XAF v18.1 - An application will not start if there are non-existent member or type info for the Application Model elements

Starting with v18.1, we have introduced checks for type and member info existence at the core level. If a type or member is not existent, the exception will be thrown by default:


NOTE: Type and member info is mandatory as ALL standard and third-party modules rely on it. We do NOT recommend disabling this check in production, because your application will still fail later (you may not notice it and it will happen on an end-user machine).

Typical but not all scenarios where you may see this error are:
- Code changes to an underlying object type structure. For instance, class renaming or removing, namespace or assembly changing; member renaming, removing or its underlying type changing (also applied to custom fields added at runtime).
- Invalid model differences for changed types and members are still present (e.g., for ListView columns and a DetailView layout, appearance and validation rules).

Please refer to this Support Center article for more details on possible solutions and ways to disable this behavior.

Monday, April 16, 2018

Capturing a user's signature in an XAF mobile application - UPDATE for v17.2.8+

Starting with v17.2.8, MobilePropertyEditor supports the Edit ViewEditMode. We updated our How to use a Signature Pad in XAF Mobile example and enabled SignatureAction in the Edit mode accordingly. This improvement saves end-users time not only for this particular scenario (they no longer require to switch views), but also when working with regular image properties.

FreeImages.com/Carl Dwyer

To see the difference in action, refer to the GIF file below and compare it with the one from my previous post:


Your feedback is needed!
For early testing, we published a daily build. You can download it using the following link: DevExpressNETComponents-17.2.7.18099.exe. We look forward to hearing from you.

Thursday, April 12, 2018

Updates to the new Rich Text Editor Module and ASPxGridLookup-based PropertyEditor in v18.1

Please do not miss the updates to the following KB articles from our team:

https://www.devexpress.com/go/XAF_Try_RichTextEditorModule_v18.1.aspx
We have moved further and added Mail Merge support to the new module. To enable this feature, set the MailMergeDataType property in RichEditWindowsFormsModule in Application Designer. Now it's also possible to work with multiple rich text editors in the Ribbon mode. You can open the content of the selected rich text editor in a popup window using the 'Show in Popup' context menu item. Also now you can view rich text content in a list view's columns.

https://www.devexpress.com/go/XAF_Try_ASPxGridLookupPropertyEditor_v18.1.aspx
ASPxGridLookupPropertyEditors provides the capability for creating/modifying objects via a popup window. The add and edit buttons open the popup window to create a new object or to modify a selected one. ClearButton allows clearing the editor value. 

Your feedback counts!
If you are an active Universal subscriber and would like to test these new features prior to the official release, download the DevExpress XAF v18.1 Preview installer. By providing early build access, we hope to find out whether our new features and solutions address your requirements and issues. Your testing efforts and your feedback help us deliver the best possible final implementation.


Tuesday, April 3, 2018

Old entries in the XPObjectType table - YOUR FEEDBACK IS NEEDED!


I am reviewing the priority of a quite dated SC item on the subject and wanted to ask the community for help. The problem may occur when old business class libraries exist in the application folder. By default, XPO tries to load them by the XPObjectType info along with the new versions. This may lead to a conflict at runtime or startup performance degradation. In the latter case, assembly type resolution may come at a cost (see the point 3.5 under How to measure and improve the application's performance).

Why are we hesitating to remove old XPObjectType entries by default?
1. Removing old XPObjectType records affects other apps accessing this database and is serious. Outdated service table records may relate to business class records too (inheritance mapping is in use very often). So, deleting them will lead to foreign key constraint violation. Creating a sophisticated generic solution for this is not easy task.

Monday, March 26, 2018

Integrating UnitOfWork and XPObjectSpace descendants into an XAF app


We've made some code changes for v17.2.6+ as well as created two articles for advanced XAF developers who may need the subject for some low-level tuning:





Sub-classing is itself easy.  The most interesting part comes for the two popular security configurations: the Integrated  mode and the Middle-Tier Application Server. Thankfully, this is rarely required for complex or specific scenarios only.  Here are several customer tickets for your reference:

    How to map a property to a calculated database column (implement a read-only persistent property)
    xpo and sql server identity fields
    Using inherited UnitOfWork object
    XAF: Create CreateCustomObjectSpaceProvider with parameters from login window
    SecurityStrategyComplex: How to modify objects/properties in code when the user does not have the permission?

To learn more about low-level options to control how your application saves data and where, check out the How to customize the underlying database provider options and data access behavior in XAF.

Your feedback is needed!
Finally, I am just curious: if you search your entire solution in Visual Studio (Control+Shift+F) for any of the ": UnitOfWork", ": XPObjectSpace", ": XPObjectSpaceProvider" strings or their VB.NET equivalents (e.g., Inherits UnitOfWork), how many occurrences  would you have and for what? Please let me know in the comments!

FreeImages.com/Terry Eaton

Thursday, March 8, 2018

XAF WinForms v17.2.6 - Beware of missing icons in inactive tabs after restoring the Tabbed MDI layout

I want to draw your attention to the T611846: DocumentManager - TabbedView does not show images for documents issue already fixed in the XtraBars Suite and which XAF WinForms Tabbed MDI users might encounter after upgrading to v17.2.6. The number of users who already hit this exceeded a certain threshold, and the known issues section in the What's New documentation or manual searching the Support Center may not help effectively discover it yourself. So, I am posting this here to widely inform those who have not yet upgraded their XAF/WinForms projects to v17.2.6.

You can also download a hotfix build from here.

Please accept sincerely apologies from our XAF and XtraBars teams for all the inconvenience here.


Diagnostic tool for Security System - YOUR FEEDBACK IS NEEDED!!!

Earlier we described the prototype of diagnostic tool. We created it to help a developer to understand why access to a certain object and its members is allowed or denied.  
  
We analyzed the feedback we got on this matter and provided the following improvements in v17.2.6:
 - To enable the security diagnostic tool, use the familiar EnableDiagnosticActions option.
 - You can select a type and a member you wish to analyze.
 - Results are presented in the XML format.
 - We provide more details on how the diagnostic tool calculates results.
 - There is a way to visualize criteria for easier analysis.

You can get more info about the tool from the KB article below:

                                     https://www.devexpress.com/kb=T589182 

Your feedback is needed
Please test the tool and let us know whether it is useful in your development process and how you would change it. For instance, the more specific there are use cases of this tool where it was difficult to configure permissions for a user, the greater it is possible that we can arrive at technical solutions that will address them.


Monday, February 26, 2018

AccessViolationException at Microsoft.VisualStudio.Shell.Interop.IVsRegisterEditors.UnregisterEditor may occur in Visual Studio 2010, 2012


This sporadic design time error might go away in Visual Studio 2013, 2015, 2017 and newer.

Exception

Type:
 System.AccessViolationException
Message:
 Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
StackTrace:
   Microsoft.VisualStudio.Shell.Interop.IVsRegisterEditors.UnregisterEditor(UInt32 dwCookie)
   Microsoft.VisualStudio.Shell.Package.Dispose(Boolean disposing)
   DevExpress.ExpressApp.Design.Core.XAFPackageV4.Dispose(Boolean disposing)
   Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.Close()



We have been tracking this error for years from XAF users using https://logify.devexpress.com. We also received a few tickets, but could never replicate this behavior for debugging. Our attempts to log diagnostic information about this error did not help either. Well, it does not seem to relate to the DevExpress.ExpressApp.Design.Core.XAFPackageV4.Dispose method itself. There are also many non-XAF reports devoted to the same error, but different packages on the Web. https://www.google.com/search?q=Microsoft.VisualStudio.Shell.Interop.IVsRegisterEditors.UnregisterEditor+accessviolationexception

From the Logify stats, we know that this error occurs only with these two old Visual Studio versions. It seems that something got fixed in newer IDE versions. If you are on Visual Studio 2010 or 2012 and encountered this error at design time, consider upgrading your IDE - it's 2018 after all:-)







Wednesday, February 21, 2018

Usability change for SingleChoiceAction with a single visible sub-item - YOUR FEEDBACK IS NEEDED!!!


We have incorporated the usability improvement from my past post in v18.1 by default. It affects SingleChoiceAction with ShowItemsOnlyClick = False and ItemType = ItemIsOperation  and should improve UX for the majority of our users. We also want to enable the same behavior in an upcoming minor update (e.g., v17.2.6 or next). Our team would appreciate your feedback to help us decide on the latter.




Questions/Risks
While this behavior is always desired for the New & Clone Actions, because their meaning is clear from the context, certain custom and built-in Actions like Show In Report, Change State may be affected when they keep only a single sub-item. Examples:

17.2.5 and older versions:




18.1 (and 17.2.6+, if the majority likes it):


Notice that we've replaced a dropdown/triangle glyph with a simple button. We believe that this visual change is still not breaking (and thus is acceptable for a minor version), and it all is more logical than it was before. Before, when ShowItemsOnClick = False, you could still press the SingleChoiceAction's button blindly, i.e., without expanding its items using the triangle glyph. To help you avoid mistakes, the button is now displayed in the ChoiceActionItem's tooltip. You can also control the default Action item behavior using the DefaultItemMode property. If you do not like the new behavior, you can always set ShowItemsOnClick = True in the Model Editor.

Question: Are you OK to have this new behavior as default in v17.2.6+ too? 

Please answer with +1 or -1 with comments in this post. If you need to test your real apps live before making a decision, I can provide you with v17.2 or v18.1 hotfix builds. Thanks for your help in advance.

UPDATE:
Thanks to everyone! With v17.2.6, this behavior is enabled by default.

Wednesday, February 14, 2018

Learning through reading the source code

I will start this post with the new Visual Studio 2017 function, which I hope will be helpful for XAF developers too. I have both RTM and Preview versions installed, but I am mostly using the latter one for testing. The new function I spotted in their change logs is called "View decompiled source definitions instead of metadata (C#)".

As you can guess from its name, it changes the very often used "Go To Definition" command (F12) so that it displays the actual code of a C# type or member who's source code is unavailable - very useful and convenient, IMHO. It is decompiled using ILSpy, the tool I have already been using for years as default program association for opening *.dll files -  partially the reason of why this news got my attention. This experimental feature is new in Visual Studio 2017 version 15.6 preview 2+ and it must be turned on explicitly using the Tools > Options  >  Text Editor > C# > Advanced > Enable navigation to decompiled sources menu item. 


Customization Forms and Model Editor Improvements - XAF v17.2.6

Customizing Views layout, e.g., making certain fields visible, changing their locations is something that XAF developers usually learn and appreciate from day one. That is because you can drastically change the UI of your app by just moving the mouse and without any coding and recompilation, also at runtime. 

The next maintenance release (v17.2.6) should come with a few minor improvements to the customization forms in DetailView, ListView and the Model Editor, which we hope will be welcomed by both developers and end-users as well.


Thursday, February 8, 2018

Beware of the failures when uploading JPEG/JPG images using the System.Drawing.Image type properties - XAF ASP.NET WebForms v17.2.5

 issue, which is already fixed in XAF v17.2.6

We apologize for the inconvenience, and if you cannot wait for the hotfix or did not plan to spend additional time on upgrade right now, please consider using the workarounds.

Important notes and workarounds
From v14.2, Image Property Editors (both WinForms and ASP.NET) support images saved as byte array objects (in addition to previously supported System.Drawing.Image objects). This allows us to significantly decrease web server memory consumption because the byte array can contain an image in a compressed format and the server does not have to unpack it. The previous approach with the System.Drawing.Image type property is still supported, but we recommend that you migrate to the byte array storage to improve performance. Refer to the BLOB Image Properties in XPO  and How to change the image property type from System.Drawing.Image to byte array help topics for more details. 



Minor improvements to the ConditionalAppearance and ViewVariants modules - XAF v17.2.6


I also wanted to inform you of some "home work" done by us in v17.2.6 to improve your XAF development experience with these modules:

GridListEditor - An appearance rule has no effect in the new item row until a value is entered into any cell
View Variants Module - ListView variant always takes the DataAccessMode value from the root node instead of own model differences, which may cause an exception due to an incompatible ListEditor type

FreeImages.com/linusb4



While the first scenario is quite specific (we heard about it from our largest XAF customer and a few others), the second one was likely encountered if you use the ViewVariants module. For instance, when having one variant as a grid operating in server mode while having another variant as tree, pivot, scheduler or whatever ListView editor that does not support server mode. In the past, this unsupported configuration could cause an exception at runtime. Starting with v17.2.6, it all works as the majority our users expect - at least we believe so based on the feedback we received. The online documentation on the ViewVariants module will be updated accordingly by release time, of course. Finally, many thanks to Dave Hesketh, Martin Praxmarer, our MVPs, as well as other customers for bringing this to our attention.

If you cannot wait for the next maintenance update (v17.2.6) to test both things, install this night buildDevExpressNETComponents-17.2.exe


As always, my team and I are looking forward to hearing what you think, even on such small things and maybe others that could make your life a bit easier.

Wednesday, February 7, 2018

No Visual Studio designers for generic ViewController versions

XAF Controllers are technically descendants of the System.ComponentModel.Component class, primarily to be smoothly integrated with the Visual Studio design time features. The standard Component designer does not support generic classes due to a Visual Studio limitation: https://stackoverflow.com/questions/6877217/can-visual-studio-designer-show-classes-inheriting-generic-types 
This is a Microsoft functionality and we cannot do much about it on our side. So, if you have a class like this, and try to double click it or use the Enter key for it in the Solution Explorer, you will receive this error, which is expected here:



This has always caused support calls to us from day one and still causes them today. Check out this support article to learn more about this situation and our previous recommendations.

Starting with v17.2.6, we have removed the visual designer association from the base ViewController<ViewType> and ObjectViewController<ViewType, ObjectType> classes - they will always be opened directly in the Code Editor now. This should work fine in Visual Studio 2015, 2017 and newer versions. This does not work for Visual Studio 2013 and older versions and we decided not to investigate this further, because of the very low usage rate of these IDEs nowadays.



We believe that this new behavior is most expected here and really hope that it will not cause new questions😀. Originally, generic View Controllers were specially designed for users who prefer to do everything manually and want to have a more elegant and compact code. So, opening the Code Editor for such classes is naturally expected. Taking this opportunity, we also improved our online documentation to further promote generic View Controllers, since most of our Support Center answers, demos and docs use this concise code approach anyway.

My team and I are looking forward to hear from you on what you think of the new behavior.

Faster opening of a DetailView with lots of items - XAF WinForms v17.2.6

How big is the DetailView in the question? 
Well, in the T581043 ticket's test project, there are 250 editors in the detail form layout. Big enough, huh?

FreeImages.com/Marcello eM


How much we could speed it up? 
On our powerful test machines, the time to open DetailView with just plain editors (no layout groups or tabs) has dropped from 3 seconds to almost 1. In real world applications, time to open a detail view depends on the application configuration (controllers, data, collection properties, calculated fields) and deployment specifics.

If you cannot wait for the next maintenance update (v17.2.6), install this night buildDevExpressNETComponents-17.2.exe

My team and I would be interested in hearing whether it is something you and your clients will notice too or if there are any problems with that new build. Thanks in advance.

Regards,
Dennis

P.S. If you already migrated to XAF v17.2, make sure you set XafApplication > OptimizedControllersCreation to True as well (read the prerequisites in the docs, first). The How to measure and improve the application's performance article may also help your app perform faster (magically, just after looking at it😜), so check it as well in case of problems in other scenarios.