In this task you will learn how to set a directory style to be the default one (unless your GN4 application starts with a default workspace - in that case the directory style, saved in the workspace, overrides). In this example we choose a directory style under the <BaseQuery Name="Fred4Pages" in the FRED4_Config.xml configuration file. |
You will be able to perform this task only if: •You already opened the fred4_config.xml file as explained in TASK: Open for editing one or more files with directory styles, ordered the view as explained in TASK: Display an ordered view of directory style elements, and located the <DirectoryStyle Name="List" under the <BaseQuery Name="Fred4Pages". |
1.Expand the <DirectoryStyleList> under base query Fred4 pages and review all defined directory styles: 2.Let's assume you want to make the directory style Workstates as the default one. 3.Open the Fred4_Tabitems.xml file and then press SHIFT+CTRL+F to search for the <l:ShellResultView, selecting Current Document in the Look in box. This will give you quite a few of lines that contain the search term. 4.Now double-click the first line and check which is the parent of the selected line: the parent will be <l:ShellTabItem VirtualApplicationName="Fred4" which, just by chance is the one we're looking for. How we do know it? We know it because in the x:Name="Fred4Pages" property it points to the Fred4Pages base query - and that's where we were looking for the directory styles: 5.Scroll the line to locate the DirectoryStyleName property. It reads the current default directory style (Thumbnails): 6.Change the value in Workstates. 7.Save changes and import them in database as explained in TASK: Save changes and import them in database. 8.Restart Fred and then look which is the default directory styles on the Pages main tab: it will be Workstates. |