Quantcast
Channel: Developer Express Inc.
Viewing all articles
Browse latest Browse all 2370

WPF — Early Access Preview (v24.2)

$
0
0

In this post, I’ll highlight WPF-related features we expect to include in our Early Access Preview (EAP v24.2) build. All active DevExpress Universal and DXperience subscribers can download and install the EAP today. Please navigate to the DevExpress Download Manager to obtain our EAP build.

Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please back up your project and other important data before installing Early Access and CTP builds.

This EAP may not include all features/products we expect to ship in our v24.1 release cycle. As its name implies, the EAP offers an early preview of what we expect to ship in two months. For additional information on what you can expect, refer to our Year-End 2024.2 Roadmap.

.NET 9 Support


The DevExpress WPF product line now supports NET 9 RC1.

.NET 8, .NET Framework 4.6.2, Visual Studio 2019 Will Be Minimally Supported Versions for DevExpress Libraries (v24.2+)

Learn more about this global change in this announcement.

Easier Upgrade to .NET from .NET Framework

Our Project Converter can now convert DevExpress assembly references in your solution or specific project to corresponding DevExpress NuGet packages. By selecting the "Convert DevExpress assembly references to NuGet packages" option under Advanced settings, you can easily transition to NuGet-based project management.


To streamline the upgrade process, our Project Converter automatically creates backup (.bak) files for your CSPROJ and VBPROJ files. Once DevExpress assemblies are converted, complete the upgrade process by using Microsoft .NET Upgrade Assistant (to migrate your application to the most recent version of .NET).

DateOnly & TimeOnly Support

We've enhanced DateOnly & TimeOnly support throughout our WPF product line. Key features available in our EAP build include the following: 

WPF Grid Control – TimeOnly Column Filters

Our Data Grid now features enhanced quick filters for TimeOnly values within the Excel Column Filter. To use these filters, open the column filter popup, go to the Filter Rules tab, and select Time Intervals.

WPF Grid Control – TimeOnly Seconds Rounding

To simplify filtering, our WPF Grid control now automatically rounds TimeOnly values to the nearest minute. If your data contains TimeOnly values that only differ in seconds or milliseconds, these values will be combined into a single filtering entity. On the UI side, we’ve simplified interval-based criteria (to improve usability) within both the Filter Panel and AutoFilter Row. 

PropertyGrid – DateOnly & TimeOnly Support

Our WPF Property Grid can now automatically generate an editor (with appropriate settings) when an edited object uses DateOnly or TimeOnly properties.

New TimeOnly Functions

This EAP adds new TimeOnly-specific criteria functions to our criteria language and Grid-based UI controls (Data Grid, TreeList, PropertyGrid).

New TimeOnly functions include:

  • BeforeMidday - Filters records that occur before 12:00 PM.
  • AfterMidday - Filters records that occur after 12:00 PM.
  • ThisHour - Filters records that occur during the current hour.
  • NextHour - Filters records that occur during the next hour.
  • LastHour - Filters records that occurred during the previous hour.
  • IsMorning - Filters records that occur between 6:00 AM and 12:00 PM.
  • IsAfternoon - Filters records that occur between 12:00 PM and 6:00 PM.
  • IsEvening - Filters records that occur between 6:00 PM and 9:00 PM.
  • IsNight - Filters records that occur between 9:00 PM and 6:00 AM.
  • IsWorkTime - Filters records that occur during work hours (9:00 AM to 5:00 PM).
  • IsFreeTime - Filters records that occur outside of work hours (9:00 AM to 5:00 PM).
  • IsLunchTime - Filters records that occur during lunch time (12:00 PM to 1:00 PM).
  • IsSameHour - Filters records that occur exactly at the specified hour (e.g., 2 PM).
  • IsSameMinute - Filters records that occur exactly at the specified hour and minute (2:35 PM).
  • TimeOnlyFromParts - Returns the time value for the specified time with a specified precision (hour, minute, [seconds], [milliseconds]).

Applies to:

  • Criteria Operators
  • Filtering UI (Column Filter Popup, Filter Editor)
  • Expression Editor
  • Conditional Formatting Rules
  • Unbound Columns
    You can use these new TimeOnly functions in your DevExpress-powered .NET and .NET Framework WPF applications.

    Keyboard Navigation & Screen Reader Enhancements

    The following section includes accessibility-related enhancements shipping in our EAP build. 

    ButtonEdit – Focus Editor Buttons

    You can now focus buttons within ButtonEdit descendants and trigger associated actions. To enable this option, set ButtonEdit.AllowFocusEditorButtons to true. 


    RatingEdit – Changing Values With Arrows 

    RatingEdit allows you to modify the current value with arrow keys. Once a value is modified, it will be pronounced by a screen reader.  

    Card View – Expand & Collapse Shortcuts

    We added  Ctrl + Plus & Ctrl + Minus shortcuts to expand/collapse cards within our WPF Card View.

    Column Chooser – Keyboard Navigation

    Our Data Grid Column Chooser now supports keyboard navigation, allowing you to select/deselect columns with the Space key.

    ImageEdit – Toolbox Button Navigation

    Users can now navigate through toolbar buttons within the ImageEdit and trigger associated actions using the keyboard. 

    HyperLinkEdit – Visible Focus State

    Previously, HyperLinkEdit did not display a visual change when focused. Users can now see when the control is focused and activate the associated action with the Space key

    Data Grid – Screen Reader Enhancements

    The DevExpress WPF Data Grid ships with enhanced assistive technologies support (such as screen readers). Our EAP build supports the following new capabilities: 

    • Update buttons in Edit Entire Row mode are now detectable and readable by screen readers (you can display these buttons by enabling the TableView.ShowUpdateRowButtons option).
    • Alt text for images exported to Excel. As you know, in our previous update, we added in-place image Excel export support. This EAP extends the XlsExportOptionsEx.CustomizeCell event, allowing you to set alt text for exported images.

    Artificial Intelligence (AI) Integration

    DevExpress AI-powered APIs allow you to integrate the following AI services into your DevExpress-powered WPF application:

    • OpenAI
    • Azure OpenAI
    • Ollama

    AI services and DevExpress AI extensions (behaviors) follow a "bring your own key" approach. DevExpress does not provide a REST API or include built-in LLMs/SLMs. To use AI services, you need an active Azure/OpenAI subscription to obtain the necessary REST API endpoint, key, and model deployment name. This information must be provided at application startup to register AI clients and enable DevExpress AI-powered features in your WPF application.

    The following code snippet registers an Azure OpenAI client:

    public partial class App : Application {
        public App() {
            //..
            AIExtensionsContainerDesktop.Default.RegisterChatClientOpenAIService(
                new AzureOpenAIClient(
                            new Uri("AZURE ENDPOINT"),
                            new System.ClientModel.ApiKeyCredential("YOUR API KEY")),
                            "DEPLOYMENT NAME");
        }
    }

    AI-driven Text Processing

    NLP-powered text transform extensions (behaviors) allow you to enhance the way users interact with and manage text content. These extensions leverage advanced natural language processing (NLP) technologies to provide automated, intelligent text manipulation capabilities directly within your DevExpress-powered WPF application.

    AI-powered text transform extensions include:

    • Expand
    • Explain
    • Explain Formular (in the Spreadsheet control)
    • Shorten
    • Summarize
    • Adjust Tone
    • Proofread
    • Rewrite
    • Translate
    • Ask AI (Custom Prompt)

    AI-powered text transform extensions can be used in the following DevExpress WPF controls:

    • MemoEdit
    • Rich Text Editor
    • Spreadsheet

      Each AI transform extension is enabled by a separate behavior (allowing you to include transforms extensions appropriate to your specific usage scenario):

      xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
      xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
      xmlns:wpfo="clr-namespace:DevExpress.AIIntegration.Wpf.Office;assembly=DevExpress.AIIntegration.Wpf.v24.2"
      xmlns:desktop="clr-namespace:DevExpress.AIIntegration.Desktop;assembly=DevExpress.AIIntegration.Desktop.v24.2"
      
      <dxre:RichEditControl>
         <dxmvvm:Interaction.Behaviors>
            <wpfo:RichEditExpandBehavior />
            <wpfo:RichEditShortenBehavior />
            <wpfo:RichEditSummarizeBehavior />
            <wpfo:RichEditExplainBehavior />
            <wpfo:RichEditToneStyleBehavior />
            <wpfo:RichEditProofreadBehavior />
            <wpfo:RichEditRewriteStyleBehavior />
            <wpfo:RichEditTranslateBehavior >
                <desktop:LanguageInfo Culture="de-DE"/>
            </wpfo:RichEditTranslateBehavior>
            <wpfo:RichEditCustomRequestBehavior />
            <wpfo:RichEditGenerateDescriptionBehavior/>
         </dxmvvm:Interaction.Behaviors>
      </dxre:RichEditControl>

      Run the application, select text, invoke the popup menu, and click the desired AI-related command. AI processes the command and generates an answer. The AI-generated answer is displayed within a dialog.

      You can insert the answer directly into a document or text field with a single click. You can insert the answer above/below selected text or cursor, replace all content or selected text, or copy the answer to the clipboard.

      RichEditCustomRequestBehavior displays the "Ask AI" item in the context menu. The "Ask AI" item invokes a dialog that allows users to interact with an AI-powered assistant directly within your WPF application. A user can enter a question or prompt. The AI assistant will process the query and generate an answer.

      Rich Text Editor & Spreadsheet – Alt Text dialogs

      We've added new AI-Powered Alt Text dialogs for our WPF Rich Text Editor and Spreadsheet Control.

      The Alt Text dialog allows you to set accessible descriptions for shape objects used within Word and Excel documents or mark non-informative document graphics as Decorative (this setting allows screen readers to ignore decorative graphics when scanning documents).
      In addition, you can use the Alt Text dialog to generate the meaningful descriptions for document images using the power of the AI behavior.

      To activate this capability in the DevExpresss WPF Rich Edit Control, add RichEditGenerateDescriptionBehavior to the Behaviors collection. For the DevExpress WPF Spreadsheet Control, use SpreadsheetGenerateDescriptionBehavior.

      <dxre:RichEditControl>
          <dxmvvm:Interaction.Behaviors>
              <wpfo:RichEditGenerateDescriptionBehavior/>
          </dxmvvm:Interaction.Behaviors>
      </dxre:RichEditControl>

      Data Grid – Batch Editing

      As you may know, Microsoft Excel allows you to select multiple cells and apply text changes by pressing Ctrl + Enter (instead of Enter). We added a similar feature to our WPF Grid control, allowing users to apply identical values to multiple cells simultaneously. To enable this functionality, set GridControl.SelectionMode to  Cell  and GridControl.BachEditMode to FocusedColumn/AllColumns.

      Environment Policy

      We added a new Environment Policy that allows you to apply global environment access restrictions, track app-initiated requests (initiated by a DevExpress UI control) and execute custom actions in response.

      You can apply global restrictions using various methods like SuppressAll() to block all environment access or more specific options such as preventing DevExpress UI controls from reading or writing environment variables, exiting processes, altering the current directory, or reading paths to system special folders.

      Event handlers allow you to track and manage environment-related operations. For example, you can detect when DevExpress UI controls attempt to read or modify environment variables, process data, or system directories and enable conditional responses based on specific conditions.

      Documentation

      Registry Access Policy

      DevExpress UI controls can save, read, and modify configuration settings and options in the system registry. These requests can be initiated in code or through the internal control engine. The Registry Access Policy allows you to apply global registry access restrictions, track user/app-initiated requests, and execute custom actions in response.

      Documentation

      Your Feedback Matters


      Viewing all articles
      Browse latest Browse all 2370

      Trending Articles