Search This Blog

Showing posts with label template. Show all posts
Showing posts with label template. Show all posts

Tuesday, March 28, 2017

Filtering - How to search objects within ListPropertyEditor or enabling the standard FullTextSearch Action for nested ListView

Just wanted to repost a nice tip from the old SC ticket, which I updated today:

By default, the standard FullTextSearch Action is mapped to the "FullTextSearch" category or Action Container that is physically present in the main, detail and lookup control templates. Historically, it is missing in the nested frame template, which is typically used for ListPropertyEditor, DetailPropertyEditor or DashboardViewItem, mainly not to overload their toolbar with a large text box.

If you still need full text search functionality in nested frame templates, you can consider the following solutions:

1. Create a custom nested frame template as per the Template Customization. article and manually add the "FullTextSearch" action container into it. This solution appears to be the most difficult from the implementation and further maintenance points of view.
2. Customize the default mapping of Actions to the default Action Containers in the Application Model. To do this, invoke the Model Editor and follow this video:


Take special note that It is important to make a copy of the Action definition and place it into the Action Container (e.g., Link), which is NOT present in the main, detail and lookup control templates to avoid duplication of Actions in the UI:


This solutions appears to be the easiest one from all points.

3. Enable native filtering features of the underlying grid, tree and other data bound controls used in nested ListView. For instance, the Find Panel or Auto Filter Row features also provide very good filtering experiences many of your clients will love.  The only disadvantage (which can be noticeable in advanced scenarios only) is that with the standard FullTextSearch Action you can provide common customizations for root and nested ListView using the events and other extensibility points of our FilterController, while for the native control features, you will likely have to implement platform-dependent customizations.

Thursday, October 13, 2016

How to map Actions to a certain RibbonPage and RibbonGroup via the Application Model

This is my second post about advanced ribbon menu customizations in XAF WinForms apps. This time I want to repost two possible solutions for the aforementioned task after reviewing and updating the code of one good (and never old - Hi, Noxe!:-)) customer recently. This work was done after an interview about my Simplifying customization of Action controls - YOUR FEEDBACK IS NEEDED! post. Take a look at it if you haven't yet. 


Long story short, refer to the https://www.devexpress.com/kb=S134617 ticket and find two possible Controller implementations. Even though the first one (RibbonFromModelWithEventController.cs) requires more code to implement, I like it more, because it does not require you to create an Action Container node manually in the Model Editor. With the first one, you just specify the TargetRibbonPage and TargetRibbonGroup properties for a required Action under the ActionDesign node and you are done:


In any case, I suggest you play with both implementations and watch the attached video to determine what is more suitable for you. I look forward to hearing from you in the comments section or in the Support Center, as always.


I do not want to focus much on the Controller code itself, just want to note that there we extended the standard IModelAction interface corresponding to the ActionDesign | Action node and then handled these new options in our code. This is one of my favorite Application Model features, which is also truly loved by our customers. In fact, everything you see in our framework is built using the same simple principle: you have certain UI metadata or settings store and have some Controllers in modules that create/customize visual controls accordingly. To learn more about this, refer to the Concepts > Application Model > Extend and Customize the Application Model in Code article in our online documentation. This is a really cool feature and it can help you create a more reusable code.

Wednesday, October 5, 2016

How to place all nested View commands into the main ribbon and activate them based on the selected layout tab

My next two posts will be devoted to advanced ribbon menu customizations in WinForms, which become much easier to implement with the introduction of the new Ribbon and Standard templates (WinApplication.UseOldTemplates = False) back in v14.2 and also API changes in the recent XAF versions.

The current post is about mapping ALL Actions from the nested Frame toolbar into the main ribbon menu by creating a separate page. It is planned that when you activate a certain nested ListView within a layout tab, its related View commands will be activated in a separate ribbon page as well (context-dependent commands). This somewhat exotic approach was requested a few times by different customers and is likely dictated by users who have a habit of using only the main ribbon menu, i.e., without moving the mouse to the bottom context.

The two pictures showing how it was before and after making necessary code changes + a video showing everything in action are worth a thousand words in communicating this effect in the real app.
Context-dependent Actions in ribbon

Thursday, April 21, 2016

A new OfficeNavigationBar-based ribbon template for Windows desktop SDI - YOUR FEEDBACK IS NEEDED!

We are considering the addition of the new WinForms SDI ribbon template with the OfficeNavigationBar component on it in v16.1, so I wanted to share our initial thoughts on it and also ask a few questions. First, this is approximately what it would look like in action: 


Expectedly, there will also be animated transitions while switching the screens (like in our WinForms Outlook Inspired App demo). Pixel-hunters might also notice there are less borders between the navigation panel and the view site. The latter is possible because the navigation control is no longer hosted inside a dock panel (so no floating is available as well), which confused application end-users in the past and caused other difficulties. As a result, we hope the whole UI is more clean and easy to read than it was before.

Tuesday, May 20, 2014

RE: WinForms Outlook-Style Navigation Controls (Coming soon in v14.1)

I am writing this post in response to the recent blog from our WinForms team: https://community.devexpress.com/blogs/thinking/archive/2014/05/09/winforms-outlook-style-navigation-controls-coming-soon-in-v14-1.aspx. There were a lot of comments on whether it is possible to have this feature in XAF. Well, it is possible and this integration is quite easy if you really need it. After all, an XAF app is nothing more than a standard WinForms or ASP.NET Web Forms app, which means that the same approaches can be applied to develop it. The XAF documentation describes most of the integration scenarios and our support team is also ready to help if you are in a need for something special.

Another good news is that here, it is all standard and you just need basic WinForms development skills and a minute or two to follow the How to: Customize a Windows Forms Template article from the XAF's documentation.


Caution: I was not planning on replicating Outlook 2013 by any means here, but just experimented with alternative navigation controls. I also removed the status bar, placed the navigation bar under the main view site and did not use tree-like navigation in groups on purpose, because it was not very suitable just for this simple demo app. Replicating the Office 2013 UI requires additional customizations of templates and other UI elements, and is not covered in this post.