Hi
I wish to set the RootLocation item's Text property to a folder which is not at the top of a hierarchy.
E.g.
UltraNavigationBarLocation rootLocation = navBar.RootLocation;
rootLocation.Text = @"C:\MyApp\Workspace";
The problem is that I get an exception due to path separators within the string.
I'm sure it's something trivial, but I can't find anything in the documentation regarding this.
Thanks David
As a general rule, you cannot assign a value to the Text property that contains the path separator, since the path parsing logic would not be able to identify locations from a string.
I might be speculating a bit here, but it looks like you are trying to change the root location while keeping the contents of the respective Locations collections the same, which is not supported. Once the Locations collections are populated, you cannot redefine the root location. Going by your example, instead of populating from the root drive, i.e., "C:", you would have to assign the "C:\MyApp\Workspace" folder to the RootLocation property, and populate from there. If I am misinterpreting this, please repost and clarify exactly what you are trying to accomplish and we will try to help.
The UltraNavigationBar.NavigateTo method parses the path and sets the SelectedLocation property to the resulting location. Note that each location in the path has to have already been created; I'm not sure if that was part of the question, but locations are never created automatically as there is no connect between the control and (for example) a file system.