This Blog


Favorite Posts


  • WinForms Layout Control: Design-time templates

    As with all matters in development, oftentimes we find ourselves building a user interface or part of a UI that is remarkably similar to something that we’ve just built. To avoid the repetition – in code, that is – we have had up to now several strategies:

    1. UserControls. This is certainly a viable solution if you have exactly the same UI that you want to reuse. If not, then it’s more work than it’s worth.
    2. Code generation. This works pretty well (I’ve done this before in my dim and distant past, for example), apart from one drawback: you don’t get to see your UI at design-time.
    3. Visual Inheritance. Man, if you go this route, good luck. This just smacks of over-engineering to me; I think I’ll stick with UserControls.

    The new version of the DevExpress WinForms Layout Control in v14.2 provides another much simpler way: design-time templates. This new feature allows you to save frequently-used layouts as templates and then be able to reuse those templates when necessary in your projects.

    As an example of how this works, let’s create a compound waybill form that shows the need for some UI reuse. Here’s what we’re aiming for:

    WinForms Layout Control: Example Waybill Form

    Notice that the “SHIPMENT FROM” and the “TO – CONSIGNEE’ sections are very similar: they both have addresses, and also similar ‘name’ fields.

    We proceed as normal when using the Layout Control by adding groups. When we get to the “SHIPMENT FROM” group we design it as normal, but before moving onto the group underneath which is very similar, we right-click the group we just created and select Create Template. Enter a unique name for the template and save it: you now have a reusable template in your repository. (All custom templates thus created are stored in the %Public%\Documents\DevExpress\XtraLayout\UserTemplates folder as XML files.)

    WinForms Layout Control: creating a template

    We’re now ready to use this new template. We go to the LayoutControl’s Customization Form and switch to the Templates tab. Locate the template in the list and drag it onto the form. The Customization Form allows you to see a preview of the template before we use it.

    WinForms Layout Control: Using a custom template

    Once the template has been dropped onto our form, we can customize the layout as desired, so changing the title to “TO – CONSIGNEE” and rearranging and re-captioning a couple of other fields.

    If you find that even creating a template is too much of a nod to reuse (you only want to reuse a particular layout once, for example), then we have also improved the copy/paste functionality of the Layout Control. In essence, select the group you wish to duplicate, press Ctrl+C to copy it, and then Ctrl+V to paste it. (In actuality, this shortcut is also based on the new templates feature, but the template created is not persisted.)

    Please note that the templates mechanism is version-agnostic. You can create templates in one version of the DevExpress WinForms suite and continue to reuse them in subsequent versions.

  • Silverlight’s future at DevExpress

    Over the past year, it has become increasingly apparent to the Microsoft development market that Silverlight has become sidelined. Silverlight 5, the current major version, was released December 9, 2011, three years ago. Apart from a series of minor updates occurring at roughly 6 month intervals, the only code changes have been security updates propagated through Windows Update. Compare that with the rapid-fire releases of Silverlight 1 through 4 (Sep-07, Oct-08, Jul-09, Apr-10) and you soon begin to wonder what Silverlight’s future portends.

    Driving on road towards the setting sun © rasica - Fotolia.comNow, first things first: Microsoft have provided a standard Product Lifecycle for Silverlight that states, in summary, Mainstream Support for Silverlight 5 will end on December 10, 2021. (Support for Silverlight 1 – 4 has already ended.) That’s the official news.

    Apart from that, there is no real explicit news about Silverlight’s future. Last month, when Microsoft were open-sourcing .NET Core 2015, talking about Visual Studio 2015 and ASP.NET vNext, and providing early bits for testing, there was a blog post detailing a roadmap for WPF, but, tellingly, there was nothing about Silverlight. For all intents and purposes then, we are left with the impression that Silverlight is in maintenance mode.

    From my viewpoint, I’d say this: the overall strategy of the web application market is moving away from the requirement for browser add-ons. It’s HTML5 and JavaScript and client-side controls and web services and simple deployment and the cloud. Not that Silverlight can’t do any of the latter things, but it’s no longer what the market is steering towards. Application frameworks like Silverlight and Adobe Flash have had their day: HTML5 and JavaScript are rapidly becoming the de-facto web application framework. This is especially so when you consider the burgeoning market for responsive/adaptive web apps that target tablets and phones: there’s no Silverlight there. We are clearly seeing this trend in our own sales statistics too: throughout 2014 it’s been obvious to us that customers want to write web apps but don’t want to write Silverlight ones.

    The one thing about Silverlight that is still valid today and into the future is XAML. From its early beginnings in WPF and Silverlight, XAML has grown into a cross-platform user interface definition language. We now use it for WPF, WinRT, Windows Phone, and soon-if-not-now Universal Apps. The legacy of Silverlight the framework is essentially Windows Phone, but that of XAML is across all platforms.

    Based on this analysis, we made the decision to put our Silverlight controls into maintenance mode as well – in fact, we have already forked the code. We will not be providing any new functionality for our Silverlight controls but will provide maintenance updates to fix any issues as and when necessary. We have already stopped selling DevExpress Silverlight as a separate product (either as a new subscription or as a maintenance subscription) and it is now only available as part of DXperience or Universal.

    We regret having to make this decision, but we feel our XAML development expertise and resources are going to be better spent in the future being targeted at WPF, WinRT, and Universal Apps. As always we welcome your feedback about our future strategy, so please feel free to email management@devexpress.com or comment below.

  • DevExpress VCL: Improvements to grid, maps, and spreadsheet (coming soon in v14.2)

    A quick trio of improvements to the DevExpress VCL Subscription…

    VCL Grid Control

    As part of v14.2, we've added a Find Panel to our grid control, the ExpressQuantumGrid. This enhancement is dead simple for your users: to find some text in the dataset being shown in the grid, they simply enter the search text in the Find box and the grid will display those records that have matching values. What could be simpler?

    DevExpress VCL v14.2: Find Panel in Grid

    From your side, it's still pretty simple: there is a set of options available to control the display and behavior of the Find Panel. You can specify which columns are to be searched, choose between delayed automatic and manual search modes, allow search strings to be highlighted within located records, and so on. The Find Panel is available within all grid Views, except for Chart Views.

    VCL Map Control

    DevExpress VCL v14.2 adds support to the map control for:

    • Bing Maps services (Geocode and Routes)
    • Location-based queries to Bing Maps services
    • Shapefile format files

    DevExpress VCL v14.2: Map Control Routes from Major Roads

    This example shows route planning with Bing Maps as the provider using major roads.

    DevExpress VCL v14.2: Map Control Shapefile Format

    And this is an example of using the new shapefile support.

    VCL Spreadsheet Control

    In this release we’ve added the capability for the spreadsheet control to read and save print settings in spreadsheet files.

    We’ve also added support for arrays in formulas, together with their visual representation:

    DevExpress VCL 14.2: Spreadsheet Control Array Formulas

    So have at it with sets of disjoint ranges in your formulas!

  • DevExpress VCL: New Rich Edit Control CTP (coming soon in v14.2)

    As I’ve said many times now, if you want to guess what will be coming in future versions of DevExpress VCL, all you have to do is look at what our .NET teams have been adding to their suites right now. And this next new control fits the pattern exactly: let the .NET teams work out all the issues, then port the control to Delphi.

    I am delighted therefore to announce the new rich edit control for VCL. Think of all the features you take for granted in Microsoft Word, but wrapped in a new Delphi-coded rich edit control, designed to work seamlessly with the other UI controls that are part of DevExpress VCL, such as the ribbon.

    DevExpress VCL v14.2: Rich Edit Control

    The initial version in v14.2 of this important control is marked as a CTP (Community Technology Preview). It’s nowhere near complete yet, but forms a good basis for adding new functionality – such as tables, more Actions (see below), and so on – that we’re intending to address over the next few months. It ships in v14.2 with the following essential features:

    • Character and paragraph formatting
    • Image support
    • Styles
    • Lists (bulleted, numbered and multilevel)
    • Undo/Redo history
    • Clipboard operations (cut, copy, paste)
    • Overtype mode
    • Text highlight
    • Visual formatting marks, if needed

    Not only that, but we’ve added a command API so that you can completely manage the operation of the control. This is done through the use of Action objects. By linking these Action objects to elements of your UI, such as ribbons, menus, and toolbars, you can easily create a powerful word processor in your application.

    (Note that this control is marked as a CTP beta for v14.2. Although you can use the control as is, please be warned that it will change over the next few months as we polish and add to it. Properties, methods and events may – will – change for the final release. Also, currently the control is for 32-bit applications written in Delphi and only supports the RAD Studio XE series. Although a  64-bit version is in the works, we will not be back-porting it to RAD Studio 2010. It is only available in the full VCL Subscription.)

  • DevExpress VCL: Camera control, Toggle switch editor (coming soon in v14.2)

    Among all the major new features, we found the time to add a couple of new smaller controls to DevExpress VCL v14.2.

    The first is a fun control, directly from customer feedback: the Camera Control. This control allows you to incorporate the camera on your device (say the camera on your Windows tablet, or the webcam on your laptop) into your application. For example, you have an app for insurance assessors and you want the app to be able to take photos of some property that’s being claimed on. Incorporate the new camera control, and your users are ready for action.

    DevExpress VCL v14.2: Camera Demo App Screenshot

    It even works with more than one camera – say you have a tablet with front and back-facing cameras – and as shown here I’ve tested it on my laptop that has both a built-in webcam and an external Logitech camera (held in my hand, as it happens).

    The second smaller control is a modern tablet-style toggle switch editor.

    DevExpress VCL v14.2: Toggle Switch Control

    It’s a touch-friendly control designed to replace a traditional check box. We’re providing unbound, data-aware, standalone, and in-place versions of the editor.

    (Note that new controls in DevExpress VCL are only available for RAD Studio 2010 or the XE series. Delphi 7 and 2007 are not supported with new controls.)

  • DevExpress VCL: Gauge Control (coming soon in v14.2)

    With every release of DevExpress VCL, we add more controls and features for data visualization. Many applications these days are growing into business analysis systems: data crunching and the presentation of results in the clearest way possible to allow for efficient understanding. Dashboards are a prime example of this scenario.

    VCL Gauge Control: Full Circular Gauges v14-2

    With v14.2 we’re adding a new control to DevExpress VCL to help you in conveying usable information at a glance in your dashboards, the Gauge Control.

    VCL Gauge Control: Linear Gauges v14-2

    Using the VCL Gauge Control you can communicate appropriate information with a variety of types: circular, linear, and digital.

    VCL Gauge Control: Digital Gauges v14-2

    We’re providing the following types of gauges with v14.2: Circular (full, half, and quarter); Linear (horizontal and vertical); Digital (using 7 or 14 segments). The gauges are available in both unbound or data-aware versions. Having chosen a gauge type, you can then select from a dozen built-in styles, or create your own.

    Please be aware that the Gauge Control only supports RAD Studio 2010 or later (and in particular it supports the entire XE-series, for both 32-bit and 64-bit). We do not provide support for Delphi 7 or Delphi 2007 with this control.

  • DevExpress Universal v14.2 released

    As I write this post, the teams are making the final v14.2 build ready to upload to our servers. In fact, by the time you read this, we will have flipped the (metaphorical) big red switch that makes it available to you, our active customers. Although our previous major releases have been bursting at the seams with new controls, new features and new enhancements, I’d have to say that, from my point of view, v14.2 caps them all. I wonder how we can do better for v15.1…

    New features across the board

    With this release, we continue to pull the platforms you know and use (and perhaps even love) into new areas of data visualization, attractive user interfaces, and usability. Just for some brief examples: a responsive UI for ASP.NET; a slick, fast full-featured export engine for Excel, which supports our new grouped/filtered data export from our grid and spreadsheet controls; an HTML5-based report designer/viewer; forms support in our PDF control; a preview richedit control for the Web; master-detail for the client-side datagrid; a new “Office for iOS” style for the WPF ribbon; umpteen updates for the Dashboard including element grouping and data filtering. And that’s what I can think of from the top of my head, before I even search the What’s New blog posts and remind myself of the new features for the map controls (mini-maps!), the report server, eXpressApp Framework, new chart types, and so on. There is a lot to read and digest.

    If that small synopsis has whet your appetite, you can find out more on the What’s New in 14.2 page, or read about various new features in more detail here on the DevExpress community blogs. Some typical examples:

    We have a couple more “New in v14.2” webinars to present this week – if you’ve missed any, please check our YouTube channel for the repeats – and, once the release is out, we have planned several webinar presentations in the coming weeks to explain some of the new features in more detail. We also have new tutorial videos that will be published throughout the remainder of 2014 and into 2015. If your preference is web programming, our online demos have all been updated to show off the new improvements and controls.

    DevExpress Universal 14.2 is now ready for download if you have an active license. If you are new to DevExpress (or perhaps didn’t renew last time), please check out these new features in the evaluation version. I’m sure you’ll find something that will entice you to purchase. Have fun!

  • WinForms and WPF Spreadsheet: Mail-Merge, Comments, and more (Coming soon in v14.2)

    In addition to the changes already described for the WinForms and the WPF spreadsheet controls, there are some smaller improvements and new features. Buckle up: this will be a wild ride…

    Mail-Merge: Data Source Wizard (WinForms)

    The Data Source Wizard allows the user to create a new data source, configure it, and, if there is more than one data source available, to select the one that is required for a particular task. Once created, the data source configuration will be stored in the XLS/XLSX spreadsheet file so the user does not have to re-configure the data source the next time.

    WinForms Spreadsheet: Mail-Merge Data Wizard

    In the past, creating and selecting such a data source required changes in your application code, so this user wizard should help reduce your involvement in such requirements, at least for technical users. With this wizard, the user can start performing a mail merge immediately the XLSX/XLS file is loaded into the Spreadsheet control.

    Alongside this new feature, we’ve added the ability to manage queries:

    WinForms Spreadsheet: Mail-Merge Query Designer

    …and also provided the capability to define and manage the data relationships required for complex master-detail reports:

    WinForms Spreadsheet: Data Relationship Editor

    Mail-Merge: Parameters Panel (WinForms)

    The Parameters Panel allows the user to fine-tune a mail-merge report by providing a required parameter. In previous versions, this relatively simple task required a significant amount of code. Here’s what it would look like for specifying an Order Number:

    WinForms Spreadsheet: Mail-Merge Parameter Panel

    To create a formula in the mail merge template linked to a certain parameter, the end-user can simply drag the parameter from the Parameters Panel and drop it onto a worksheet.

    Along with this user-oriented improvement, there’s a corresponding addition to the mail-merge API: developers can now work with mail merge parameters in code by using the MailMergeParameters parameters collection.

    Comments (WinForms and WPF)

    With this release, you can attach additional informational text to individual cells by using comments. This feature is available to end-users:

    WinForms/WPF Spreadsheet: Spreadsheet Comments

    Comments are displayed in a floating box anchored to a cell. Users can add new comments, edit the text of existing comments, move and resize the comment box, and hide or completely delete comments if they are no longer required.

    The feature is also available to developers: they can access worksheet comments in code using the CommentCollection collection. If required, developers can also restrict the use of Insert, Edit, Delete, Show/Hide, Move, and Resize operations for their users.

    Document Properties (WinForms and WPF)

    Next up are document properties. These form a set of information about the document (named values like Author, Keywords, etc, or custom properties) that is stored along with the document. Many document workflow systems require and depend on these properties.

    Users can view and modify their document properties by using the built-in dialog. This is invoked by the Document Properties button in the Info group of the File tab.

    WinForms/WPF Spreadsheet: Document Properties

    Programmatically, developers can access document properties using the DocumentProperties interface (use the IWorkbook.DocumentProperties property) and the DocumentCustomProperties interface (use the DocumentProperties.Custom property). The following code snippet illustrates how to specify document properties.

          IWorkbook workbook = spreadsheetControl1.Document;
          workbook.DocumentProperties.Title = "Spreadsheet API: Document Properties Sample";
          workbook.DocumentProperties.Description = "Managing document properties using Spreadsheet API.";
          workbook.DocumentProperties.Author = "Gerald A. Gilbert";
          workbook.DocumentProperties.Custom["Checked by"] = "Mike Hamilton";     

    The screenshot above is from our demo app. It illustrates the use of a custom worksheet function (UDF, or user-defined function, using Excel terminology) to display the values of the document properties in worksheet cells. (Please note that this function, DOCPROP, was written specially for this app. It’s not part of the standard spreadsheet control.)

    New Spreadsheet Functions (WinForms, WPF, Spreadsheet Document Server)

    As with every release, we add to the list of supported spreadsheet functions. This time we’ve added several to help with statistical analysis, especially trend analysis. With these new functions (LINEST, LOGEST, TREND, GROWTH, and FORECAST), we can perform a linear or exponential trend analysis:

    WinForms/WPF Spreadsheet: Exponential Trend Analysis

    We’ve also added the following functions (please see the Excel documentation for descriptions and usage details for now):

    • Text: BAHTTEXT

    Support for Complex Ranges (WinForms / WPF / Spreadsheet Document Server)

    With v14.2, the spreadsheet API includes support for disjoint ranges; no longer do you have to just work with a continuous range of cells. This enhancement allows operating with collections of ranges, comprising several discontinuous or even intersecting ranges. The Range.Union method creates a complex range which can be used in the same manner as an ordinary range.

  • WinForms Data Grid: breaking change with Conditional Formatting (v14.2)

    A week or so ago, Don published a blog post about our new Microsoft Excel-inspired conditional formatting feature for the WinForms data grid, XtraGrid, that’s coming in v14.2. (Again, the release is only a few weeks away, the beta is out if you are an active DXperience or Universal customer, get it now and try it out, etc.)

    It turns out that there is a subtle breaking change with this new feature. However, it’s very easily worked around.

    First, a bit of history. With v14.1 or earlier, we had what we called “Format Style Conditions”, a feature that allows you to apply different formats to the data in your grid according to some pre-defined criteria. We did not provide any ability for run-time customization, you got what you programmed. Fast-forward to now and for v14.2 we’ve ported some work we’d been doing on the WPF Grid to the WinForms Grid. For this release we have improved the speed of the condition-matching code and also have provided full run-time customization for end-users. Crucially we have also provided the capability to convert the older conditional formatting rules to the new style. Read on…

    For v14.2, although the old conditional formatting will continue to work, there will no longer be any design time support for it. If you want to add new format rules, or modify anything via the designers, the rules you already have must be converted to the new Excel-inspired conditional formatting rules. This is what you will see when you first open the Style Format Rules designer in v14.2 on an existing control that already has some formatting rules applied:

    WinForms data grid: Converting Format Rules to v14.2

    Where are my rules?, I can hear you say, possibly with some other choice words. They’re still there: all you have to do is convert them. Press Convert and your old rules will be restructured to the new v14.2 Excel-inspired conditional formatting rules. After that, have at it: you will be able to add/modify whatever you want. No data was lost in the conversion.

    As always with this kind of change, please don’t hesitate to contact our support team should you encounter any issues. They will be only too glad to help.

  • WinForms and WPF Spreadsheet: Grouping and AutoFilter (Coming soon in v14.2)

    The premier spreadsheet control for Windows developers is getting a couple of much-requested features for v14.2: data grouping, and filtering of data using the AutoFilter feature. Let’s see what these involve.

    Data Grouping

    One of the biggest new features of our WinForms, WPF, and ASP.NET datagrids in v14.2 is the ability to export data from the grid to an XLS/XLSX file and maintain the grouping and sorting currently configured in the grid. The requirement is to allow end-users to group, sort, filter data within the grid, export the result to an XLSX file, and then open up that file in Excel to continue analyzing that data. All grouping, sort orders and filtering options transfer to the XLSX file and the user is given a similar look to the data within Excel. See here for details on this new functionality.

    Well, anything Excel can do our spreadsheet controls should be able to do too, and with v14.2 we’ve added data grouping to the control.

    You can group data by using the corresponding commands of the Outline group on the Data tab on the corresponding ribbon.

    WinForms & WPF Spreadsheet: Outline Group on the Data tab

    There are several options here:

    • The Group command allows the user to group related rows or columns manually.
    • The Auto Outline command creates an automatic outline, based on the subtotal and summary formulas contained in the user’s document.
    • The Ungroup/Clear Outline command, unsurprisingly, ungroups previously created groups.
    • The Subtotal command automatically calculates subtotals for the related rows and displays summaries above or below the detail rows.

    For the latter command, a dialog is displayed allowing the user to configure the subtotals and options needed:

    WinForms & WPF Spreadsheet: Subtotal Dialog

    Once the user has organized their data into groups, they can collapse a group and temporarily hide rows or columns to show only the significant data, or expand it again to reveal the hidden data. To collapse or expand the group, the user clicks the corresponding minus or plus icon:

    WinForms & WPF Spreadsheet: Expanding a group

    The spreadsheet control goes even further: it publishes a new function, SUBTOTAL(), to give your users even more control over their summary data. The first argument defines the function code that specifies the function to be used in calculating subtotals (SUM, COUNT, AVERAGE, etc.) and whether the hidden values in collapsed groups should be taken into account during calculations. This is the direct equivalent of the Excel SUBTOTAL function.

    WinForms & WPF Spreadsheet: Subtotal Function

    (Here, for example, the function code 9 corresponds to SUM.)

    Of course, all these features are also available via the spreadsheet control API. You can group data programmatically by using the Group() and AutoOutline() methods for the specified rows, columns, or the entire document. To automatically create subtotals for the range, you use the Worksheet.Subtotal() or RangeExtention.Subtotal() methods.

    Data Filtering

    With v14.2, we have added a new powerful filtering feature to the WinForms and WPF spreadsheet controls. Using the AutoFilter functionality, your users can analyze large amounts of data by displaying only those rows that meet some filtering criteria. Applying such a filter is quite simple: the user just needs to select the required data and then click the Filter button in the Sort & Filter ribbon group.

    WinForms and WPF spreadsheet: the Filter Button

    Once filtering is activated, a down-arrow icon appears on the right side of each column header. The user clicks this icon for each required column to select the filter type they wish to use: Text Filters, Number Filters, or Filter by Values. The user can use the built-in comparison operators, or specify their own custom criteria in the Custom AutoFilter dialog box.

    WinForms and WPF Spreadsheet: AutoFilter

    If needed, the user can sort the filtered data in ascending or descending order.

    WinForms and WPF Spreadsheet: Sorting Data


    With v14.2 we are enhancing the WinForms and WPF spreadsheet controls to include even more data analysis features: sorting, grouping and filtering. We hope you and your users will delight in these new features. Please let me know below what you think of them.

1 2 3 4 5
7 8 9 10

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners