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

Webinar “Custom Validation in ASP.NET MVC” available on YouTube

$
0
0

The webinar on how to create reusable validation attributes with your own custom validation logic is available here:

image

You will learn how to create a custom validation attribute, and how to perform server-side as well as client-side validation including the code needed to use the unobtrusive validation plugin for jQuery.

I will show you how to create a RequiredWhen attribute which makes the property only required when another property has a specific value.

The source code of the project is available on GitHub.

Let me know what kind of custom validation attributes you have created!


ASP.NET Ribbon Control - Gallery Support (v15.1)

$
0
0

In the v15.1 release, we're adding support for Gallery items in the DevExpress ASP.NET Ribbon Control.

What is a Ribbon Gallery?

Microsoft Office 2013 introduced the concept of ribbon galleries which are rich drop-downs. Galleries in the Ribbon bar allow you to do things like:

  • Display a list of fonts in the actual font style
  • Display a list of paragraph styles using the custom look that the styles will be rendered in:

image

Why Ribbon Galleries?

The ribbon galleries increase the end user experience and allow the user to perform certain tasks more quickly because it doesn’t require you to open up some popup, select the items you want, click ok and check how it looks. Once an item is clicked in the gallery, the action is performed immediately.

With our v15.1 release you are able to deliver this very cool functionality to your users as well.

Bar & Dropdown

The ASPxRibbon control supports two types of galleries:

GalleryBar

This mode is inspired by the image above and displays the amount of items that will fit inside the control. When there are more items available they will be wrapped down on the next line of items and will become visible when clicking the dropdown button or by using the up and down arrows to navigate through the rows without activating the dropdown.

clip_image001[6]

GalleryDropDown

This mode will always use the drop down functionality where items are arranged in groups. This is useful when there is a distinct set of item types like the shapes in the image below.

 clip_image001

Did I mention that it will be available for both WebForms and MVC !

Let me know your thoughts about this new feature of the DevExpress ASP.NET Ribbon Control.

ASP.NET HTML Editor - Enhancements (v15.1)

$
0
0

In the v15.1 release, we've added four major enhancements to the DevExpress ASP.NET HTML Editor:

1. Tag Inspector

The new Tag Inspector panel helps your end-users to navigate through the HTML document structure. And the new Tag Property Editor dialog helps to tune each HTML element in the document.

Check out this short animation that shows how cool this new feature is (tags are displayed in the gray bar under the icons):

DevExpress ASP.NET HTML Editor - Tag Inspector

The new tag inspector helps save your end-users time.

2. Placeholders (Mail Merge)

The DevExpress ASP.NET HTML Editor now supports placeholders. Placeholders help you to create templates for CMS, mail merge, and more.

For example, the fields within the brackets will be replaced with bound data when the "Preview Results" button is clicked:

DevExpress ASP.NET HTML Editor - Placeholders

3. Content Filtering

The content filtering feature allows you, the developer, to control the presence of allowed/disallowed HTML elements and attributes in the HTML document.

White and black lists are supported for element filtering, so a developer can limit the number of available formattings in the document. This functionality is useful for blog platforms, forums, or any site where you'd like have control over the HTML content.

Here's a small sample of some possible tags that you can white or black list from the HTML Editor:

DevExpress ASP.NET HTML Editor - Content Filtering

4. Dialogs and Design-Time Improvements

A new design-time wizard has been added that also includes a feature browser. This makes adding and setting up the DevExpress ASP.NET HTML Editor much easier.

The dialog pop-ups has also been enhanced:

  • new design in the 'Insert Image' dialog
  • new design for 'Insert Flash/Video/Audio' dialogs
  • support for drag’n’drop

Register for v15.1 webinar

To see all the new features coming out for the v15.1 release, sign up for the "What's New for ASP.NET and MVC (v15.1)":

Click here to register

Thanks!


Your Next Great .NET App Starts Here

Year after year, .NET developers such as yourself consistently vote DevExpress products #1.

Experience the DevExpress difference for yourself and download a free 30-day trial of all our products today: DevExpress.com/trial (free support is included during your evaluation).

New Excel Export Library - XLSX, XLS, CSV (Coming soon in v15.1)

$
0
0

Last year, I blogged about the updated Excel export capabilities of our WinForms, WPF and ASP.NET Grid Controls. As we saw by all your great feedback, this was an important enhancement and something many of you were looking forward to...

Based on your input, v15.1 will introduce an entirely new product to the DevExpress Document Generation toolset - our new XL Export Library.

This new data export engine can be used to generate Excel spreadsheet files (XLSX, XLS, CSV) quickly, with minimal memory usage. The engine allows you to generate document structures in code and immediately write them to a stream.  To maintain the highest possible performance standards, the engine is not designed to load and modify existing documents (it does not create an internal document model to work directly with data).

The bottom-line is simple: When you need an extremely fast and low-memory footprint engine to export data from within your application into Excel file formats, the DevExpress XL Export Library is your best option.   

How the DevExpress XL Export Library Works

With the XL Export API you can create all major spreadsheet elements (worksheets, columns, rows and cells), specify formatting options, create conditional formatting rules, add formulas and hyperlinks to cells, create merged cells, freeze columns and rows, insert pictures, use filters, introduce data grouping and data validation, etc.

In the following example, we'll walk you through creating a simple sales report.

.NET Document Generation - Excel Export Library

1. First, we must add references to the appropriate libraries:

DevExpress.Data.v15.1.dll

DevExpress.Printing.v15.1.Core.dll  


2. Next, a couple of namespaces.

using DevExpress.Export.Xl; 

using System.IO;


3. To perform the export operation, we need to create an object exposing the IXlExporter interface.

IXlExporter exporter = XlExport.CreateExporter(XlDocumentFormat.Xlsx);


4. Next, we create an instance of the FileStream class and call the IXlExporter.CreateDocument method to create the new document and begin to write it to the specified file stream.

FileStream stream = newFileStream("Document.xlsx", FileMode.Create); 

IXlDocument document = exporter.CreateDocument(stream);


5. Here, we'll add a new worksheet to a document and set its name to "Sales Report". 

IXlSheet sheet = document.CreateSheet(); 

sheet.Name = "Sales Report";


6. The structure of the document includes three columns. We'll create them in code using the IXlSheet.CreateColumn method, specify column width, and set the number format for the last column.

using (IXlColumn column = sheet.CreateColumn()) 

       column.WidthInPixels = 100; 

using (IXlColumn column = sheet.CreateColumn()) 

       column.WidthInPixels = 250; 

using (IXlColumn column = sheet.CreateColumn()) { 

       column.WidthInPixels = 100; 

       column.ApplyFormatting((XlNumberFormat)@"_([$$-409]* #,##0.00_);_([$$-409]* \(#,##0.00\);_([$$-409]* ""-""??_);_(@_)"); 

}


7. Specify cell formatting for the data range, header and total rows.

XlCellFormattingcellFormatting = newXlCellFormatting(); 

cellFormatting.Font = newXlFont(); 

cellFormatting.Font.Name = "Century Gothic"; 

cellFormatting.Font.SchemeStyle = XlFontSchemeStyles.None; 


XlCellFormattingheaderRowFormatting = newXlCellFormatting(); 

headerRowFormatting.CopyFrom(cellFormatting); 

headerRowFormatting.Font.Bold = true; 

headerRowFormatting.Font.Color = XlColor.FromTheme(XlThemeColor.Light1, 0.0); 

headerRowFormatting.Fill = XlFill.SolidFill(XlColor.FromTheme(XlThemeColor.Accent2, 0.0)); 


XlCellFormattingtotalRowFormatting = newXlCellFormatting(); 

totalRowFormatting.CopyFrom(cellFormatting); 

totalRowFormatting.Font.Bold = true; 

totalRowFormatting.Fill = XlFill.SolidFill(XlColor.FromTheme(XlThemeColor.Accent5, 0.6));


8. We'll create the header row by calling the IXlSheet.CreateRow method. We'll add three cells inside the header row and apply format settings specified in the previous step. 

using (IXlRowrow = sheet.CreateRow()) { 

       using (IXlCell cell = row.CreateCell()) { 

       cell.Value = "Region"; 

       cell.ApplyFormatting(headerRowFormatting); 

       } 

 

       using (IXlCell cell = row.CreateCell()) { 

       cell.Value = "Product"; 

       cell.ApplyFormatting(headerRowFormatting); 

       } 

 

       using (IXlCell cell = row.CreateCell()) { 

       cell.Value = "Sales"; 

       cell.ApplyFormatting(headerRowFormatting); 

       } 

}


9. It's now time to generate the data for this sales report...

string[] products = newstring[] { "Camembert Pierrot", "Gorgonzola Telino", "Mascarpone Fabioli", "Mozzarella di Giovanni" }; 

int[] amount = newint[] { 6750, 4500, 3550, 4250, 5500, 6250, 5325, 4235 }; 

for (inti = 0; i< 8; i++){ 

     using (IXlRow row = sheet.CreateRow()) { 

           using (IXlCell cell = row.CreateCell()) { 

                   cell.Value = (i< 4) ? "East" : "West"; 

                   cell.ApplyFormatting(cellFormatting); 

            } 

            using (IXlCell cell = row.CreateCell()) { 

                   cell.Value = products[i % 4]; 

                   cell.ApplyFormatting(cellFormatting); 

                   } 

            using (IXlCell cell = row.CreateCell()) { 

                   cell.Value = amount[i]; 

                   cell.ApplyFormatting(cellFormatting); 

            } 

     } 

} 


10. We'll now activate AutoFilter functionality for our data range.

sheet.AutoFilterRange = sheet.DataRange;


11. It's time to create the total row. To calculate the total sales amount, we'll pass the appropriate formula to the IXlCell.SetFormula method. Note that you can assign your formula as a string by using the XlFunc object for the most popular spreadsheet functions (Average, Max, Min, Sum, Subtotal, etc.), or construct a formula expression (cell references, operators, functions, etc) as needed.


The code below uses the XlFunc.Subtotal method to calculate subtotals for the cell range.

using (IXlRow row = sheet.CreateRow()) { 

       using (IXlCell cell = row.CreateCell()) 

              cell.ApplyFormatting(totalRowFormatting);  

       using (IXlCell cell = row.CreateCell()) { 

            cell.Value = "Total amount"; 

            cell.ApplyFormatting(totalRowFormatting); 

cell.ApplyFormatting(XlCellAlignment.FromHV(XlHorizontalAlignment.Right, XlVerticalAlignment.Bottom)); 

       } 

       using (IXlCell cell = row.CreateCell()) { 

                             // Add values in the cell range С2 through С9 using the SUBTOTAL function. 

            cell.SetFormula(XlFunc.Subtotal( 

XlCellRange.FromLTRB(2, 1, 2, 8),  

XlSummary.Sum, true)); 

            cell.ApplyFormatting(totalRowFormatting); 

       } 

}

12. In this final step, we'll complete the document generation process and close the output stream.

sheet.Dispose(); 

document.Dispose(); 

stream.Dispose();


With this brief introduction, I hope you can see the value of our new XL Export API and how you can quickly generate spreadsheet files in code. Once we ship v15.1, we'll post a link to this code in our Code Examples database.  

As always, we welcome your comments and feedback. Let us know what you think.


DevExpress TestCafe v15.1 now shipping

$
0
0

If you are a frequent visitor to the Download Portal on devexpress.com, you may already have noticed that we have published a new version of TestCafe, version 15.1. I am proud to announce that this is indeed the case: TestCafe v15.1 has been published and is now shipping.

TestCafe_v15_1_NowShippingTestCafe is the automated testing platform for next-gen web applications. Not only that, but unlike other web-testing solutions, you don’t have to install awkward plugins into your browsers in order to do testing; that’s so 20th century. TestCafe provides your QA teams with the tools to start testing any web app in any browser that supports HTML5. Even better, TestCafe is OS-agnostic: the browsers can be running on Windows, Mac, Linux, or mobile OSes like iOS and Android.

Over the past few months, we have been soliciting feedback from customers and testers on what they liked about TestCafe and what they thought was missing. Consequently, the responses have driven our enhancements to the product in v15.1 and I feel that the team has outdone itself with this release.

Automated Screenshot Capture (ASC). From v15.1 you can add the capability to capture a screenshot of the web app as part of a test. So, as a very basic example, you can capture the web view if an error occurs in the test: sometimes a picture really is worth a thousand words.

Enhanced Test Result View, Export Results. Sometimes just seeing the results of your tests isn’t enough, you need to analyze them in more detail. We’ve therefore improved the usability of the Results page by adding the ability to sort, group, and filter the results of your test runs. Not only that, but you can export the results of your tests in JSON, JUnit, or NUnit formats.

Extensive Assertion Failure Reports. The new Results tab includes additional information about assertion failures: the test code line that failed, the differences between actual and expected values, and even a screenshot using the new ASC feature.

Failing on a JavaScript Error. TestCafe now includes the ability to fail a test should a JavaScript error be detected in the page.

All in all, TestCafe v15.1 is a very worthwhile release. If you are already an active customer and using it right now, go to the Download Portal and get it. You certainly won’t regret upgrading. If you are designing and implementing web applications, consider the testing phase of your project and evaluate TestCafe right now.

WPF Report Designer - CTP (Coming soon in v15.1)

$
0
0

Our upcoming release will include the first community technology preview of our new Report Designer for WPF. This designer ships with many of the features found in its WinForms counterpart and is fully compatible with all WPF design methodologies.

The following is a brief summary of the features we'll ship in this CTP....

  • Integrated Print Preview capable of pixel perfect document rendering
  • Integrated Report Explorer, Field List and Property Grid
  • A full-featured design surface for editing banded report layouts
  • Support for all DevExpress Report controls
  • Native support for Multiple Document Interface (MDI)
  • Support for Snap Lines and Snap Grid
  • Support for DevExpress WPF themes
  • Undo/Redo support

WPF Report Designer

In this beta, the WPF Report Designer will have the following limitations:

  • No report or data source wizard
  • No dedicated Expression Editor
  • No Filter Editor
  • No support for end-user scripting

With that brief intro, let's show you how you'd get started with the control. To add the Report Designer to a form, you can use the following XAML sample code:

<Window x:Class="WpfApplication17.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        xmlns:dxwrd="http://schemas.devexpress.com/winfx/2008/xaml/wpfreportdesigner"

        xmlns:local="clr-namespace:WpfApplication17"

        Title="MainWindow" Height="350" Width="525">

    <Grid>

    <dxwrd:ReportDesignerControl x:Name="reportDesigner" DocumentSaved="reportDesigner_DocumentSaved"/>

    </Grid>

</Window>


To open and save a report from code behind:

using DevExpress.XtraReports.UI;

// ...

public MainWindow() {

   InitializeComponent();

    reportDesigner.OpenDocument(yourReport);

}

void reportDesigner_DocumentSaved(object sender, DevExpress.Xpf.WpfReportDesigner.ReportDesignerDocumentEventArgs e) {

    XtraReport savedReport = e.Document.SourceReport;

    // Put your custom logic to save a report here.

}


If using MVVM, you need to implement a view model that provides access to a target report and handle changes as show below. Please note that at this point in time, this option allows you to specify a single report against which the Designer can operate.

using DevExpress.Mvvm;

using DevExpress.XtraReports.UI;

// ...

publicclassMainViewModel : BindableBase {

    public MainViewModel() {

        report = newXtraReport1();

    }

    XtraReport report;

    publicXtraReport Report {

        get { return report; }

        set { SetProperty(ref report, value, () => Report, OnReportChanged); }

    }

    void OnReportChanged() {

        MessageBox.Show("Report Changed");

    }

}


Once this is completed, you will then bind to the view model’s Report property.

<Window x:Class="WpfApplication17.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        xmlns:dxwrd="http://schemas.devexpress.com/winfx/2008/xaml/wpfreportdesigner"

        xmlns:local="clr-namespace:WpfApplication17"

        Title="MainWindow" Height="350" Width="525">

    <Window.DataContext>

        <local:MainViewModel />

    </Window.DataContext>

    <Grid>

        <dxwrd:ReportDesignerControl x:Name="reportDesigner" SingleDocumentSource="{Binding Report, Converter={dxwrd:ReportDesignerDocumentSourceConverter}}" />

    </Grid>

</Window>


So there it is - our new WPF Report Designer. Tell us what you think about this new product...we want to hear your feedback. 

What's Right is Right and What's Left is Left (Coming soon in v15.1)

$
0
0

We previewed this feature on our Facebook page - so I'll keep it short and sweet (it's rather self-explanatory). v15.1 will introduce Right-To-Left (RTL) support across all major DevExpress WinForms controls including...

  • Charts
  • Grid controls (Grid, TreeList, Pivot Grid, Vertical Grid and Property Grid)
  • Data Editors and Controls (Range Control, Rating Control, etc.)
  • Ribbon, Menus and related controls (BackstageView, AppMenu, еtс.)
  • Layout Control and layout containers (TabControl, GroupControl, etc.)
  • Navigation Controls (Navigation Bar, Tile Control, etc.)
  • Application UI Controls (Docking, DocumentManager, etc.)

And yes, this is one of those features that's been a long time coming. We thank you for your patience.

DevExtreme HTML5 Widgets - Scheduler & Calendar (Coming soon in v15.1)

$
0
0

Check out the new DevExpress HTML5 Scheduler widget that's coming out in the DevExtreme v15.1 release:

DevExpress DevExtreme HTML5 Scheduler Widget

That's the dark theme but there's a light theme too.

Powerful HTML5 Scheduler

The new Scheduler widget is a client-side JavaScript widget which provides powerful scheduling features to manage your appointments and resources.

Features

  • group appointments by resources (screenshot)
  • recurring appointments
  • use drag-drop to change appointment day/time
  • re-size the appointment change duration (works on touch too!)
  • all-day appointments support
  • bind to any DevExtreme data source with field mapping
  • 4 built-in views: day, week, work week, month
  • appointment coloring and templates
  • date navigator (arrows + popup calendar)
  • Accessibility features
    • RTL (right-to-left)
    • Web-ARIA
    • keyboard support

The new HTML5 Scheduler widget allows your end-users to create and manage appointments from a local or remote storage to be scheduled and then displayed in a timetable. With this widget, you can create different types of appointments - recurrent/nonrecurrent, time-limited/all-day, with/without resources. The appointments can be shown using one of predefined views - 'day', 'week', 'work week' or 'month'.

AngularJS, jQuery, KnockoutJS, etc.

The new Scheduler widget has support for AngularJS (directive), jQuery, and KnockoutJS. In fact, all DevExtreme widgets provide support for the popular JS frameworks mentioned previously. And you can bind to local or remote data.


Calendar Enhancements

The DevExtreme Calendar widget has been enhanced with new features for the v15.1 release:

  • New quarter and year views are added
  • Calendar cells can be displayed using a custom template
  • Calendar size can be specified in widget configuration

Register for v15.1 webinar

To see all the new features coming out for the v15.1 release, sign up for the "What's New for DevExtreme (v15.1)":

Click here to register

I'm preparing to do a fantastic presentation and I hope to see you in the webinar.

Scheduler images

Browse the screenshot gallery of the new DevExtreme Scheduler widget and then drop me a line below with how you will use this new widget in your websites:

Thanks!


Your Next Great .NET App Starts Here

Year after year, .NET developers such as yourself consistently vote DevExpress products #1.

Experience the DevExpress difference for yourself and download a free 30-day trial of all our products today: DevExpress.com/trial (free support is included during your evaluation).


ASP.NET Report Designer - Data Source Wizard & Filter Editor (Coming soon in v15.1)

$
0
0

In our upcoming release (yeah, I know, we have a lot of new stuff coming your way), we'll introduce a full-featured Data Source Wizard for our ASP.NET Report Designer - easily accessible from the Report Designer's main menu.

ASP.NET Data Source Wizard

Like its WinForms counterpart, the ASP.NET Data Source Wizard allows users to construct complex queries - with support for joins, query parameters, data source level filtering and the ability to bind to stored procedures with specified parameters. Users can either write a SQL query manually or construct it visually via our ASP.NET Query Builder.

ASP.NET Query Builder

As you might expect, our Query Builder generates a SQL string, which can be further edited when necessary.

ASP.NET SQL Data Source Wizard


To avoid possible security issues, the new query builder cannot use connection strings specified in the application’s Web.config file by default. You can pre-define a set of connection strings for your end-users by implementing a custom connection strings provider. Alternatively, you can explicitly permit the query builder to use connection strings from Web.config (you know the risks, so think through your implementation carefully).


ASP.NET Filter Editor

Among other usability enhancements we'll ship in this release is the debut of the DevExpress ASP.NET Filter Editor. In previous versions, in order to filter report data, users had to manually enter the required filter string. With this update, your users can launch the Filter Editor by clicking the ellipsis button on the report’s Filter String property - available in the Data properties group and the report’s Actions list.

ASP.NET Filter String

The Filter Editor's UI is straightforward and simplifies the construction of complex filtering conditions. To improve readability, the Filter Editor arranges sub-expressions into groups based on logical operators. Thus, the entire expression is presented as a tree, where each node can be edited separately.

ASP.NET Filter Editor


So what do you think? Do you see yourself using the Data Source Wizard and Filter Editor?


ASP.NET AJAX Control Toolkit - v15.1.2 - Nuget, bug fixes, and more

$
0
0

A new release of the ASP.NET AJAX Control Toolkit, v15.1.2, is now available. We've included bug fixes, nuget install package, more documentation, VS2015 RC support, and more!

ASP.NET AJAX Control Toolkit v15.1

Click the download button above and the get the latest bits.

(If you missed news about the latest v15.1 ASP.NET AJAX Control Toolkit release then please read this helpful blog post.)

v15.1.2 Includes:

1. Nuget v15.1.2

A Nuget package is now available as an alternative to the installer:

ASP.NET AJAX Control Toolkit Nuget package

2. Bug fixes

  • Item 27427 - MaskedEditExtender's ClearMaskOnLostFocus does not work
  • Item 27771 - ModalPopupExtender error
  • Item 27775 - Tab Container in 15.1
  • Item 27776 - AutoComplete OnBlur Issue
  • Item 27777 - System.Reflection.AssemblyMetadataAttribute is not in mscorlib in 4.0
  • Item 27780 - stylesheets (via CDN) not loaded via HTTPS
  • Item 27781 - Bundling throws error "Cannot use a leading .. to exit above the top directory."
  • Item 27794 - MaskedEditExtender: backspace not working in FireFox
  • Item 27809 - ValidatorCalloutExtender after Postback
  • Item 27823 - 'HtmlEditor.ToolbarButtons.RemoveLink.debug.js' embedded error
  • Item 27827 - CalendarExtender parse a date value as NaN in IE8
  • Item 27831 - Version 15.1 Issue with Telerik UI for ASP.NET AJAX controls
  • Item 27840 - Visual Studio Not Found when installing with VS 2015 RC Community

3. Sample site updates

  • Microsoft.Web.Infrastructure dependency removed from Web.config
  • Microsoft.AspNet.ScriptManager.MSAjax removed from packages
  • Solution file made compatible with Visual Studio 2010

4. Installer updates

The excellent DevExpress installer for ASP.NET AJAX Control Toolkit has also been updated:

  • Fixed detection of Visual Studio 2015 RC
  • Fixed the way installer determines running Visual Studio
  • Fixed installer crash on .NET 4.0
  • Added installation logging (log files are saved to %LocalAppData%\Temp)
  • AJAX Control Toolkit main assembly (AjaxControlToolkit.dll) is now installed to User Documents (“ASP.NET AJAX Control Toolkit\Bin” subfolder)

5. Documentation

We've also added helpful documentation articles on the CodePlex site:

Feedback

Get the latest ASP.NET AJAX Control Toolkit v15.1.2 release and let us know your feedback by reporting it here.

How to upgrade to v15.1.2

Please take a look at the 'How to upgrade to v15.1 release' article to see how to migrate your existing ASP.NET AJAX Control Toolkit projects to the new v15.1.2 release.

Try DevExpress ASP.NET

We’d like to thank you for installing the DevExpress Edition of the AJAX Control Toolkit and look forward to your feedback as you begin its use.

When we took over the fabulous ASP.NET AJAX Control Toolkit, our goal was to reach those web developers who want to use great web user interface controls for their web projects and DevExpress ASP.NET provides that and much more.

Try the free DevExpress 30 day trial.

Email: mharry@devexpress.com

Twitter: @mehulharry


Your Next Great .NET App Starts Here

Year after year, .NET developers such as yourself consistently vote DevExpress products #1.

Experience the DevExpress difference for yourself and download a free 30-day trial of all our products today: DevExpress.com/trial (free support is included during your evaluation).

ASP.NET Reporting - Script Editor (Coming soon in v15.1)

$
0
0

One of the most requested features for our ASP.NET Report Designer has been the addition of scripting support.

I'm happy to let you know that v15.1 will ship with a built-in script editor - giving your users a convenient way to modify the behavior of report controls, bands or the report itself by using one of the following languages:

  • C#
  • Visual Basic .NET
  • JScript .NET

 
Scripting language is independent of the language used to create the report and can be specified for a report using the Designer's property grid.

ASP.NET Report Designer Scripting Language
 
The Report Designer's Script Editor is capable of syntax highlighting and autocompletion for the selected language. In addition, it provides access to every report element event handler and can generate code templates for these handlers in the scripting language being used.

ASP.NET Report Designer - Syntax Highlighting
 
The Script Editor also supports code validation. When you click the Validate button inside a report script, all errors are clearly marked with a red icon. Hover over the icon and you'll see what went wrong...

ASP.NET Report Designer - Code Validation
 

We love your feedback - tell us what you think. Is scripting something you'll introduce in your next web application?

WinForms Navigation - Accordion Control (Coming soon in v15.1)

$
0
0

Webster defines an Accordion as:

a portable keyboard wind instrument in which the wind is forced past free reeds by means of a hand-operated bellows

DevExpress defines an Accordion as:

A new WinForms Control that extends the capabilities found in our existing XtraNavBar control. The Accordion Control allows you to create a full-featured NavBar with multiple items (actions). Items can be combined into groups. Groups can contain nested groups so you can create an advanced hierarchical navigation menu.

Features include:

  • Unlimited number of hierarchy levels
  • Items can display images and text
  • Context buttons
  • Item headers can display custom controls
  • Item selection
  • Group expansion/collapse animation (one or multiple groups can be expanded simultaneously)
  • Built-in search

WinForms Navigation - Accordion Style NavBar


Both Accordions are cool but only one runs on Windows. Tell us what you think - is this something you might use in your next WinForms app?

WPF Tab Control - Create a Web Browser-Inspired UI (Coming soon in v15.1)

$
0
0

With our upcoming release, we've extended the capabilities of the DevExpress WPF Tab Control so you can create apps that emulate the look, feel and behavior of modern web browsers. The animation below should give you a good sense as to what can be built with this update.  

WPF Tab Control - Browser Inspired Tabbed UI

The new DXTabbedWindow control is designed to be used in conjunction with DXTabControl.  DXTabbedWindow supports two Tab Control representation modes: Normal and Compact. Tab Control appearance can be customized by setting the DXTabItem.BorderColor and DXTabItem.BackgroundColor properties. And with about 20 lines of code you can override templates and generate a completely new appearance...


Tell us - do you see yourself using this new WPF Tab Control and if so how? We'd love to know!

TestCafe v15.1 What’s New Webinar

$
0
0

tc

 

 

The one thing I found when I was learning about libraries and frameworks was that it was much easier to watch someone use it than have to read about it. That's also true of TestCafé, even though we've made it a lot easier to hit the ground running over the past couple of releases.

Join me Tuesday for a look at what has been introduced in the latest release including;

  • Automated Screenshot Capture
  • Enhanced Test Results View
  • Extensive Assertion Failure Reports
  • Fail on JavaScript Error

Click here to Register today.

WinForms SDI Navigation Frame (Coming soon in v15.1)

$
0
0

Last year, we released a number of Outlook-inspired demos - demos that helped illustrate how you can use our WinForms UI Controls to replicate the look, feel and experience of Microsoft Outlook (for data centric business apps).

In this release, we've extended our WinForms product line to include an SDI Navigation Frame...a library that's been built for those who prefer a Single Document Interface and are focused on building solutions that fully replicate Outlook's UI.

The new WinForms Navigation Frame simply owns a collection of pages, of which only a single page can be active at any point in time. As you would expect, pages can host any content...from panels and group boxes to user controls. Like Outlook, Page navigation incorporates elegant animation effects as seen below...


WinForms SDI Navigation Frame

We'd love to get your feedback on this new product - how likely are you to use it in your app? Which do you prefer...SDI or MDI? Please let us know!


WinForms Ribbon Control - Office Universal UI (Coming soon in v15.1)

$
0
0

A couple of release cycles ago, we introduced a new Ribbon Style to replicate the UX that shipped as part of Office for iOS. In v15.1, we'll introduce our "Office Universal" Ribbon style...

WinForms Ribbon - Office Universal Style

If you're not familiar with this UX, take a moment to search online as there are a number of published articles describing the rationale behind the change - including this on ZDNet.

As you can see in the image above, this new style is much simpler than the Ribbon introduced a number of years ago - all ribbon items are arranged across a single row. No page groups are available and the Application Menu Button used to invoke the Backstage View is now displayed as a standard page.

Like all of the features we're introducing to our subscriptions, we'd love to get your feedback. Is this new Ribbon style something you will introduce in your next WinForms project? Let us know! 

DevExpress Icon Library - The Number of Icons Keeps Growing

$
0
0

Here's something I've never really discussed on this blog - our Icon Library. Since we introduced it a year or so ago, it's matured quite a bit and now includes a ton of beautiful icons you can use royalty-free (assuming you have an active DevExpress Subscription) in your next software project.

The DevExpress Icon Library is included in all our subscriptions - so whether you own Universal, DXperience or a single platform subscription, you'll have access to all the icons we ship.

v15.1 brings with it icons we created last year for our WinForms and WPF Outlook-inspired DevAV demos - these icons were patterned after those shipping in Outlook 2013 and many of you could not wait to get your hands on them...


DevExpress .NET Icon Library


It’s Microsoft TechDays next week. Where? The Hague!

$
0
0

Thursday and Friday next week (that’s the 28th and 29th May to you), DevExpress will have a booth at Microsoft TechDays at the World Forum in Den Haag. We were there last year as well and liked it enough to come back this year as a Silver Sponsor! Present will be Don Wibier and myself doing the technical stuff – essentially a repeat of the Techorama dynamic from last week – and John Martin will be in charge of giving out the swag. And, well, in charge of us two also. Seriously, it was great fun last year and we’re excited to be back!

So, if you’re going to be there in The Hague, please do come over to the DevExpress booth. We’ll be happy to talk about our current product line and show off what’s coming up in v15.1. Also, given the recent news out of Build, you’ll get an excellent opportunity to ask us what we think about the possibilities for new features that face us in the second half of the year. You know: Windows Universal Apps, Windows 10, Visual Studio 2015, ASP.NET 5, etc, etc. Plus, remember that Don can speak Dutch like a native (because he is)so you can chat away with him and I’ll just stand there with a fixed smile and hand you a t-shirt. Mind you, Don is presenting a couple of sessions (“Breaking Bad: you CAN make Fast Web Pages” on Thursday at 15:00, and “Consuming Azure Mobile Services in a JavaScript App” on Friday at 13:30), so I’ll be taking charge of the booth during those hours.

Oh, and Rachel tells me that we will have a raffle as well, maybe even one each day. So you just have to come to the booth and grab a ticket. Maybe you’ll be the winner!

See you Thursday!

WinForms and WPF Word Processing - Rich Text Editor Layout API (Coming soon in v15.1)

$
0
0

With v15.1, we'll introduce a new Layout API for our WinForms & WPF Rich Text Editor - objects, properties and methods that allow you traverse the document layout tree and access layout elements. The Layout API is located in the DevExpress.RichEdit.v15.1.Core.dll assembly, and is available for both WinForms and WPF Rich Editors, as well as for Rich Edit Document Server.

This new API can be used to control all aspects of document layout. In previous versions, the DevExpress Rich Edit core gave access only to objects related to the document model - so that you have more control over the logical structure of the document. The document’s visual appearance, however, was not available...even for analysis. To understand at which page location and on which line a particular word is located was a problem without an easy solution. With the new Layout API all of this changes dramatically....

WinForms & WPF Rich Text Editor Layout API

Use Case – Pagination

Let's look at a simple use-case...that the first document table must always be on the second page. When a document is modified, we need to check that this requirement is met and alert the user if it has not. The code snippet below uses the Layout API to address this issue.

void CheckLayout()

{         

   DevExpress.XtraRichEdit.API.Native.Table table = richEditControl1.Document.Tables.First;

    if (table != null)

    {

        // Obtain the layout element related to the table.

        LayoutTable ltable = richEditControl1.DocumentLayout.GetElement<LayoutTable>(table.Range.Start);

        // Obtain zero-based page index of the page containing the layout element.

        int pageIndex = this.richEditControl1.DocumentLayout.GetPageIndex(ltable);

        // Check whether the layout element is located at the second page.

        if (pageIndex != 1)

            MessageBox.Show("The first table is not on the page 2. Review pagination.");

    }

}


Technical Breakdown...

The document layout model in the Layout API is a hierarchical tree-like structure. Each node in a tree is an instance of a class which implements a base interface named LayoutElement. A class representing a specific element is named after the element in question with the  addition of the prefix Layout or the suffix Box. There are LayoutPage, LayoutHeader, LayoutPageArea, LayoutFooter, ... BookmarkBox, PlainTextBox etc. A layout element may also include a related range in the document.

The main entry point of the Layout API is the RichEditControl.DocumentLayout property. This property provides access to the DocumentLayout object containing basic properties and methods for work with the hierarchy of document layout objects. After any change in text or formatting, the document's layout is recalculated and the DocumentLayout.DocumentFormatted event fires. You can call the CheckLayout() method shown above in the DocumentFormatted event handler to validate changes.

The DocumentFormatted event handler is running in UI thread. To avoid concurrency issues, always execute the CheckLayout method asynchronously in UI thread using the RichEditControl.BeginInvoke method, as illustrated in the following code:

richEditControl1.BeginInvoke(newAction(() =>

{

    CheckLayout();

}));


How to Start...

To obtain access to elements which constitute the document’s layout, create a Visitor object (object that implements a Visitor pattern) and navigate to a node of the document layout tree. Subsequently your visitor will traverse down the tree and visit every child node. For each node it may call a specific method. At this time, you can only get information on the visited node. However, future API versions will allow you to hide the element, change the order in which elements are rendered or draw custom graphics.


The Visitor object must be a descendant of the DevExpress.XtraRichEdit.API.Layout.LayoutVisitor abstract class. For each layout element the LayoutVisitor class has a virtual method, thus the descending class must override this method to obtain access to a particular element type. The following code is a visitor class which gets access to every line of text in the main body of the document.  It then prints visual coordinates and document position on which the line starts. A line in the document is a LayoutRow object in terms of Layout API. The VisitRow method will be automatically called for each line.


    classMyDocumentLayoutVisitor : DevExpress.XtraRichEdit.API.Layout.LayoutVisitor

    {

        protectedoverridevoid VisitRow(LayoutRow row)

        {

            if (row.GetParentByType<LayoutPageArea>() != null)

               System.Diagnostics.Debug.WriteLine("This row is located at X: {0}, Y: {1}, related range starts at {2}",

                    row.Bounds.X, row.Bounds.Y, row.Range.Start);

 

        // Call the base method to walk down the tree to the child elements of the Row.

        // If you don't need them, comment out the next line.

        base.VisitRow(row);

        }

    }

To start traversing the tree, pass the node (in this situation, it is the document’s page, the LayoutPage object) of the document’s layout tree to the Visit method of the MyDocumentLayoutVisitor class.

Summing up, the resulting code for calling the visitor looks as follows:

    richEditControl1.DocumentLayout.DocumentFormatted += DocumentLayout_DocumentFormatted;

        // ...

        privatevoid DocumentLayout_DocumentFormatted(object sender, EventArgs e)

        {

            richEditControl1.BeginInvoke(newAction(() =>

            {

                int pageCount = richEditControl1.DocumentLayout.GetFormattedPageCount();

                for (int i = 0; i < pageCount; i++)

                {

                    MyDocumentLayoutVisitor visitor = newMyDocumentLayoutVisitor();

                   visitor.Visit(richEditControl1.DocumentLayout.GetPage(i));

                }

            }));

        }

Example of the Visitor Approach

In the XtraRichEdit Layout API demo, the document layout structure is visualized by populating aTreeView control with layout elements. Clicking a node selects the related document range. The application window looks as follows:

WinForms & WPF Rich Text Editor Layout API Demo
 
The selected node is the ParagraphMarkBox element located on the first line (element LayoutRow) of the main page area (element LayoutPageArea). The main page area is located on the third page (element LayoutPage) of the document.



15.1 Launch Webinar Week!

$
0
0

It’s that special time of year, right as summer starts…that’s right, it’s DevExpress launch time and that means lots of webinars coming all next week! You can register here for all of them now. As usual there is a lot to cover across all platforms.

And the whole team is in it to win it! Hear from Julian, Paul, Mehul, Don, Mark and, of course, yours truly. Find out what’s new and ask any questions you might have live!

Of course, if you can’t make it live, you should still register and we’ll send you all of the recordings to watch at your convenience.

If you have any questions about our 15.1 Launch webinars or webinars in general, feel free to email me at amandac@devexpress.com.

Until next week!

Viewing all 2400 articles
Browse latest View live