Search This Blog

Showing posts with label DevExtreme. Show all posts
Showing posts with label DevExtreme. Show all posts

Wednesday, March 8, 2017

Preview of toast notifications using a platform-agnostic method in XAF v16.2.5 - YOUR FEEDBACK IS NEEDED!!!

I am still forcing myself to go to sleep after watching an unreal football drama in Barcelona, so I am writing this short blog post at night.
Besides Visual Studio 2017 official support, XAF v16.2.5 delivers a small gem, which I cannot hide from you too long. Remember that this is an early preview of the functionality we hope to officially release by v17.1 and which is have polished in the coming 2-3 months. So, your feedback is welcome, as always!

Typical usage

Let's modify the platform-agnostic Controller from our demo (C:\Users\Public\Documents\DevExpress Demos 16.2\Components\eXpressApp Framework\SimpleProjectManager\CS\SimpleProjectManager.Module\Controllers\ProjectTaskController.cs) by adding the Application.ShowViewStrategy.ShowMessage call at the end of the Execute event handler:
...
            markCompletedAction.Execute += (s, e) => {
                IObjectSpace viewDataContext = View.ObjectSpace;
                foreach(ProjectTask task in e.SelectedObjects) {
                    task.EndDate = DateTime.Now;
                    task.Status = ProjectTaskStatus.Completed;
                    viewDataContext.SetModified(task); // Mark the changed object as 'dirty' (only required if data properties do not provide change notifications).
                }
                viewDataContext.CommitChanges();
                //viewDataContext.Refresh(); // Optionally update the UI in accordance with the latest data changes.
                Application.ShowViewStrategy.ShowMessage(string.Format("{0} task(s) have been completed!", e.SelectedObjects.Count), InformationType.Success, 4000, InformationPosition.Top);
            };
...
Now, let's start the Windows and Web apps, select a few uncompleted tasks in the ProjectTask ListView and execute the Done! command from the menu.

Result in the UI for various platforms

Web
A nice notification window is managed using the dxToast widget (invoked via the  DevExpress.ui.notify method) from our DevExtreme HTML5/JavaScript library:



Wednesday, June 1, 2016

How to: Use DevExtreme Widgets in an XAF Application (New KB Article and Example)

I wanted to advertise the new XAF learning materials we have just published for the v15.2.10 version we released today:

T381904: How to display the dxChart widget in an XAF  view (KB Article)
T380965: How to: Use DevExtreme Widgets in an XAF Application (Code Example)

We have been using a similar approach in our Web ReportsV2 and Maps modules, and I hope you find this documentation helpful as well.

As always, my team and I look forward to hearing your thoughts on each of these improvements in comments to this blog or via the https://www.devexpress.com/Support/Center/Question/Create service.