Breadcrumb file System with initial directory

Ribbon for WPF Forum

The latest build of this product (v24.1.2) was released 3 months ago, which was before this thread was created.
Posted 23 days 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 23 days 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 22 days ago by Procam
Avatar

It works.

Thanks a lot!

Add Comment

Please log in to a validated account to post comments.