Quantcast
Channel: Developer Express Inc.
Viewing all 2399 articles
Browse latest View live

WinForms - Tips & Tricks (November and December 2019)

$
0
0

This blog post is a collection of the most interesting customer questions we received in the last two months of 2019. Hope you find some of them useful.

Azure Servers

With an ever-growing interest in cloud technologies, we’ve written a few articles that help explain how to use Azure data with DevExpress controls.

MVVM Framework

Over the course of past few months, WinForms MVVM related questions have skyrocketed (the highest since our original release in 2015). Here is a list of the most interesting MVVM Framework related questions we answered last year.

Controls and Components

Others


DevExtreme - React Grid - UI & API Enhancements (v19.2)

$
0
0

As you may already know, our most recent update includes column sizing support for the React Grid and scrolling enhancements for our Virtual Table plugin.

Column Sizing

You can now specify column widths using the following CSS units: auto, px, %, em, rem, vw, vh, vmin, vmax. Here is the documentation for the width property. The TableColumnResizing plugin also supports these units, and users can resize columns with CSS widths at runtime (if resizing is enabled).

You can change the mode used for column resizing by setting resizingMode on TableColumnResizing. The default is widget mode, where columns can be resized without limits and the overall layout is contained by the grid widget. In nextColumn mode, a change to the width of one column also influences the column to the right. Please see this page for demos which illustrate the two modes.

Resizing Mode nextColumn

Note that you can only use px to specify column widths for the Virtual Table. Due to the way the grid is rendered for the Virtual Table, we can’t calculate the widths of columns for relative CSS units like em, %, auto and others.

Virtual Table Enhancements

The Virtual Table now supports banded columns using the TableBandHeader plugin. This guide page demonstrates the setup require for banded columns.

Scroll-To-Row

We added an API that enables you to scroll the Virtual Table to a specific row. It is necessary to use a React Ref to call the scrollToRow function. Here’s a code sample:

const MyComponent = () => {
  const virtualTableRef = React.useRef();

  // This function can be called from an event handler.
  const scrollToRow = rowId => {
    virtualTableRef.current.scrollToRow(rowId);
  };

  return (
    <Grid rows={rows} columns={columns} getRowId={getRowId}>
      <VirtualTable ref={virtualTableRef} />
    </Grid>
  );
};

In addition to specific row IDs, you can pass the static values VirtualTable.TOP_POSITION and VirtualTable.BOTTOM_POSITION to scrollToRow.

Click this link for a demo that scrolls to newly inserted rows after a Save operation.

Scroll To Row

Note that you can’t use scrollToRow with row ID values at this time if you implement lazy loading with VirtualTableState. We will add this functionality in the future.

Top Row Tracking

We implemented the event onTopRowChange for the Virtual Table. You can use it to track the ID of the top row currently visible in the table.

<Grid rows={rows} columns={columns} getRowId={getRowId}>
  <VirtualTable onTopRowChange={ ... } />
</Grid>

Your Feedback Counts

Please let us know your thoughts about the new features. Follow this link to our GitHub repository, where you can take part in discussions or submit issues.

Blazor Components - Localization, Asynchronous data operations, and more (v19.2.0)

$
0
0

This post describes the enhancements we’ve made to the DevExpress UI for Blazor in our v19.2.0 release cycle:

.NET Core 3.1.1 Support

Version 19.2 supports the recent .NET Core 3.1.1 update that contains security and reliability fixes.

Localization

You can now localize our Blazor UI components. Localization is available for both server and client side Blazor hosting models.

For server-side Blazor projects, you can use the Satellite Resource Assemblies of the .NET Framework. We include NuGet packages with predefined satellite assemblies for German, Japanese, Russian and Spanish locales. At present, no official or recommended guidelines exist for client-side Blazor. Lacking official guidance, we opted to implement the IDxLocalizationService interface for client-side Blazor apps.

DevExpress Blazor Localization

For other cultures, you can use our online Localization Service to generate custom resource files as needed. Please make sure all translations meet with your approval before including them into your software project.

Please take a look at this online example to learn more about our implementation.

Data Grid Enhancements

Asynchronous Data-Aware Operations

v19.2 includes a new asynchronous data-aware API for our Blazor Data Grid.

The new API allows you to execute database operations and await completion without blocking app code execution. This allows you to deliver more responsive solutions - even when connected to remote databases over slow networks.

Use the new DataAsync property to data bind asynchronously. This property supports IEnumerable<T> or IQueryable<T> data source types.

<DxDataGrid DataAsync="@ForecastService.GetForecastAsync">
    ...
</DxDataGrid>

We also introduced the following asynchronous events:

Online demo: Data Grid - Asynchronous Data-Aware Operations

Binding to Custom Data Source

With this release, you can bind our Blazor Data Grid to a custom data source. Assign the data source type to the Data Grid's T parameter and use the CustomData property to implement data loading logic. The CustomData delegate accepts a DataSourceLoadOptionsBase object as a parameter. It specifies various data loading options (such as sort and group information).

Two new extension methods for the DataSourceLoadOptionsBase class (ConvertToGetRequestUri and ConvertToHttpContent) have been added to help you generate proper requests for Web API services.

The following example demonstrates how to bind our Blazor Data Grid to a Web API service:

<DxDataGrid T="@WebApiOrder" CustomData="@LoadCustomData">
    ...
</DxDataGrid>
@code {
    [Inject] protected HttpClient Client { get; set; }

    public class WebApiOrder
    {
        public string CustomerID { get; set; }
        public DateTime OrderDate { get; set; }
        public decimal Freight { get; set; }
        public string ShipCountry { get; set; }
    }

    protected async Task<LoadResult> LoadCustomData(DataSourceLoadOptionsBase options, CancellationToken cancellationToken) {
        using var response = await Client.GetAsync(options.ConvertToGetRequestUri

            ("https://js.devexpress.com/Demos/NetCore/api/DataGridWebApi/Orders"), cancellationToken);
        response.EnsureSuccessStatusCode();
        using var responseStream = await response.Content.ReadAsStreamAsync();
        return await JsonSerializer.DeserializeAsync<LoadResult>(responseStream, cancellationToken: cancellationToken);
    }
}

Online demo: Data Grid - Custom Data Source

CheckBox Column

Our Blazor Data Grid includes a new CheckBox column with extended state support: checked, unchecked, and indeterminate.

DevExpress Blazor Data Grid - CheckBox Column

Use the Field property to bind the column to data:

<DxDataGridCheckBoxColumn Field="@nameof(Order.IsShipped)" />

You can bind the checkbox column to standard types. To bind the column to a custom type , set its ValueChecked, ValueUnchecked, and ValueIndeterminate properties:

<DxDataGridCheckBoxColumn Field="@nameof(Order.OrderStatus)
    ValueChecked="@OrderStatus.Delivered"
    ValueUnchecked="@OrderStatus.Processing"
    ValueIndeterminate="@OrderStatus.InTransit"
    Caption="Order Status" />

To help you filter CheckBox column data, our Blazor Data Gird creates a ComboBox editor in the filter row. Use the FilterTextChecked, FilterTextUnchecked, and FilterTextIndeterminate properties to assign custom text to the editor's dropdown items:

<DxDataGridCheckBoxColumn Field="@nameof(Order.OrderStatus)"
    FilterTextChecked="Delivered"
    FilterTextUnchecked="Processing"
    FilterTextIndeterminate="In transit"/>

DevExpress Blazor Data Grid - CheckBox Column Filter

In Switch mode, the checkbox column displays toggles instead of checkboxes. To enable Switch mode, set the CheckType property to Switch.

Scheduler

Operation events for appointments

v19.2 ships with new events for our Blazor Scheduler control. These events allow you to manage changes to individual appointments:

Handle these events to modify (or discard) Drag & Drop, Data Editing, Delete, and other appointment operations before data is saved to storage.

Online example - How to implement CRUD operations with the Web API Service

Editors - Null Text

NullText is a helpful feature which displays placeholder text in our ComboBox when empty.

We've added the NullText property to the following editors:

<DxTextBox NullText="Type text..."></DxTextBox>

Breaking Changes - RCL Support

In December, Microsoft introduced the Razor Class Library (RCL):

Razor views, pages, controllers, page models, Razor components, View components, and data models can be built into a Razor class library (RCL). The RCL can be packaged and reused. Applications can include the RCL and override the views and pages it contains. When a view, partial view, or Razor Page is found in both the web app and the RCL, the Razor markup (.cshtml file) in the web app takes precedence. -Rick Anderson

We’ve migrated our components to support RCL and to give you a native approach for sharing resources. As such, v19.2 components now require .NET Core 3.1. The RCL also uses the Blazor native location for resources (particularly, for the dx-blazor.css file).

See the full list of breaking changes for version 19.2.

ASP.NET WebForms and MVC - Tips & Tricks (December 2019)

$
0
0

We’vecompiled a shortlistofinterestingsupporttickets/articlesinthismonth’sTips& Tricksblogpost. 

Ifyouhave a supportticketyou'dliketosharewiththe ASP.NET developercommunity, feelfreetopost a linkinthecommentsectionbelow. 

 

Knowledge Base Articles

BelowaretwoarticlesthatdescribethemostimportantaspectsofdocumentmanagementinourRichEditandSpreadsheetcontrols:

RichEdit - General information about document management (T822829) 

YoumayalsofindthefollowingarticlehelpfulwherewedescribedcommonaspectswhichmayleadtoYoursessionhasexpirederrormessageandthewaystoresolveit:

RichEdit/Spreadsheet - Why the "Your session has expired" error might occur (T802885)

Interesting Support Tickets

Common (ASP.NET MVC and Web Forms)

Data Annotation Attributes

SeeourupdatedData Annotation Attributesarticlerelatedtousingdataattributesinour MVC Extensions. 

Grid View

Weupdatedthefollowingtopicswithcorrespondingexamplesofusing a corresponding API (clientandserver) indifferentscenarioswhileadding, updatinganddeletingrowsinGridView: 

Spreadsheet

Also, we described in details a common approach to useSpreadsheet Document APItoperformrequiredmodificationswithSpreadsheet Control’s document in code: 

 

 

CodeRush – Organize Members

$
0
0

In earlier releases this year, we’ve seen enhancements to CodeRush’s Organize Members functionality. In this blog post, we’ll talk about some of these new features in greater detail.

Rule Priority

This release adds a new Rule Priority option to Organize Members. To show how this is useful, first let's take a look at the earlier CodeRush functionality without this feature.

Before introducing rule priority, Organize Members used the following approach to split type members based on the members kind and visibility:

  • Get the type members list
  • Evaluate members based on the rules you have set, sequentially

Each rule may match zero or more members from the list. And once a type member is matched by a rule, it's "captured" for the purposes of organization, and it cannot be matched by any other rule.

This approach, while useful, may lead to undesired results in some edge cases. For example, consider the following code:


using NUnit.Framework;

namespace NunitTestProject {
  public class Calculation {

    public int Sum(int a, int b) {
      return a + b;
    }

    [Test]
    public void Sum10Plus15() {
       Assert.AreEqual(10 + 15, Sum(10, 15));
    }

    [Test]
    public void Sum10Plus5() {
      Assert.AreEqual(10 + 5, Sum(10, 5));
    }
  }
}

Suppose you want to wrap all the tests marked with the [Test]attribute into a single region and place those tests at the end of the file.

To solve this task you might try the following:

  1. Create a new “Test methods” rule and put it inside a region:

    CreateTestMethodRule

  2. Run Organize Members on the sample code above.

If you try it, you would likely find the original file unchanged.

Why?

The problem is the “Public methodsrule (up two from our new Region Test methods rule) has already matched all public methods (captured them) before the “Test methods” rule even got a chance to find and organize those public test methods.

In previous versions of CodeRush, to fix this issue, you had one of two workarounds:

  1. Organize Test methods so they appear earlier in the file (before public methods). This is not a great solution if you really want your test methods at the end of the file.
  2. Modify the earlier “Public methods” rule to ignore any methods with the [Test] attribute.

Yeah, we know. It’s more work than it should be. This is CodeRush after all - things should be easy.

Fortunately, in the 19.2.5 release we added a “Rule Priority” option that tells Organize Members when to look for elements that satisfy each rule. You can set this option to High, Normal or Low.

SetRulePriorityToHigh

The new Organize Members now runs rules in three passes. Rules having a high rule priority will be run first, followed by medium-priority rules, and ending with low priority rules.

This allows Organize Members to find our test methods (and group them together) before looking for public methods.

Note that “Rule priority” only impacts the order in which the rule is checked and has zero impact on member order, which is still determined by the order in which the rules appear in the list.

So now to organize our code, we simply set the “Region Test methods” Rule priority to High and run Organize Members.

OrganizeMembersNowWorks 

Grouping Interface Implementors

Some developers like to group interface implementations separately from other members, other developers might want to only group explicitly implemented interface members. This can improve code readability, since all the related members are together. In the 19.2.5 release, we have added interface grouping to Organize Members.

Explicit Interface Implementations

We have added the Explicit interface implementations rule to the Default rule set. This rule allows Organize Members to collect all explicit interface implementations and group them by the interface name.

This new rule uses the new Rule priority option (set to High) and groups members by the Is Explicit Interface Implementor criteria.

Let’s look at the new default rule on the following code:

namespace Project {
    interface IDimensions {
        float GetLength();
        float GetWidth();
    }
    public class Box : IDimensions {
        float lengthInches, widthInches;
        Box(float length, float width) {
            lengthInches = length;
            widthInches = width;
        }
        float IDimensions.GetLength() { return lengthInches; }
        float GetLength() { return lengthInches; }
        float IDimensions.GetWidth() { return widthInches; }
        float GetWidth() { return widthInches; }
    }
}

Explicit and Implicit Interface Implementations

In some cases, you might want to group and sort all interface implementations by the interface name. This is easy enough on the Organize Members options page.

InterfaceImplementations

Just set the rule must priority to high with a grouping criteria of Is Interface Implementor, sorting these members by InterfaceName.

As an example, consider the following code:

using System;

namespace Project {
  public interface IFirst {
    void FirstMethod();
    event EventHandler FirstEvent;
    object this[string index] { get; }
  }

  public interface ISecond {
    void SecondMethod();
    event EventHandler SecondEvent;
    object this[int index] { get; }
  }

  public class Class1 : IFirst, ISecond {
    object ISecond.this[int index] => throw new NotImplementedException();
    public object this[string index] => throw new NotImplementedException();
    public event EventHandler FirstEvent;
    event EventHandler ISecond.SecondEvent {
      add {
        throw new NotImplementedException();
      }
      remove {
        throw new NotImplementedException();
      }
    }

    void ISecond.SecondMethod() {
      throw new NotImplementedException();
    }

    public void FirstMethod() {
      throw new NotImplementedException();
    }

    public void MyMethod() {
      var s = new { num = 10 };
      var newType = new NewType();
    }
  }
}


With the example interface implementor-grouping rule above, Organize Members would look like this:

OrganizeMembersInterfacImplementors


Grouping Event Handlers

We have also added the ability to group event handlers. Just create a simple event handlers rule and place this rule in the desired location in the rule list, like this:

organize events rule

For example in this code:

using System;
using System.Drawing;
using System.Windows.Forms;

namespace WindowsFormsApp4
{
  public partial class Form1 : Form {
    public Form1() {
      InitializeComponent();
      Button button = CreateButton();
      this.Controls.Add(button);
    }

    private Button CreateButton() {
      var myButton = new Button();
      myButton.Text = "Click me!";
      myButton.Click += myButton_Click;
      myButton.MouseEnter += MyButton_MouseEnter;
      myButton.MouseLeave += MyButton_MouseLeave;

      return myButton;
    }

    private void myButton_Click(object sender, EventArgs e) {
      MessageBox.Show("Button clicked!");
    }

    private void MyButton_MouseEnter(object sender, EventArgs e) {
      var myButton = sender as Button;
      myButton.ForeColor = Color.Red;
    }

    private void MyButton_MouseLeave(object sender, EventArgs e) {
      var myButton = sender as Button;
      myButton.ForeColor = Color.Yellow;
    }
  }
}

Organize Members (with the event handler rule shown earlier) would group all the class’s event handlers like this:

GroupEvents

Dynamic Regions Creation

CodeRush can wrap all members matching a rule into a region if it knows the region name (for example, “public methods”). But what if you need a region name that’s based on the code you’re organizing? CodeRush now makes it easy to wrap all matching elements in a dynamically-generated region with new sorting/organizational options.

For example, if you sort by an implemented interface name, you can wrap distinct groups (e.g., each group of members that implement a single interface) into a separate region.

If you sort by kind, you can wrap distinct groups in regions based on member type (e.g., fields, properties, methods, etc.).

You can also use built-in variables to specify the region name. These variables get their values from your code.

OrganizeByInterface

For example, let’s apply the “Interface implementations” rule, shown in the screenshot above, to the following code:

using System.Drawing;

namespace ConsoleApp {

  interface IDimensions {
    float GetLength();
    float GetWidth();
  }

  interface IColor {
    Color GetBackgroundColor();
    Color GetForegroundColor();
  }

  public class Box : IDimensions, IColor {
    Color boxColor;
    float lengthInches;
    float widthInches;

    Box(float length, float width, Color color) {
      lengthInches = length;
      widthInches = width;
      boxColor = color;
    }

    float GetLength() {
      return lengthInches;
    }
float IDimensions.GetLength() { return lengthInches; }
float GetWidth() { return widthInches; } float IDimensions.GetWidth() { return widthInches; } public Color GetForegroundColor() { return boxColor; }
public Color GetBackgroundColor() { return boxColor; } } }

The result will look something like this:

DynamicRegionGeneration


Conclusion

We hope these features will help you more quickly and easily organize your code and produce code that is easier to read and maintain.

As always, we welcome your feedback. If you have specific questions or need assistance with CodeRush, feel free to let us know in the comments below or contact us through our Support Center (support@devexpress.com).

Reporting - Tips & Tricks (November and December 2019)

$
0
0

In this tips & tricks post, we’ll discuss a couple of recent enhancements and share links to a few interesting technical support tickets. We hope the information in this post will be of value to those of you using DevExpress Reports. Should you have any suggestions for future tips & tricks post, please leave a comment below.

Our Most Recent Enhancements

The following is a list of our most recent enhancements. If you'd like more information about the features/capabilities listed below, please submit a comment or post a support ticket via the DevExpress Support Center.

Date Range Parameter Editor

As you probably know, we introduced Date Range Parameter support in our last release cycle. If you’ve yet to use this feature, please take a moment to review its capabilities and share your thoughts with us. We’d love to know what you think of our Mobile Mode implementation (Web Document Viewer).

Mobile Viewer - Date Range Parameter

Web Report Designer - Chart Cleaner Appearance

Our updated Web Report Designer (v19.2.5) uses SVG rendering to display charts. As you can see from the image below, rendering is now “cleaner.”

Web Report Designer - Chart Preview

Report Designer - Easier Navigation

Have you ever wanted to customize a particular control, but were unable to do so because of report layout size and complexity? If so, you’ll be happy to know that our report desktop designer in v19.2.6 ships with a new “Navigate To Control” option – making navigation to a target component extremely easy (scrolling / expansion will be performed automatically).

Report Designer - Navigate To Control

Report Designer - Easier Alignment

Creating a perfect Excel file requires one to invest time in control alignment. We’ve already detailed some of the issues you may encounter in the following blog post: Troubleshooting Excel and CSV Export. With our next minor update (v19.2.6), you will be able to convert standalone report labels into a table (making alignment much easier).

End-User Report Designer - Convert Labels To Table

Report Designer - Expand / Collapse All Bands

Here's yet another enhancement to our desktop End-User Report Designer components (v19.2.6). You can now quickly expand and collapse all report bands via ribbon commands:

End-User Report Designer - Expand and Collapse all Bands

Document Management in Report & Dashboard Server

The Report & Dashboard Server comes with the Documents Categories view in the most recent update (v19.2.5). This view provides the option of grouping documents and processing them in a batch:

Report & Dashboard Server - Document Categories View

Interesting Technical Support Tickets

Reporting - Moving from XRPivotGrid to XRCrossTab

Reporting – Multiple Platforms (WinForms, WPF, ASP.NET, .NET Core)

WinForms Reporting

WPF Reporting

Web Reporting

Report & Dashboard Server

Documentation Updates

New Topics

Updated Topics

Various End-User Documentation Updates

As you may know, we include end-user documentation for our Report Designer and Document Viewer controls. You can access this documentation on GitHub.


As always, we welcome your comments and feedback. If you’ve come across a useful Support Center ticket, feel free to share it with the DevExpress developer community here.

DevExtreme - Asynchronous Validation (v19.2)

$
0
0

You can now use an async validation rule to execute field validation logic on a server. Implement the function validationCallback to return a Promise (or the jQuery equivalent).

Asynchronous Validation

Here is an example:

$('#textBox').dxTextBox({ ... })
  .dxValidator({
    validationRules: [{
      type: 'async',
      message: 'Invalid value',
      validationCallback: ({value}) =>
        new Promise((resolve, reject) => {
          fetch('https://mydomain.com/validationService', {
            method: 'POST',
            body: JSON.stringify({ data: value })
          })
          .then(res => {
            if (!res.ok)
              throw new Error(`HTTP error: ${res.status} ${res.statusText}`);
            // Assuming the server returns JSON
            return res.json();
          })
          .then(serverResult => {
            // Server decided whether data is valid
            if (serverResult.dataIsValid)
              resolve();
            else
              reject(serverResult.errorMessage);
          })
          .catch(error => {
            // There's been a technical error.
            console.error('Server-side validation error', error);

            // Decide what to tell the user.
            reject('Cannot contact validation server');
          });
        });
    }
  }]
});

As you can see, validation succeeds if the Promise is resolved and fails if the Promise is rejected. However, there’s one more option. You can resolve the Promise with an object like this:

{
  isValid: false,
  message: 'Invalid value'
}

We support this scenario to allow you to return a server result directly, without any extra logic. In this case, even though the Promise is resolved, validation succeeds or fails depending on the isValid property and the optional message is shown to the user on failure. To illustrate this use case, here’s the shortest possible example:

validationCallback(params) {
  return $.getJSON('https://mydomain.com/validationService',
    { data: params.value });
}

Note that without any processing, you may end up displaying technical errors to the end user as validation messages. We recommend more detailed algorithms which consider the edge cases, as shown in the first sample.

To keep validation efficient, any synchronous rules are always evaluated first, and asynchronous rules are only evaluated if all synchronous rules pass. Once asynchronous validation begins, all such rules are checked in parallel.

ASP.NET Core and ASP.NET MVC

We added support for the ASP.NET [Remote] attribute to enable asynchronous validation on ASP.NET Core and ASP.NET MVC. You can apply this attribute to properties of your model, passing the names of a controller and a method to be called for validation:

[Remote("CheckEmailAddress", "Validation")]
public string Email { get; set; }

The attribute automatically generates client-side code for an ‘async’ validation rule, calling back to the controller running on the server. The controller method should check validity:

[HttpPost]
public IActionResult CheckEmailAddress(string email) {
  if (!_userRepository.VerifyEmail(email)) {
    return Json($"Email {email} is already registered.");
  }

  return Json(true);
}

This code uses return values as defined in Microsoft documentation for the .NET Core Remote attribute.

Alternatively you can return validity information in the JSON format described above, inluding the isValid and message fields. This allows you to create validation services in .NET Core which are compatible with clients written for other supported DevExtreme platforms.

Explicit Validation

If you call validate() on a Validator or a ValidationGroup and there are asynchronous rules to be checked, you need to use the Promise interface provided by the property ValidationResult.complete to handle the results.

const result = validator.validate(); // OR validationGroup.validate();

result.complete.then(res => {
  // res.status is 'valid' if all rules passed
  // res.status is 'invalid' if any rules failed
  if (res.status === 'invalid') {
    // res.brokenRules contains an array of rules
    // that failed validation
  }
});

Limitations

At this time, asynchronous rules are not supported by the Data Grid and Tree List widgets when you use the Row, Batch or Cell editing modes. We will add this functionality in a future update.

Demo and Documentation

Here is the documentation for the ‘async’ rule..

The Validation Overview Demo includes samples of the ‘async’ rule for all supported platforms.

DevExtreme - React Grid - Inline Cell Editing (v19.2)

$
0
0

With our most recent release, the DevExpress React Grid allows you to edit data inline, without initiating row edits explicitly.

To enable this functionality, we created the new plugin TableInlineCellEditing. You combine TableInlineCellEditing with EditingState to incorporate the new functionality in your web app.

<Grid rows={rows} columns={columns} getRowId={getRowId}>
  <EditingState onCommitChanges={...} />
  <Table />
  <TableInlineCellEditing
    startEditAction="doubleClick"
    selectTextOnEditStart={true} />
</Grid>

Set the property startEditAction to either click (the default) or doubleClick to define how a user can activate editing for a cell. You can also set selectTextOnEditStart if you want cell text to be selected when editing begins.

Inline Editing

Changes are saved when an editable cell loses focus, or when the user presses the Enter key. The Esc key cancels changes.

Note that cell navigation with Tab and Shift-Tab is not implemented as a standard feature yet. However, the Inline Cell Editing Demo shows how this functionality can be added.

Let Us Know What You Think

Please let us know your thoughts about this new feature. You can leave comments below or submit issues to our GitHub repository.


WPF - Tips & Tricks (January 2020)

$
0
0

We’ve compiled a series of interesting support tickets related to our WPF product line. Should you have any questions or issues related to any of these tickets, feel free to submit a comment within Support Center. If you’d like to share a support ticket with members of the DevExpress WPF community, post a link in the comment section below.

WPF Data Grid

WPF Editors

WPF Bars

WPF Docking

WPF Scheduler

Other Controls

eXpress Persistent Objects - 2020 Roadmap

$
0
0

To help us deliver the best possible features for the eXpress Persistent Objects (XPO) ORM library in 2020, please take a moment to review the list below and share your opinions with us.

Housekeeping & .NET Core

There are a number of housekeeping tasks that need to be completed during each release cycle. The following list summarizes our plans for 2020. 

SQL Server "Always Encrypted"

We hope to refactor our core to introduce typed query parameters (for instance, null parameters with type information or additional information such as ping). This will help us support Always Encrypted - a very important feature for enterprise customers. Batch updates and operations on slow connections will also benefit from this refactoring. Expect a Beta in v20.1 and a final release in v20.2. 

Database Schema Migrations

We want a simpler process to incrementally update database schema and preserve existing data after changes are made to XPO’s data model (AS4684). At present, we handle initial database creation and schema tuning along with basic data model changes only (create tables and columns for new classes and properties). For more complex sync tasks, developers need to create database scripts or specialized helper methods. For instance, XAF's ModuleUpdater ships with the DropColumn, RenameTable, DropConstraint and other APIs for Microsoft SQL Server for this purpose. Our goal is to make this process better than that found in EF Core Migrations. Expect a Beta in v20.1 and a final release in v20.2

Your Opinion Counts

As always, we look forward to your comments and questions. Please share your thoughts below or email xpoteam@devexpress.com. 

The information contained within this blog post details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely on or use this information to help make a purchase decision about Developer Express Inc products.

DevExpress Dashboard – 2020 Roadmap

$
0
0

We received great feedback on our proposed 2020 DevExpress Dashboard Roadmap. Thanks to everyone who engaged us late last year. Based on your feedback and our long-term product development goals, we've finalized our 2020 Roadmap with a focus on important usage scenarios outlined below.

Features Planned for v20.1

Parallel Periods

DevExpress Dashboard Parallel Periods

Parallel periods are an important data analysis tool. Though we allow you to address simple usage scenarios in this regard, complex scenarios are not currently supported (when comparing the same data against different date periods). We will address these complex usage scenarios in our v20.1 release.

Tab Item Performance Enhancements

We will allow you to restrict dashboard item loading to active tabs only. This feature will help improve overall performance when using multiple Dashboard Tabs (with Dashboard Items that require extended data processing).

API to Extend a Dashboard's Lifecycle

We will introduce an easy and straightforward API to extend the Dashboard's design lifecycle. Our objectives will be as follows:

  • Allow you to easily add a UI for your properties within Dashboard Designers. You will have access to a new set of APIs to extend the WinForms Dashboard Designer Ribbon Menu, and the Web Dashboard Options Panel.
  • Allow you to add customer-related properties (aka user data) to Dashboard, Dashboard Items, and Dashboard Item Elements (Grid Columns, Chart Series, Cards, Gauges etc.)

We will store your custom data within the model and automatically manage serialization/deserialization as needed.

In the following examples, we show how to add a scale break to the Chart item:

Web Dashboard

Step 1: Add Metadata for the custom properties.

import { registerCustomPropertiesMeta } 
	from "../../sources/model/custom-properties/custom-properties-metadata";

registerCustomPropertiesMeta({
    ownerType: ChartItem,
    propertyName: "scaleBreaks",
    defaultValue: false,
    valueType: 'boolean',
});
Step 2: Update the event handlers to use the Metadata.
onItemWidgetCreatedUpdated(args: ItemWidgetEventArgs) {
    var scaleBreaks = 
    		args.dashboardItem.customProperties.getValue("scaleBreaks");
    if (scaleBreaks) {
        var widget = args.getWidget();
        var valueAxisOptions = widget.option("valueAxis");
        valueAxisOptions[0].autoBreaksEnabled = true;
        widget.option("valueAxis", valueAxisOptions);
    }
}

Your users can now specify the Custom Property in the Dashboard Designer.

Web Dashboard Custom Properties S

WinForms Dashboard Designer & Viewer

var page = ribbon.GetDashboardRibbonPage(
									DashboardBarItemCategory.ChartTools,
									DashboardRibbonPage.Design);
var group = new RibbonPageGroup("Additional Properties");
page.Groups.Add(group);
var barItem = new BarCheckItem(ribbon.Manager, false);
barItem.Caption = "ScaleBreak";
barItem.ItemClick += SaveScaleBreak;
group.ItemLinks.Add(barItem);
//…
void SaveScaleBreak(object sender, ItemClickEventArgs e) {
    var breakEnabled = designer.SelectedDashboardItem.CustomProperties.GetValue<bool>("ScaleBreak");
    designer.AddToHistory(
    	new CustomPropertyHistoryItem(designer.SelectedDashboardItem, 
    		"ScaleBreak",
        	!breakEnabled.ToString(),
        	"Scale Break Changed"));
}
//…
void Designer_DashboardItemControlUpdated(object sender, DashboardItemControlEventArgs e) {
    if(e.ChartControl != null) {
        var dashboardItem = designer.Dashboard.Items[e.DashboardItemName];
        var breakEnabled = dashboardItem.CustomProperties.GetValue<bool>("ScaleBreak");
        var chartAxis = (chart.Diagram as XYDiagram).SecondaryAxesY[0];
        chartAxis.AutoScaleBreaks.Enabled = breakEnabled;
    }
}
WinForm Dashboard Designer - Custom Properties

Chart and Scatter Chart Item – Constant Lines – An Extension Module Example

We found that Constant Lines can be implemented using the aforementioned API set with extreme simplicity and elegance.

We plan to distribute an example which you will be able to download and use in your application.

Your end-users will be able to configure Constant Lines and bind to the constant value or to data bound to your Chart Item.

Year-Week Date Group interval

Some of you have asked us for this visualization option (for your DateTime scale - when grouping per Day is too narrow and grouping per Month is too wide). Though most requests related to charting, we believe this grouping option will be useful for multiple Dashboard Items.

You can implement similar functionality in the current version using double Argument grouping, but this approach has visualization and master-filtering limitations.

Text Box Item – Integrated Text-Box Editor

Text Box – Improved Web Dashboard Data Binding

Users will be able to edit a Text Box item's content within the Web Designer. We will publish a separate blog post explaining why the use of a Text Box Item can benefit your dashboards. Stay tuned!

Card Item Conditional Formatting

Card Item Conditional Formatting

We will introduce conditional formatting to our Dashboard's Card Item. With this feature, end-users will be able to create conditional formatting rules within the Designer via the same UI used by our Grid/Pivot Grid.

This feature will allow you to configure visual warnings/alerts/notifications when values fall within a specific range (and inform users if actions are required).

DevExpress Dashboard Backlog 2020

We will work on the following features/requests in our v20.2 development cycle. Unfortunately, most of these features require further research, so some may not be delivered in our v20.2 release cycle.

Chart Conditional Formatting

With conditional formatting, Dashboard Charts will be able to highlight values that correspond to specific criteria and allow you to add marks to corresponding Argument labels.

Chart Item – Trend Lines

Dashboard Chart Item - Trend Lines

We expect to use our calculation engine to generate pre-configured trend lines for a variety of analytics scenarios. Though you can use Window Calculations for this purpose, we believe our implementation (trend lines) will be more configurable and easier to use.

Web Dashboard with Framework-specific Wrappers

Web Dashboard with Framework-specific wrappers: React, Vue, Angular

Though the exact scope has yet to be defined, we hope to optimize DevExpress Dashboard so that it creates and processes events based on the web framework used.

We will consider Material Design support as a part of this task.

Improved Real-Time Dashboard Update Support

Based on significant interest in our Roadmap survey, we will explore ways to improve DevExpress Dashboard (WinForms, Web and WPF) so that it better supports real-time updates. We are considering the current enhancements:

  • Reworked and configurable loading indicators
  • An improved data update mechanism;
  • Use of data caches in the background;
  • Custom group intervals.

Pivot Grid – Filtering And Exploring Data Details

We hope to extend your data filtering options when using Pivot Grid Dashboard Items. Along with the API used to extend the Dashboard Designer, we hope to better address known usage scenarios.

JSON Data Source – Support Parameter Binding

With this feature, you will be able to bind Dashboard Parameter to JSON Data Source parameters.

Web Data Inspector – Easier Way to enable Excel Export

Many of you expressed a need to enable Excel Export within the Web Data Inspector popup. You can already incorporate this capability – please refer to the following help topic for more information: documentation.

We'll will update this help topic and improve the discoverability of this feature. We're also considering ways in which to simplify the usage of the JSZip library in an upcoming release.

WinForms State Management – Lifecycle

We hope to simplify state management for our WinForms Dashboard Viewer via a new event: OnStateChanged (this event will work much like its Web Dashboard counterpart).

Current Progress

Our Text Box Editor is ready for testing. We're going to make it available (as a preview version) in our next minor update (v19.2.6)

Other features (such as API to extend the Dashboard's lifecycle and Tab Item performance enhancements), should be ready for testing in an upcoming Early Access Preview build.

Your Feedback Matters

If you have any issues with this Roadmap or questions about implementation, feel free to submit a support ticket via the DevExpress Support Center, or post a comment below. We will be happy to follow up.

Thank you for your continued support!

The information contained within this blog post details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely on or use this information to help make a purchase decision about Developer Express Inc products.



Office File API & Office-Inspired Desktop UI Controls – 2020 Roadmap

$
0
0

Based on your votes and feedback, we’ve finalized our 2020 Office File API and Office-inspired Desktop UI Controls Roadmap. We thank you for your continued support and for sharing your needs/requirements.

Should you have any questions regarding this roadmap, feel free to comment below.

Word Processing Document API, Rich Text Editor for WinForms and WPF

We expect to add the following features/capabilities in the first major release of 2020 (v20.1):

Footnotes and Endnotes

Display, print and export footnotes and endnotes. We will include the necessary API to access footnotes and endnotes in code.

Floating Tables Support

Add floating table support to our word processing controls and File API.

Character Properties Enhancement

New character properties including spacing, horizontal scale, kerning, and position. These properties will be available in code and via the control’s UI.

Word 2013-2019 Compatibility

Improved document display and print layout (to better mirror Microsoft Word 2013-2019).

Shape API Enhancement

Enhanced API for all supported shapes.

We expect to add the following word processing related features/capabilities in the second major release of 2020 (v20.2):

  • Repeat table header on every page.
  • Allow rows to break across pages.

Spreadsheet Document API, Spreadsheet for WinForms and WPF

We expect to add the following features/capabilities in the first major release of 2020 (v20.1):

Spreadsheet 2003 XML Format Support

DevExpress Spreadsheet will allow you to import and export document that use the SpreadsheetML (Spreadsheet 2003 XML) file format.

PDF Export Enhancements

Faster PDF export with more precise layouts.

Calculation Accuracy

We will enhance our calculation engine so that number rounding replicates Microsoft Excel.

Print Layout Enhancement

Our print layout will better mimic Microsoft Excel.

We expect to add the following spreadsheet related features/capabilities in the second major release of 2020 (v20.2):

Microsoft Excel 2016 Charts

  • Waterfall;
  • Box and Whisker;
  • Histogram;
  • Sunburst;
  • Treemap.

PDF Document API

We expect to add the following PDF related features/capabilities in the first major release of 2020 (v20.1):

Multiple Document Signatures

In our second release of 2020, we will introduce the following new features to our PDF library:

  • Signature timestamps and LTV-enabled signatures
  • Validate signatures
  • Sign specific form fields
  • Resize and scale document pages (T236129)
The information contained within this blog post details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely on or use this information to help make a purchase decision about Developer Express Inc products.

DevExpress Reporting – 2020 Roadmap

$
0
0

Based on survey results and Support Center feedback, we’ve finalized our 2020 Roadmap. We want to thank you for your continued support and for your insightful comments.

If you have any issues with the roadmap or questions about implementation, feel free to email us at support@devexpress.com - we will be happy to follow up.

Important Note: In nearly every instance, we selected features that received the highest positive vote count. In some instances, total votes for features that appear on this roadmap failed to break the 50% mark. However, the listed feature won the vote by the highest percent of votes among the other options. 

Translate Report Documents to Different Languages (v20.1)

You’ll be able to localize the text displayed in report controls and specify control location and size for a chosen language. This functionality will be available for End-User Report Designer components as well.

Report Designer - Localized Report

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Performance Enhancements (v20.1 – v20.2)

By refactoring our document generation engine, we expect to improve performance in terms of both memory usage and document generation speed.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Embed PDF Documents into a Report Document (v20.1)

You’ll be able to insert a PDF file into a report.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Excel Export – Html-Inspired Content Support (v20.1)

You’ll be able to export reports that contain XRLabels (with the AllowMarkupText property enabled) to Excel and preserve the content formatting.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Excel Export – RTF Content Support (v20.1)

You’ll be able to export reports to Excel files and preserve XRRichText content.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Parameter Enhancements

Bind JsonDataSource Parameters to Report Parameters (v20.1)

You’ll be able to pass report parameter values directly to JsonDataSource.

JSON Data Source - Parameter Bindings

Platforms : WinForms | WPF | ASP.NET | MVC | Core 

Select All Multi-Value Parameter Values By Default (v20.1)

You’ll be able to pre-select all values for a multi-value lookup parameter.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Numeric Range Parameter (v20.2)

You’ll be able to create integer and float range parameters and filter a report’s data using a single editor in the parameters panel.

Numeric Range Parameter Editor

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Parameter Editor Grouping (v20.2)

You’ll be able to logically group multiple report parameters in the parameter panel. Editors that display parameter values are placed in a Group Box.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Visibility of Parameter Editors (v20.2)

You’ll be able to hide a parameter editor based on the value used for a different parameter.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

WinForms Document Viewer, Report Designer, Query Builder – Complete 4K Display Support (v20.2)

We’ll improve the appearance of report controls on HighDPI/4K displays. We also plan to offer Per Monitor Dpi Awareness Support.

Platforms : WinForms | WPF

PDF Export – Visual Signatures (v20.2)

You’ll be able to define visual signatures displayed in exported PDF files using a new report control.

PDF Export - Visual Signature

Platforms : WinForms | WPF | ASP.NET | MVC | Core

Excel Export – Memory Consumption Enhancements (v20.2)

We will overhaul our Excel Export engine so you can generate large documents while consuming less memory during the export process.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

RDLC Conversion Tool (v20.2)

Our import tool will allow you to convert your RDL / RDLC reports to DevExpress Reports.

Document Viewer – Anchoring of Report Controls (v20.2)

You’ll be able to use the XRControl.AnchorHorizontal property to anchor report controls when changing a report’s page settings (like orientation, paper kind and margins in Print Preview). The controls will be anchored to the specified side of a parent container.

Anchoring in Print Preview

Platforms : WinForms | WPF | ASP.NET | MVC | Core

New Barcode – Pharmacode Symbology (v20.2)

This feature received 27% of the vote in our survey.

Our XRBarCode report control will support the Pharmacode symbology.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

WinForms and WPF Report Designer – Script Editor Enhancements (v20.2)

We will enhance our Script Editor based on feedback we’ve received from users. For instance, we’ll introduce both auto-indent and auto complete functionality.

Platforms : WinForms | WPF

MongoDb Data Source (v20.2)

This feature received 36% of the vote in our survey.

You’ll be able to bind a report to the MongoDb database.

Platforms : WinForms | WPF | ASP.NET | MVC | Core

The information contained within this blog post details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely on or use this information to help make a purchase decision about Developer Express Inc products.

Xamarin.Forms UI Controls - Building the Logify Client App (Part 6)

$
0
0

This is the sixth blog post in the "Building the Logify Client App" series. As you may already know, this blog series details how we designed and built our new Logify mobile client (a mobile client for our automated crash reporting system) with DevExpress Xamarin.Forms UI Controls. If you have yet to review our previous posts, feel free to do so using the links below:

NOTE: Currently, DevExpress Xamarin.Forms UI controls ship as part of our Universal Subscription.

In our previous blog post, we created an intuitive exception filtering system. In this post, we’ll create our exception report screen. Exception information includes a significant amount of structured data. To implement an easy-to-read/easy-to-understand exception report screen, we chose to place each information block on a separate tab. The DevExpress Xamarin TabView is a good fit for this usage scenario.

Using Logify’s API

Our Logify mobile client obtains a full report from the Logify server via the following API:

GET https://logifyrestapiendpoint/report?apiKey=ApiKey&reportId=ReportId

Server response  JSON with a special structure:

{
  "AppName" : "Clinical Study",
  "Cards" : [
    {
      "Type" : 1,
      "Values" : [
        {
          "Header" : "Exception",
          "Stack" : [
            "Exception of type 'System.Web.HttpUnhandledException' was thrown.",
            "at System.Web.UI.Page.HandleError(Exception e)", 
            ...
          ],
          "Type" : "Exception",
          "Message" : "Exception System.Web.HttpUnhandledException"
        }
      ],
      "Title" : "Exceptions"
    },
    ...
  ]
}

TabView Implementation

As noted in previous blog posts, our Xamarin TabView control offers flexible appearance customization options. For purposes of the exception report screen, we decided to use custom templates for both items and item headers.

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition/>
  </Grid.RowDefinitions>
  <Label
    Grid.Row="0"
    Text="{Binding AppName}"/>
    <navigation:TabView
      Grid.Row="1"
      x:Name="tabControl"
      ItemsSource="{Binding Cards}"
      ItemHeaderTemplate="{StaticResource headerItemTemplate}"
      ItemTemplate="{StaticResource reportDetailTemplateSelector}"
      IsSelectedItemIndicatorVisible="False"
      HeaderPanelBackgroundColor="Transparent"
      HeaderPanelPosition="Bottom"/>
</Grid>

Our tab header item needs to look like a Xamarin.Forms IndicatorView control. To implement this appearance, we add an item header template with two icons (for selected and non-selected states). A viewmodel maintains the current state for each element in the data source.

using System.Collections.Generic;
using Logify.Mobile.Models;

namespace Logify.Mobile.ViewModels.ReportDetail {
    public abstract class ReportDetailInfoContainerBase: NotificationObject {
        public abstract CardType CardType { get; }
        public string CardHeader { get; set; }

        bool isSelected;
        public bool IsSelected {
            get => isSelected;
            set => SetProperty(ref isSelected, value);
        }
    }
}

In the following step, we will create a converter and add the converter and a data template to the resource section within the markup.

using System;
using System.Globalization;
using Xamarin.Forms;

namespace Logify.Mobile.Services.Converters {
    public class BoolToObjectConverter : IValueConverter {
        public Object FalseSource { get; set; }
        public Object TrueSource { get; set; }

        public object Convert(object value, Type targetType,
                              object parameter, CultureInfo culture) {
            if (!(value is bool)) {
                return null;
            }
            return (bool)value ? TrueSource : FalseSource;
        }

        public object ConvertBack(object value, Type targetType,
                                  object parameter, CultureInfo culture) {
            throw new NotImplementedException();
        }
    }
}
<ContentPage.Resources>
  <converters:BoolToObjectConverter
    x:Key="selectedIconConverter"
    FalseSource="Circle.svg"
    TrueSource="SelectedCircle.svg"/>

  <DataTemplate x:Key="headerItemTemplate">
    <editors:IconView
      ImageSource="{Binding IsSelected, Converter = {StaticResource selectedIconConverter}}"/>
  </DataTemplate>
  ...
</ContentPage.Resources>

We also need to implement a custom data template for each tab item. An exception report includes a few sections with different bits of information. Consequently, we need to use a few different data templates. The code below adds a template selector to the resource section.

<ContentPage.Resources>
  <converters:BoolToObjectConverter
    x:Key="selectedIconConverter"
    FalseSource="Circle.svg"
    TrueSource="SelectedCircle.svg"/>

  <DataTemplate x:Key="headerItemTemplate">
    <editors:IconView
      ImageSource="{Binding IsSelected, Converter = {StaticResource selectedIconConverter}}"/>
  </DataTemplate>

  <templates:ReportDetailTemplateSelector
    x:Key="reportDetailTemplateSelector"
    KeyValueTemplate="{StaticResource keyValueTemplate}"
    StackedTemplate="{StaticResource stackedTemplate}"
    SimpleListTemplate="{StaticResource simpleListTemplate}"
    CommentsTemplate="{StaticResource commentsTemplate}"
    TabularTemplate="{StaticResource tabularTemplate}"/>
</ContentPage.Resources>

Follow this link to view the markup of templates.

Finally, we’ll add a floating button to the page. You can check final markup here.

As you can see in the image above, we used our Xamarin TabView control to create a compact UX for the mobile client’s exception report view. We also used data templates to customize the appearance of the TabView itself. In our next post, we’ll implement a Monitored Apps view with the DevExpress Xamarin DataGrid control.

We’ll share the source code for the entire application once we complete this blog series. Until then, feel free to submit comments/questions using the comment section below.

eXpressApp Framework - 2020 Roadmap

$
0
0

Before I detail XAF’s 2020 Roadmap, my thanks to everyone who shared feedback/thoughts last year. Your contribution to XAF’s evolution is appreciated.

The following list outlines the features/capabilities we expect to introduce in the eXpressApp Framework (XAF) this year.

Blazor UI

XAF v20.1 will include a CTP version of Blazor UI with eXpress Persistent Objects (XPO) ORM classes for data access. XAFers will be able to create Blazor Server apps using the Solution Wizard.
We expect to ship the following functionality for desktop and mobile apps in CTP:
  • Navigation control with group and item hierarchy.
  • Main menu with all standard XAF command types (buttons, popups, input/search boxes, drop-down menus).
  • Grid List Editor with sorting & grouping.
  • Detail form layout with group and tab controls.
  • Property Editors for all data types (no advanced editors for criteria, RTF, etc.).
  • Simple Forms Authentication with a login and password, role-based authorization and basic user/role management with access rights created in code (no specialized permission editors in the UI).
  • Data input validation with RuleRequiredField, RuleCriteria, RuleRange and other popular rules.
  • Multiple UI themes (including a compact one) and a runtime theme chooser (similar to the 'gear' in the top-right corner of https://demos.devexpress.com/blazor/).
We expect to officially ship XAF’s Blazor Server UI in our v20.2 release cycle. It should include online documentation and the following capabilities/functionality:
  • XAF modules: Conditional Appearance and Reports.
  • EF Core and non-persistent POCO proxies for data access (see below).
  • UI customization, custom control integration and advanced CRUD usage scenarios. 
  • Extended end-user customization options (such as grid column filters, add/remove columns, data export, inline edit). 

We postponed decisions related to Blazor WebAssembly support until it is officially marked as final (LTS) by Microsoft (likely in .NET 5 or later). We will continue to update XAF’s online Blazor demo with new features as they become available.

WinForms UI

  • We hope support the following asynchronous operations out-of-the-box in the WinForms UI based on IObjectSpaceAsync introduced in v19.2: open List or Detail View, save View changes, save audit data (v20.1). If you are missing important use-case scenarios, please specify them in comments below.
  • We want to enable enhanced WinForms Filter and Expression editors in the Model Editor and within built-in List and Property Editors (v20.1).
  • We want to rewrite our Tree List Editors module and support inplace data editing, better filtering options and more features (S30514S30735 S38121) based on user feedback (v20.2).

ASP.NET WebForms UI

Our primary focus will be on XAF’s new Web & Mobile UI for Blazor. This notwithstanding, we will do our best to address the needs of existing ASP.NET WebForms UI users.

Housekeeping & Core

  • We want to remove Visual Studio dependencies from the design-time Model Editor to increase stability and performance. We like the WPF designer that runs as a separate process and draws itself inside the Visual Studio frame. This will also help us support the Model Editor in .NET Core 3+ and .NET Standard 2+ projects (v20.1).
  • We will also incorporate a number of usability enhancements to the Model Editor based on user feedback - please let us know if you have any issues with this editor (v20.1).
  • We will monitor Microsoft updates with regard to the component designer in .NET Core 3+ and see if we can support our Application, Module, Controller and Action Designers. We will also support the SDK-style project format for all XAF design-time tools, Visual Studio vNext, .NET 5 and C# 8.0 features like Nullable Reference Types  (v20.1, v20.2).
  • We will make a number of Non-Persistent/proxy object enhancements (v20.2): support for filtering; propagate FindObject, CommitChanges, Refresh and other methods from NonPersistentObjectSpace to AdditionalObjectSpaces (T509228); support CRUD operations with non-persistent objects in a nested ListView of a persistent object DetailView (T486427T510338T695631).
  • You can expect further performance enhancements to the Application Model and other core sub-systems. For  instance, removing static XafTypesInfo dependencies and locks in ModelNode may result in faster app startup and unit tests as well as greater scalability for Blazor apps.

Security System: User Authentication and Group Authorization API

  • We will publish Blazor, Xamarin and WPF examples for XAF's User Authentication and Group Authorization API powered by the XPO ORM (see our GitHub repository for more information). To deliver more elegant and modern solutions, we're considering the following enhancements: asynchronous versions of popular security APIs (IsGranted, CanRead, CanWrite, CanDelete, etc.), token-based authentication and possible utility libraries that will encapsulate boilerplate code.
  • We hope to support Entity Framework Core to help more DevExpress and non-DevExpress customers benefit from XAF's Security System. In v20.1, we will introduce a secured Object Space for EF Core 3.1+ and examples for corresponding platforms. Later in v20.2, we will support EF Core in our Blazor UI. We will decide on the EF Core support for WinForms UI based on user demand.
  • We will include a built-in permission for XAF Actions (T618115). Since the UI has yet to be finalized, we welcome feedback and thoughts about the interface. We're considering the following base functionality: 
    • A separate tab in the role detail form with a list of Action items like our built-in Navigation Permissions. In this grid, users will be able group data by display text, category, module and other context information. Please let us know your thoughts about this.
    • Users will view, add, modify and remove only permissions for Actions they want to prohibit or deactivate. We want to follow only the 'Allow all by defaultpolicy regardless of what is specified in the role, because other options do not make much sense for Actions. Your feedback is appreciated.
    • Users will be able to prohibit execution of both custom and XAF system Actions (for greater user flexibility and implementation simplicity).
    • Users will be able to quickly locate an Action in the lookup editor in the Action permission's detail form via search and grouping (for instance, to filter out XAF system Actions like Logon and Refresh).
    • Action permissions will hide Actions unconditionally: we don't expect to interfere with Conditional Appearance, State Machine, TargetObjectsCriteria or any custom rules that depend on criteria or object/UI changes in Controllers. If you want such dynamic functionality for Actions, it is better to implement it using these specific means. Please let us know your thoughts about this.

Your Opinion Counts

As always, we look forward to your comments and questions. Please share your thoughts below or email xafteam@devexpress.com.

The information contained within this blog post details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely on or use this information to help make a purchase decision about Developer Express Inc products.

Office File API & Office-Inspired Desktop UI Controls – Tips & Tricks (November-December 2019)

$
0
0

We hope you’ll find the following list of tech support tickets of value as you explore the capabilities of our Office-Inspired Desktop UI Controls and Office File API Library (DOC, XLS, PDF).

If you come across a Support Center ticket you’d like to share with the DevExpress developer community, feel free to post a comment below.

Enhancements

Tips & Tricks

Documentation Updates

Office File API for .NET Core

New articles and step-by-step tutorials for our Office File API library.

Use the drop-down list above the table of contents to view our Office File API documentation for a specific development platform (.NET Framework, .NET Standard, or .NET Core).

DevExpress will be at dotNed Saturday in Veenendaal, The Netherlands

$
0
0

Saturday, January 25th, one of the premium Dutch .NET related usergroup meetings is taking place - dotNed Saturday.

DevExpress is proud to sponsor this annual day filled with interesting sessions. John and I will be there and we've hired a professional Coffee Barista to make sure all attendees can enjoy a nice handmade coffee.

I'm super excited to present  a session about Blazor myself and for all of you planning to attend - brace yourself for a lot of interesting material on this brand new UI framework for .NET from Microsoft!

I hope to see you tomorrow!


XAF - Tips & Tricks (January 2020)

$
0
0

Interesting Support Tickets

Reports & Office Modules

XPO

ASP.NET WebForms

Miscellaneous

Usability & Performance Enhancements

Documentation Updates

Functional Testing

How to integrate XAF functional testing with Continuous Integration systems like Azure DevOps

XAF Tools for .NET Core 3 Apps

Office Modules

Simplified Access to List View's Objects

How to: Access Objects Selected in the Current View: This article now demonstrates a way to access business object wrappers via the IObjectRecord interface for different List View data access modes.

User-Friendly URLs

How to: Print a Report Without Displaying a Preview: This approach now supports the user-friendly URLs mechanism.

Showcase Your Apps on DevExpress.com

Highlight your business app and share your development experiences with the DevExpress community. To include your app in our upcoming App Showcase, please forward an application screenshot to clientservices@devexpress.com and tell us which DevExpress products you currently use within your organization.

CodeRush – Organize Members

$
0
0

In earlier releases, we’ve seen enhancements to CodeRush’s Organize Members functionality. In this blog post, we’ll talk about some of these new features in greater detail.

Rule Priority

In CodeRush version 19.2.3 we added a new Rule Priority option to Organize Members. To show how this is useful, first let's take a look at the earlier CodeRush functionality without this feature.

Before introducing rule priority, Organize Members used the following approach to split type members based on the members kind and visibility:

  • Get the type members list
  • Evaluate members based on the rules you have set, sequentially

Each rule may match zero or more members from the list. And once a type member is matched by a rule, it's "captured" for the purposes of organization, and it cannot be matched by any other rule.

This approach, while useful, may lead to undesired results in some edge cases. For example, consider the following code:


using NUnit.Framework;

namespace NunitTestProject {
  public class Calculation {

    public int Sum(int a, int b) {
      return a + b;
    }

    [Test]
    public void Sum10Plus15() {
       Assert.AreEqual(10 + 15, Sum(10, 15));
    }

    [Test]
    public void Sum10Plus5() {
      Assert.AreEqual(10 + 5, Sum(10, 5));
    }
  }
}

Suppose you want to wrap all the tests marked with the [Test]attribute into a single region and place those tests at the end of the file.

To solve this task you might try the following:

  1. Create a new “Test methods” rule and put it inside a region:

    CreateTestMethodRule

  2. Run Organize Members on the sample code above.

If you try it, you would likely find the original file unchanged.

Why?

The problem is the “Public methodsrule (up two from our new Region Test methods rule) has already matched all public methods (captured them) before the “Test methods” rule even got a chance to find and organize those public test methods.

In previous versions of CodeRush, to fix this issue, you had one of two workarounds:

  1. Organize Test methods so they appear earlier in the file (before public methods). This is not a great solution if you really want your test methods at the end of the file.
  2. Modify the earlier “Public methods” rule to ignore any methods with the [Test] attribute.

Yeah, we know. It’s more work than it should be. This is CodeRush after all - things should be easy.

Fortunately, in the 19.2.5 release we added a “Rule Priority” option that tells Organize Members when to look for elements that satisfy each rule. You can set this option to High, Normal or Low.

SetRulePriorityToHigh

The new Organize Members now runs rules in three passes. Rules having a high rule priority will be run first, followed by medium-priority rules, and ending with low priority rules.

This allows Organize Members to find our test methods (and group them together) before looking for public methods.

Note that “Rule priority” only impacts the order in which the rule is checked and has zero impact on member order, which is still determined by the order in which the rules appear in the list.

So now to organize our code, we simply set the “Region Test methods” Rule priority to High and run Organize Members.

OrganizeMembersNowWorks 

Grouping Interface Implementors

Some developers like to group interface implementations separately from other members, other developers might want to only group explicitly implemented interface members. This can improve code readability, since all the related members are together. In the 19.2.5 release, we have added interface grouping to Organize Members.

Explicit Interface Implementations

We have added the Explicit interface implementations rule to the Default rule set. This rule allows Organize Members to collect all explicit interface implementations and group them by the interface name.

This new rule uses the new Rule priority option (set to High) and groups members by the Is Explicit Interface Implementor criteria.

Let’s look at the new default rule on the following code:

namespace Project {
    interface IDimensions {
        float GetLength();
        float GetWidth();
    }
    public class Box : IDimensions {
        float lengthInches, widthInches;
        Box(float length, float width) {
            lengthInches = length;
            widthInches = width;
        }
        float IDimensions.GetLength() { return lengthInches; }
        float GetLength() { return lengthInches; }
        float IDimensions.GetWidth() { return widthInches; }
        float GetWidth() { return widthInches; }
    }
}

Explicit and Implicit Interface Implementations

In some cases, you might want to group and sort all interface implementations by the interface name. This is easy enough on the Organize Members options page.

InterfaceImplementations

Just set the rule must priority to high with a grouping criteria of Is Interface Implementor, sorting these members by InterfaceName.

As an example, consider the following code:

using System;

namespace Project {
  public interface IFirst {
    void FirstMethod();
    event EventHandler FirstEvent;
    object this[string index] { get; }
  }

  public interface ISecond {
    void SecondMethod();
    event EventHandler SecondEvent;
    object this[int index] { get; }
  }

  public class Class1 : IFirst, ISecond {
    object ISecond.this[int index] => throw new NotImplementedException();
    public object this[string index] => throw new NotImplementedException();
    public event EventHandler FirstEvent;
    event EventHandler ISecond.SecondEvent {
      add {
        throw new NotImplementedException();
      }
      remove {
        throw new NotImplementedException();
      }
    }

    void ISecond.SecondMethod() {
      throw new NotImplementedException();
    }

    public void FirstMethod() {
      throw new NotImplementedException();
    }

    public void MyMethod() {
      var s = new { num = 10 };
      var newType = new NewType();
    }
  }
}


With the example interface implementor-grouping rule above, Organize Members would look like this:

OrganizeMembersInterfacImplementors


Grouping Event Handlers

We have also added the ability to group event handlers. Just create a simple event handlers rule and place this rule in the desired location in the rule list, like this:

organize events rule

For example in this code:

using System;
using System.Drawing;
using System.Windows.Forms;

namespace WindowsFormsApp4
{
  public partial class Form1 : Form {
    public Form1() {
      InitializeComponent();
      Button button = CreateButton();
      this.Controls.Add(button);
    }

    private Button CreateButton() {
      var myButton = new Button();
      myButton.Text = "Click me!";
      myButton.Click += myButton_Click;
      myButton.MouseEnter += MyButton_MouseEnter;
      myButton.MouseLeave += MyButton_MouseLeave;

      return myButton;
    }

    private void myButton_Click(object sender, EventArgs e) {
      MessageBox.Show("Button clicked!");
    }

    private void MyButton_MouseEnter(object sender, EventArgs e) {
      var myButton = sender as Button;
      myButton.ForeColor = Color.Red;
    }

    private void MyButton_MouseLeave(object sender, EventArgs e) {
      var myButton = sender as Button;
      myButton.ForeColor = Color.Yellow;
    }
  }
}

Organize Members (with the event handler rule shown earlier) would group all the class’s event handlers like this:

GroupEvents

Dynamic Regions Creation

CodeRush can wrap all members matching a rule into a region if it knows the region name (for example, “public methods”). But what if you need a region name that’s based on the code you’re organizing? CodeRush now makes it easy to wrap all matching elements in a dynamically-generated region with new sorting/organizational options.

For example, if you sort by an implemented interface name, you can wrap distinct groups (e.g., each group of members that implement a single interface) into a separate region.

If you sort by kind, you can wrap distinct groups in regions based on member type (e.g., fields, properties, methods, etc.).

You can also use built-in variables to specify the region name. These variables get their values from your code.

OrganizeByInterface

For example, let’s apply the “Interface implementations” rule, shown in the screenshot above, to the following code:

using System.Drawing;

namespace ConsoleApp {

  interface IDimensions {
    float GetLength();
    float GetWidth();
  }

  interface IColor {
    Color GetBackgroundColor();
    Color GetForegroundColor();
  }

  public class Box : IDimensions, IColor {
    Color boxColor;
    float lengthInches;
    float widthInches;

    Box(float length, float width, Color color) {
      lengthInches = length;
      widthInches = width;
      boxColor = color;
    }

    float GetLength() {
      return lengthInches;
    }
float IDimensions.GetLength() { return lengthInches; }
float GetWidth() { return widthInches; } float IDimensions.GetWidth() { return widthInches; } public Color GetForegroundColor() { return boxColor; }
public Color GetBackgroundColor() { return boxColor; } } }

The result will look something like this:

DynamicRegionGeneration


Conclusion

We hope these features will help you more quickly and easily organize your code and produce code that is easier to read and maintain.

As always, we welcome your feedback. If you have specific questions or need assistance with CodeRush, feel free to let us know in the comments below or contact us through our Support Center (support@devexpress.com).

Windows Forms Controls - 2020 Roadmap

$
0
0

After careful consideration of your feedback and support center tickets, we’ve finalized our 2020 Roadmap. Thank you for sharing your perspective with us and for your continued support and commitment to DevExpress WinForms controls.

If you have any questions about our 2020 WinForms Roadmap, feel free to comment below or email us at support@devexpress.com. We will be happy to follow up.

Table of contents

See Also

.NET Core Support (v20.1 and v20.2)

In 2020, we will switch from .NET Core version 3 to 3.1 LTS (Long Term Support). Microsoft released this version a few weeks ago.
You can expect multiple enhancements to our .NET Core product line throughout 2020 – including designer dialogs, wizards, and Template Gallery templates.
Additionally, we will move forward with .NET 5 support once the framework is released.

Appearance and Skins (v20.1 and v20.2)

We hope to support DirectX and Acrylic effect in Overlay Screens, the BackstageView, and popup menus.

Additionally, Splash Screens will be able to change colors based on current application skin.

We also expect to move outdated raster skins into our Bonus Skins library.

Appium Automated UI Test Support (v20.1)

We recently published a blog post regarding Appium and how it can be used to test DevExpress-based WinForms applications. We will fully test all DevExpress WinForms controls using this framework and officially announce Appium support later this year for active WinForms subscribers.

WinForms Data Editors (v20.1 and v20.2)

We will add two new WinForms Data Editors in 2020 - a highly requested editor that supports DateTimeOffset values, and a lookup editor that supports multiple item selection.

lookup

Charts

Large Data Source Processing (v20.1)

We will introduce a new data processing mode to minimize the overall memory footprint when processing large data sources. This will address the needs of those with extremely large statistical/financial datasets (especially useful for those using multiple Series or multiple Chart Controls simultaneously).

New Swift Point Series Type (v20.2)

Swift Point Series will be optimized for quick analysis of large input data via the use of point markers.

swift-series

For more information on this feature, please review the following support tickets: T752918, S34103, Q455568.

Chart Designer Template Gallery (v20.2)

We will extend the customization capabilities of our Chart Control and Chart Designer to address various usage scenarios (the Chart Designer allows end-users to quickly customize existing chart layouts or create new charts from scratch). We plan to introduce the Chart Designer Template Gallery in the v20.2 release.

In-place Edit Mode for Annotations and other Text Elements (v20.1)

We will make Annotations and Constant Lines editable at runtime (a new option will be added to the Chart Toolbar).

For more information on this feature, please review the following support tickets: Q531396, T182416, E1003.

New DateTime Scale Mode (v20.1)

Our Chart Control includes a configurable DateTime scale (you can exclude non-working days and time as needed). We will extend DateTime scale processing by automatically excluding intervals without data. This will simplify the DateTime scale configuration for those using financial charts.

New Series Label Display Mode (v20.1)

All XY-Diagram compatible Series will support a new label type for easier Series identification when multiple Series are displayed simultaneously.

edge-labels

Support percent values for Side Margins (v20.1)

For more information on this feature, please review the following support tickets: T700625, T148976.

Mini Map for easy navigation (v20.2)

New Sankey Chart Control (v20.2)

We will introduce a Sankey Chart designed to visualize a flow from one set of values to another.

Calculated Fields and Parameters (v20.2)

We will introduce Calculated Fields and Parameters to extend data processing capabilities for end-users.

Advanced Text Formatter for Crosshair Panel (v20.2)

You will be able to specify Crosshair label width and alignment.

WinForms Data Grid

Hovered state support (v20.1)

Our WinForms Data Grid will support a hovered state for data rows.

Kanban Board enhancements (v20.1)

As you may know, our Grid’s Tile View ships with Kanban Board mode. We will extend our Kanban Board with the following new features:

  • Empty groups support
  • Multi-line group captions
  • Group captions formatted with HTML tags
  • UI elements that allow users to quickly add new columns and cards at runtime
  • Variable (dynamically changed) tile heights

New customization form (v20.2)

We will introduce a new customization form to our WinForms Data Grid control. This new form will improve usability when working with a large collection of columns and bands. We will also extend the capabilities of the form and include features such as checkbox-based multi-selection.

Miscellaneous Enhancements (v20.1 and v20.2)

Though not exhaustive, the following list of minor features should also be implemented in 2020:

  • Mix conditional formatting colors with row appearance settings
  • Fix (align) the checkbox selection column to either side of the control
  • Improve WYSIWYG and data-aware export
  • Conditional Formatting Rules Manager enhancements
  • Colorful search text highlight

WinForms Diagram Control

Data Binding - DataTable Support (v20.1)

Our Data Binding and Org Chart controllers use data bindings to link the content of a generated item to data objects. The data binding engine that we use for the WinForms Diagram control does not support dynamic properties. Therefore, those of you who chose DataTable or DataSet as a source collection have to synchronize data between data objects and diagram items manually. To support DataTable, we will need to create a new data binding engine for the Diagram control.

Text Tool (v20.1)

We will ship a new tool that allows you to add labels to a diagram by clicking an empty region and entering the appropriate caption via the keyboard.

diag2

Localization and Measure Units for the Properties Panel (v20.1)

Diagram item properties displayed within the Properties Panel will support localization. In addition to pixels used by default, end-users will be able to specify property values in other measurement units (inches and centimeters).

Rendering Performance (v20.2)

The Diagram control will automatically adjust render quality on small zoom levels - significantly increasing performance for diagrams with 1000+ items or diagrams that contain complex SVG shapes.

List Item (v20.2)

Our second major release of 2020 will include a new container item that arranges its child items in a list. End-users will be able to add, remove, and reorder items in this list.

diag1

WinForms Common Dialogs (v20.1 and v20.2)

We will extract common dialog logic into stand-alone behaviors. This will allow you to create your own file and folder managers. Additionally, we expect to implement a few user-requested features, including the ability to filter file\folder\drive lists or add custom controls into dialogs.

WinForms Gantt Control (v20.1 and v20.2)

In 2020, we will extend the capabilities of our Gantt Control. We expect the include the following features this year:

  • Auto-scheduling
  • Runtime customization
  • Task Split support
  • Critical Path support
  • Embedded timeline with two display modes
  • Printing support

Maps

New Vector Data Providers (v20.1)

We will introduce new data providers for formats such as vector tiles (PBF, MBTiles), GeoJSON, KMZ, and GPX.

Vector tiles have a big advantage over raster maps from existing providers (Bing, OSM) because they reduce data transfer size. In addition, vector tiles make it possible to address popular requests such as map rotation.

vector-tiles

For more information on this feature, please review the following support tickets: T825567, T833987, T745712.

Vector Element Layout (v20.1)

We will add new options (rotation angle and SVG image support) to extend the capabilities of vector items such as Pushpins and Custom Elements.

Map Editor UI (v20.2)

We will introduce new vector elements and extend the Map Editor’s UI to make it more suitable for geo measurements and for in-place editing.

For more information on this feature, please review the following support tickets: T749863, T717633.

Navigation and Layout Controls

New WinForms Step Progress Bar Control (v20.1)

This new control will help you better visualize linear processes. Each process step in your linear process will be drawn as a circle and the current step will be highlighted. Transitions between steps will include animation effects.

Stack and Table Panel Enhancements (v20.1)

We expect to enhance our simple layout panels via the following features:

  • the ability to change visibility for Table Panel rows and columns
  • right-to-left (RTL) layout support for both Table and Stack Panels
  • automatic panel sizing
  • automatic tab order
  • baseline caption alignment
  • performance optimizations

WinForms Pivot Grid (v20.1 and v20.2)

We will add a search panel to the Pivot Grid control to help simplify the record search within the Pivot Grid.

In addition, we're planning to introduce support for fixed columns within the Pivot Grid control.

WinForms Scheduler Control

Year View (v20.2)

We will add a Year View to our Scheduler Control in our v20.2 release cycle.

Timeline View (v20.1)

This year, we’ll shift development focus to our WinForms Timeline View. We hope to introduce resource pixel scrolling to this View.

Flyout Customization (v20.2)

We will allow you to customize our Appointment Flyout as needs dictate (for instance, give you the ability to incorporate custom fields).

Resource Category Tab Buttons (v20.1)

We expect to enhance our recently released Resource Category feature by adding buttons (both standard like "Close" and custom) to resource tab headers.

Tree List (v20.1)

We will add an empty row (new item row) option to the TreeList Control in our first major release of 2020 (it will mirror the capabilities of our Data Grid).

Your Feedback Matters

As always, we look forward to your comments and questions. Please share your thoughts below or email support@devexpress.com.

The information contained within this blog post details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely on or use this information to help make a purchase decision about Developer Express Inc products.

Viewing all 2399 articles
Browse latest View live