Вы находитесь на странице: 1из 2

T216455 - Search Navigation item on Quick Access Toolbar | DevExpress Support Center

25-May-15
Log In

Products

Free Trials & Demos

SUPPORT CENTER

Buy

Support
Tickets

My Account
Examples

About Us
Localization

FAQ

Submit a Support Ticket

Type search string and press Enter

Search Navigation item on Quick Access Toolbar

solution

Training Events

ID:
T216455

Tags: .NET, Frameworks (XAF & XPO), eXpressApp Framework

Created O n :
3/6/2015 1:12:16 PM

Mo dified O n :
3/10/2015 2:48:39 PM

Ivn P. 3 months ago

B u ild:
v2014 vo l 1.7 / 24-Sep -2014

Hi,
I'm trying to add a new action on the Quick Access Toolbar. It will be a textbox to search inside my Navigation control items. I attach a sample of what I'm
trying to do.

O p eratin g System:
W in do w s 8.1 x64
IDE:
Micro so ft Visu al Stu dio 2013

Does XAF have a simple way to accomplish this task?, Do you think my proposal is possible?
Thank you in advance.

Related Questions
navigation-items-search.png
Search in g mu ltip le tab les

Leave a Comment

Ho w to make th e "To o lB ar"


Actio n Co n tain erHo lder w rap to
p reven t u n n eeded h o rizo n tal
scro llb ars sh o w in g

1 Solution
0

Navigatio n U sin g Men u in ASP.Net


XAF

Alexey (DevExpress Support) 3 months ago

Hello Ivn,
Yes, it is possible to implement such a control.
You can create a WindowController, add ParametrizedAction and set the QuickAccess property to true. As a result, the Action will be added to the Quick
Access Toolbar.
After that, you can use the How to: Customize Controls Associated with an Action approach to customize the Action's control or the How to create a custom
action type with a custom control (BarCheckItem), associated with it approach to create a custom Action to display a drop-down control. For example, you
can use RepositoryItemLookUpEdit to display a drop-down control.
You can use approaches described in the How to show a window ( View ) representing data in XAF article to show View via code.
Please let me know if you need further assistance.

W h at co u ld cau se actio n s to n o t
sh o w u p in an XAF ap p licatio n ?
Actio n Co n tain erHo lder can 't n o t b e
w rap p ed
Sh o w Mo re

Ivn P. 3 months ago


Hi Alexey, th an k yo u fo r an sw erin g.
O k I see, b u t h o w can I h ave all th e item actio n s fro m my Navigatio n co n tro l?
It w ill b e n ice if w e can lau n ch th e even ts o f th ese actio n s, o th erw ise w e n eed to create all o p tio n s man u ally an d attach th e sh o w a XAF
w in do w even t, w h ich is n o t su itab le.
O n th e o th er h an d, is it p o ssib le to filter Navigatio n co n tro l items?

Alexey (DevExpress Support) 3 months ago


Yo u can access Ap p licatio n Mo del in co de th ro u gh th e Ap p licatio n .Mo del p ro p erty, iterate th ro u gh all n avigatio n items an d co llect th e
requ ired in fo rmatio n .
On the other hand, is it possible to filter Navigation control items?
Yes, it is also p o ssib le. I reco mmen d yo u review th e Ho w to allo w search in g n avigatio n items ? th read, w h ich illu strates h o w to imp lemen t it.
Also it is p o ssib le to en ab le a defau lt TreeList co n tro l search fu n ctio n ality.
See also :
Ho w to : Access Navigatio n Co n tro l

Ivn P. 3 months ago


I can n o t see Q508416 lin k: "Yo u can 't view th is ticket"

Alexey (DevExpress Support) 3 months ago


It seems stran ge to me. Please try o p en it later.
Also h ere is u sefu l co de sn ip p et:

public class NavBarViewChangingController : WindowController {


private NavigationActionContainer navActionContainer;
protected override void OnActivated() {
base.OnActivated();
Window.ProcessActionContainer += Window_ProcessActionContainer;
}
protected override void OnDeactivated() {
Window.ProcessActionContainer -= Window_ProcessActionContainer;
UnsubscribeFromContainerEvents();
navActionContainer = null;
base.OnDeactivated();
}
void Window_ProcessActionContainer(object sender, ProcessActionContainerEventArgs e) {
UnsubscribeFromContainerEvents();
if (e.ActionContainer is NavigationActionContainer) {
navActionContainer = e.ActionContainer as NavigationActionContainer;
SubscribeToContainerEvents();
SetupNavBar();
}
}
private void SubscribeToContainerEvents() {

https://www.devexpress.com/Support/Center/Question/Details/T216455

1/2

T216455 - Search Navigation item on Quick Access Toolbar | DevExpress Support Center

25-May-15

if (navActionContainer != null) {
navActionContainer.NavigationControlCreated += navigationControlCreated;
}
}
private void UnsubscribeFromContainerEvents() {
if (navActionContainer != null) {
navActionContainer.NavigationControlCreated -= navigationControlCreated;
}
}
private void navigationControlCreated(object sender, EventArgs e) {
SetupNavBar();
}
private void SetupNavBar() {
if (navActionContainer != null &&
navActionContainer.NavigationControl is TreeListNavigationControl) {
TreeListNavigationControl treeListNavigationControl = (TreeListNavigationControl)navActionContainer.NavigationControl;
treeListNavigationControl.OptionsBehavior.AllowIncrementalSearch = true;
}
}
}

Leave a Comment

DEVEXPRESS
About Us
News
Our Awards
Upcoming Events
User Comments
Case Studies
Reviews and Publications
Licensing
Purchasing
MVP Program
Contact Us
Logos

.NET CONTROLS
WinForms
ASP.NET
MVC
WPF
Silverlight
Windows 8 XAML
CROSS PLATFORM
Reporting
Document Automation

MOBILE
DevExtreme Mobile

HTML5 JS WIDGETS
DevExtreme Web

ENTERPRISE TOOLS
Report Server
Analytics Dashboard

iOS 7
DataExplorer

FRAMEWORKS
eXpressApp Framework
CODE-DEBUG-REFACTOR
CodeRush for Visual Studio

FUNCTIONAL WEB TESTING


TestCafe
DELPHI C++BUILDER
VCL

SUPPORT
Search the Knowledge Base
My Questions
Code Examples
Getting Started
Demos
Documentation
Blogs
Training
Webinars
Current Version/Build
Version History

FOLLOW US
If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business


Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance
HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether
using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you
build and deliver your best in the shortest time possible.

Your Privacy - Legal Statements

https://www.devexpress.com/Support/Center/Question/Details/T216455

Copyright 1998-2014 Developer Express Inc.


All trademarks or registered trademarks are property of their respective owners

2/2

Вам также может понравиться