The main tab section defines the screen layout of the main tab for the given object.
Create the main tab section in the in xxx_TabItems.xml file (where xxx may be Ted4, Fred4, Shell4 or Edadmin4). See Which configuration file? for help about choosing the right configuration file.
Have in mind that some items of the main tab section reference the base query section, defined in the xxx_Config.xml file.
The example below is a standard example, containing a single navigator tab, a listing, and a preview pane. More complex cases may include multi navigator tabs, a quick preview panel embedded in the navigator, metadata panel in the navigator etc. (not explained here).
The text in blue is free text, but referenced elsewhere, which means you can follow the specified naming indications, or you can specify what you want, but be coherent.
The text in red is related to specific tab, and it has to be customized to keep the naming coherent.
In this example, we're showing the main tab for the contact object. If you would be setting up a main tab for another object, the object name and some descriptive strings will be different.
<l:ShellTabItem xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:edWinUI="http://www.teradp.com/schemas/GN4/1/EdWinUI" xmlns:converters="clr-namespace:TeraDP.GN4.Common.Converters;assembly=Common" Header="Contacts" x:Name="ContactsMainTab" MenuConfigName="Contacts" Grid.IsSharedSizeScope="True" ShellMode="Browse" FocusManager.FocusedElement="{Binding ElementName=Navigator}"> <l:ShellTabItem.Resources> <converters:BooleanToVisibilityConverter x:Key="visibleOnExpanded" TrueValue="Visible" FalseValue="Hidden"/> </l:ShellTabItem.Resources> <l:ShellData.ShellData> <l:ShellData> <l:ShellData.SearchCriteria> <l:SearchCriteria Name="ContactsSearch" BaseQueryName="ContactsMainTab" SearchName="ContactsSimpleSearch" AutoApply="False" ItemsPerPage="100"/> <l:SearchCriteria Name="ContactsDraftViewConnection"/> </l:ShellData.SearchCriteria> </l:ShellData> </l:ShellData.ShellData> <Grid Name="MainContainer"> <l:NavigatorControl Name="Navigator" HorizontalAlignment="Stretch"> <TabItem Name="ContactsNavTab" Header="Contacts" FocusManager.FocusedElement="{Binding ElementName=ContactsSearch}"> <Grid Name="ContactsGrid"> <!--Define 3 panels in the tab page--> <Grid.ColumnDefinitions> <ColumnDefinition Width="340" MaxWidth="400"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="340" MaxWidth="500"/> </Grid.ColumnDefinitions> <!--Left pane - navigator, that can be expanded/collapsed--> <Expander Name="SearchLeftExpander" Grid.Column="0" IsExpanded="True" ExpandDirection="Right" Margin="0,0,5,0"> <Expander.Header> <TextBlock Text="Search"> <TextBlock.LayoutTransform> <RotateTransform Angle="90"/> </TextBlock.LayoutTransform> </TextBlock> </Expander.Header> <Grid Name="ContactsSearch" VerticalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <l:RefreshButton Grid.Column="0" IsDefault="True" HorizontalAlignment="Left" Command="{x:Static l:Commands.Script}" CommandParameter="Refresh"/> <l:SavedSearchControl MinWidth="120" Grid.Column="1" HorizontalAlignment="Left" SearchCriteriaTarget="{Binding Path=(l:ShellData.ShellData).SearchCriteria[ContactsSearch], RelativeSource={RelativeSource Self}}"/> <l:SearchConditionsControl Grid.Row="1" Grid.ColumnSpan="3" SearchCriteriaTarget="{Binding Path=(l:ShellData.ShellData).SearchCriteria[ContactsSearch], RelativeSource={RelativeSource Self}}"/> </Grid> </Expander> <!--center pane - which contains results of search--> <l:ShellGridSplitter x:Name="SearchLeftSplitter" Grid.Column="0" VerticalAlignment="Stretch" Width="5" HorizontalAlignment="Right" Visibility="{Binding ElementName=SearchLeftExpander, Path=IsExpanded, Converter={StaticResource visibleOnExpanded}}" /> <Grid Name="SearchLeftSplitterGrid" Grid.Column="1" > <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <l:ShellResultView Grid.Row="0" Name="ContactsResultView" DirectoryStyleName="List" l:DragDropHelper.IsDragSource="true" LeftDoubleClickCommandParameter="OpenDesigner" l:ShellData.IsRegistered="True" SearchCriteriaSource="{Binding ElementName=Navigator, Path=SelectedItem.(l:ShellData.ShellData).SearchCriteria[ContactsSearch]}" SearchCriteriaTarget="{Binding Path=(l:ShellData.ShellData).SearchCriteria[ContactsDraftViewConnection], RelativeSource={RelativeSource Self}}"/> <l:StyleTabStrip Grid.Row="1" ShellResultView="{Binding ElementName=ContactsResultView}"/> </Grid> <!--Right pane - Preview--> <Expander Name="SearchRightExpander" Grid.Column="2" ExpandDirection="Left" IsExpanded="True" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="5,0,0,0"> <Expander.Header> <TextBlock Text="Preview"> <TextBlock.LayoutTransform> <RotateTransform Angle="90"/> </TextBlock.LayoutTransform> </TextBlock> </Expander.Header> <l:InfoListBox SearchCriteriaSource="{Binding Path=(l:ShellData.ShellData).SearchCriteria[ContactsDraftViewConnection], RelativeSource={RelativeSource Self}}" l:ShellMode.Allowed="Browse"/> </Expander> <l:ShellGridSplitter x:Name="SearchRightSplitter" Grid.Column="2" VerticalAlignment="Stretch" Width="5" HorizontalAlignment="Left" Visibility="{Binding ElementName=SearchRightExpander, Path=IsExpanded, Converter={StaticResource visibleOnExpanded}}" /> </Grid> </TabItem> <TabItem Name="ClipboardTab" Header="Clipboard"> <Grid Name="ClipboardGrid"> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <l:ShellResultView Grid.Row="0" Name="ClipboardResultView" DirectoryStyleName="List" l:DragDropHelper.IsDragSource="true" LeftDoubleClickCommandParameter="OpenDesignerInTab" l:ShellData.IsRegistered="True" SearchCriteriaSource="{x:Static l:Clipboard.SearchCriteria}"> </l:ShellResultView> <l:StyleTabStrip Grid.Row="1" ShellResultView="{Binding ElementName=ClipboardResultView}"/> </Grid> </TabItem> </l:NavigatorControl> </Grid> </l:ShellTabItem> |