Breadcrumb file System with initial directory

Ribbon for WPF Forum

Posted 7 months ago by Procam
Version: 24.1.2
Avatar

Hello, I am using your Breadcrumb File System control from the sample app:
\Actipro Software\WPF-Controls\v24.1.2\SampleBrowser\ProductSamples\NavigationSamples\QuickStart\BreadcrumbFileSystem\MainControl.xaml

My question is if there is some way how to set an initial directory, not to display always "My Computer", but e.g. "C:\Work\MyStuff", maybe in the WindowLoaded event?

Comments (2)

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

This kind of code in the constructor of MainControl seems to work right after InitializeComponent:

var trail = ConvertItemHelper.GetTrail(myComputer, @"C:\Windows");
if (trail != null)
	SelectItem(treeView, trail, 0);

That should show the path in the control and expand out the tree.


Actipro Software Support

Posted 7 months ago by Procam
Avatar

It works.

Thanks a lot!

The latest build of this product (v24.1.4) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.