When you need to modify user interface, e.g. change a label, add another field to the search or data form, or do any other modification of the user interface, you need to locate the appropriate configuration file and then the related part in that file. See also Identifying configuration items internal names.
Locate a configuration file
See Which configuration file? See also Identifying configuration items internal names, to learn how to identify configuration files and internal names from a GN4 application.
Locate a part in a configuration file
Main tabs definitions are in the <TabItemList> section of xxx_TabItems.xml files and begin by the statement: <l:ShellTabItem Header="..." x:Name="..." or <l:ShellTabItem x:Name="..." Header="..." or <l:ShellTabItem xmlns="... x:Name="..." Header="..." As the parameters of the <l:ShellTabItem can be freely inverted (Header first, x:Name second; x:Name first, Header second, or even starting with xmlns="...), and as <l:ShellTabitem is used also for every menu command, it's not a good idea to try to locate them by searching for <l:ShellTabitem (as it will return also all menu commands, and they are many), neither for <l:ShellTabItem x:Name (it won't return the main tabs defined in inverted order, or ones starting with xmlns="...). A partial solution is to use wildcard searches in Visual Studio Express. Unfortunately, this won't retrieve the lines with: <l:ShellTabItem xmlns="... In the newer versions of the standard configuration files, the names in the main tabs elements is normalized, so it does not contain anymore lines with inverted order, but your customized configuration files still may contain them, so have that in mind when searching. The names of the main tabs in the standard configuration, as per Aug, 01 2011 are: In Fred4_TabItems.xml: <l:ShellTabItem x:Name="ShellMainTab" Header="Shell" MenuConfigName="ShellMainTab" <l:ShellTabItem x:Name="Fred4Pages" Header="Pages" MenuConfigName="Fred4Main" <l:ShellTabItem x:Name="Fred4Editions" Header="Editions" MenuConfigName="Fred4Edition" <l:ShellTabItem x:Name="Fred4TracyLayouts" Header="Tracking" MenuConfigName="Fred4Tracy" <l:ShellTabItem x:Name="StartMainTab" Header="Start" In Ted4_TabItems.xml: <l:ShellTabItem x:Name="PlanningMainTab" Header="Planning" MenuConfigName="PlanningMainTab" <l:ShellTabItem x:Name="CollectionsMainTab" Header="Collections" MenuConfigName="CollectionsMainTab" <l:ShellTabItem x:Name="TrashCanMainTab" Header="Trash can" MenuConfigName="TrashCanMainTab" <l:ShellTabItem x:Name="Ted4Articles" Header="Articles" MenuConfigName="Ted4Main" <l:ShellTabItem x:Name="ShellMainTab" Header="Shell" MenuConfigName="ShellMainTab" <l:ShellTabItem x:Name="Ted4PubDests" Header="Publishing" MenuConfigName="Ted4PubDest" <l:ShellTabItem x:Name="ContactsMainTab" Header="Contacts" MenuConfigName="Contacts" <l:ShellTabItem x:Name="StartMainTab" Header="Start" |
•Locate navigators definitions
Navigators definitions are in xxx_TabItems.xml files and the can appear as "embedded navigators" (with one or more navigators), ie. within the parent main tab, or as "stand-alone" navigators. Embedded navigators Embedded navigators are defined in the main body of the parent main tab by the statement: <l:NavigatorControl Name="..." or <l:NavigatorControl x:Name="..." Embedded navigators in the standard configuration, as per Aug, 01 2011 are all named in the same way ("Navigator"), and you can find them as below: In Fred4_TabItems.xml (all lines starting by <l:NavigatorControl x:Name="Navigator"...): Under ShellMainTab: line 100 Under Fred4Pages: line 201 Under Fred4Editions: line 577 Under Fred4TracyLayouts: line 667 Note: all above positions are under <DockPanel Name="..." / <Grid Name="..." / <Expander Style="..." In Ted4_TabItems.xml (all lines starting by <l:NavigatorControl x:Name="Navigator"...): Under PlanningMainTab: line 266 Under CollectionsMainTab: line 342 Under Ted4Articles: line 601 Under ShellMainTab: line 886 Under Ted4PubDests: line 955 Under ContactsMainTab: line 1074 Under ContentMainTab: line 1218 Stand-alone navigators "Stand-alone navigators" are defined under <TabItemsList> node, by the statement: <l:NavigatorTabItem x:Name="..." Such navigators are called from a main tab under <l:NavigatorControl, by the value of the attribute NavigatorTabItemNames in form of: NavigatorTabItemNames="TaskShellNavTab,BudgetShellNavTab,EventShellNavTab" The names of the stand-alone navigators in the standard configuration, as per Aug, 01 2011 are: In Fred4_TabItems.xml: <l:NavigatorTabItem x:Name="ClassicPagesNavTab" Header="Pages"
In Ted4_TabItems.xml: <l:NavigatorTabItem x:Name="ArticleShellNavTab" Header="Articles" <l:NavigatorTabItem x:Name="WireShellNavTab" Header="Wires" <l:NavigatorTabItem x:Name="BudgetShellNavTab" Header="Budgets" <l:NavigatorTabItem x:Name="EventShellNavTab" Header="Events" <l:NavigatorTabItem x:Name="TaskShellNavTab" Header="Tasks" <l:NavigatorTabItem x:Name="CollectionShellNavTab" Header="Collections" <l:NavigatorTabItem x:Name="EditionShellNavTab" Header="Edition" <l:NavigatorTabItem x:Name="CategoryShellNavTab" Header="Categories" Notes •To locate the parent main tab definition from the location of the navigator, scroll up until you find the first <l:ShellTabItem x:Name="..." - that's the parent main tab. •Above embedded navigators contain one or more navigators, each marked by <TabItem Name="..."). Every navigator, defined in that way, is a separate code, and that means that the Articles navigator definition is triplicated in the configuration, appearing with substantially the same code under Articles main tab, Pages main tab and Publishing main tab. |
•Locate individual navtabs in embedded navigators
Note: this applies only on embedded navigators. Below an example from the Ted4_TabItems.xml, related to the navigators on the Articles main tab: Every navigator is defined by <TabItem Name="..." and it contains code, required to display the navigator, but it is also attached to the search definitions, specified in the <l:ShellData.ShellData section, as bellow: That is important, as if you ever decide to copy a navigator, specified as shown above, from one basequery to another, you need to make sure that the ShellData section of the target basequery contains all required statements as the ShellData section of the source basequery, otherwise, the copied code won't work. |
•Locate individual navtabs search fields definitions
Search fields of a navigator are all defined in the xxx_Config.xml, but it's not always easy to find out in which section of that long file. The way to locate the right section in the xxx_Config.xml file, is to look at in the xxx_TabItems.xml file: the <l:ShellData.ShellData section of the parent main tab of the designated navigator (in xxx_TabItems.xml), and find out what it references. To locate in the xxx_TabItems.xml file the parent ShellData section from the position of the individual navigator, scroll up until you find the first <l:ShellData.ShellData> section. Expand it, locate and expand the first <l:ShellData.SearchCriteria> node:
You will find there one or more lines that start with <l:SearchCriteria Name="..." (we show only one line in this example): ... <l:SearchCriteria Name="TasksSearch" BaseQueryName="TasksMainTab" SearchName="tasksSimpleSearch" AutoApply="False" ItemsPerPage="100"/> ... •The value of the BaseQueryName points you to the section in the xxx_Config.xml file with the definition of directory styles, sort orders and search fields. That section in the xxx_Config.xml file starts with <BaseQuery Name="...", where ... is the above value of the BaseQueryName in the <l:SearchCriteria (for the above example it would be <BaseQuery Name="TasksMainTab"). •The value of the SearchName points you to the sub-section of the above section, ie. the one that starts with <searchObjectUI name="...">, where "..." is the value of the SearchName (for the above example it would be <searchObjectUI name="tasksSimpleSearch">). Each search field is defined as <attribute path="...". Only the fields that apply to the ObjectTypeName="...", as specified in the <BaseQuery... are allowed. In the above example, only the fields for "task" object are allowed. |
•Locate connection between search and results of the navtab
The connection between search and results of the navigator is established by the Name attribute value in the <l:SearchCriteria Name="..." of the <l:ShellData.ShellData> section, for example, in the below line: ... <l:SearchCriteria Name="TasksSearch" BaseQueryName="TasksMainTab" SearchName="tasksSimpleSearch" AutoApply="False" ItemsPerPage="100"/> ... the value of the Name attribute (TasksSearch) gets specified in: •<l:SavedSearchControl MinWidth="200" MaxWidth="300" Grid.Column="1" HorizontalAlignment="Left" SearchCriteriaTarget="{Binding Path=(l:ShellData.ShellData).SearchCriteria[TasksSearch], RelativeSource={RelativeSource Self}}"/> •<l:SearchConditionsControl SearchCriteriaTarget="{Binding Path=(l:ShellData.ShellData).SearchCriteria[TasksSearch], RelativeSource={RelativeSource Self}}"/> •SearchCriteriaSource="{Binding Path=(l:ShellData.ShellData).SearchCriteria[TasksSearch], RelativeSource={RelativeSource Self}}"> See also Relations of search criteria, fields, saved search control, results etc. |
•Locate individual navtabs results definitions
The value of the BaseQueryName points you to the section in the xxx_Config.xml file with the definition of directory styles and sort orders. In the below example you see the ArticlePicker base query definition with two directory styles: List and Details. |
•Locate individual navtabs expandable preview definitions (if any)
Individual navigators may have an optional expandable preview on the right side of the navigator (as it's the case of the Articles and Contents navigator. This part is defined in the section that typically starts with <l:ShellGridSplitter Name="...". The examples are available in the ArticlesTab navigator and AssetsTab navigator under Ted4Articles in the Ted4_TabItems.xml file. <l:ShellGridSplitter Name="RightSplitter" IsBuddyExpanded="{Binding ElementName=RightPanel, Path=IsExpanded}" Visibility="{Binding ElementName=RightPanel, Path=Visibility}" Grid.Row="0" Grid.RowSpan="5" Grid.Column="1" ResizeDirection="Columns" ResizeBehavior="PreviousAndCurrent" HorizontalAlignment="Left" l:ShellMode.Allowed="Browse"/> <l:ToolBarTrayExpander IsExpanded="False" Margin="6,0,0,0" Name="RightPanel" ExpandDirection="Left" l:ShellMode.Allowed="Browse" Grid.Row="0" Grid.RowSpan="5" Grid.Column="1" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="3*"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <l:InfoListBox HorizontalAlignment="Stretch" Margin="0,0,0,6" SearchCriteriaSource="{Binding Path=(l:ShellData.ShellData).SearchCriteria[ArticleResultView], RelativeSource={RelativeSource Self}}"/> <l:ShellGridSplitter Grid.Row="0" Name="RightPanelSplitter" VerticalAlignment="Bottom" Height="5" HorizontalAlignment="Stretch"/> <l:AuditListBox Margin="0" HorizontalAlignment="Stretch" Grid.Row="1" SearchCriteriaSource="{Binding Path=(l:ShellData.ShellData).SearchCriteria[ArticleResultView], RelativeSource={RelativeSource Self}}"/> </Grid> </l:ToolBarTrayExpander > |
•Locate individual navtabs expandable properties definitions (if any)
This part is defined in the section that typically starts with <Expander Grid.Row="...". The examples are available in the ArticlesTab navigator and AssetsTab navigator under Ted4Articles main tab in the Ted4_TabItems.xml file. <Expander Grid.Row="4" Width="{Binding Path=ActualWidth, ElementName=ResultView}"> <ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="400"> <l:EditItemsControl ShellMode="Update" SearchCriteriaSource="{Binding Path=(l:ShellData.ShellData).SearchCriteria[ArticleResultView], RelativeSource={RelativeSource Self}}" EditObjectUIGroupName="objectInfoGroup" PostApplyCommand="{x:Static l:Commands.Script}" PostApplyCommandParameter="Refresh"/> </ScrollViewer> </Expander> |
Context menus are defined within parent <Menuset. The way to locate them in the config file is explained in the Identify context menus paragraph of the Identify configuration items internal names topic. |
See also