| 1 | <UserControl xmlns="https://github.com/avaloniaui" |
| 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | xmlns:nav="using:CascadeIDE.Features.WorkspaceNavigation.Presentation" |
| 4 | xmlns:vm="using:CascadeIDE.ViewModels" |
| 5 | xmlns:views="using:CascadeIDE.Views" |
| 6 | x:Class="CascadeIDE.Views.RelatedFilesMfdPageView" |
| 7 | x:DataType="nav:WorkspaceNavigationMapViewModel"> |
| 8 | <!-- Связанные файлы (WorkspaceNavigation) — только related list + якорь (ADR 0156). --> |
| 9 | <Grid RowDefinitions="Auto,*" MinHeight="0"> |
| 10 | <Grid Grid.Row="0" ColumnDefinitions="*,Auto" Margin="0,0,0,6"> |
| 11 | <views:PanelChromeHeader Grid.Column="0" |
| 12 | Title="Связанные файлы · workspace" |
| 13 | UppercaseTitle="True"/> |
| 14 | <Border Grid.Column="1" |
| 15 | VerticalAlignment="Center" |
| 16 | Margin="8,0,0,0" |
| 17 | Padding="6,2" |
| 18 | CornerRadius="4" |
| 19 | Background="#22000000" |
| 20 | BorderBrush="{DynamicResource CascadeTheme.WorkspacePanelBorderBrush}" |
| 21 | BorderThickness="1" |
| 22 | IsVisible="{Binding WorkspaceNavigationMapHasRelated}"> |
| 23 | <TextBlock FontSize="10" |
| 24 | FontWeight="SemiBold" |
| 25 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 26 | Text="{Binding WorkspaceNavigationMapRelatedBadge}"/> |
| 27 | </Border> |
| 28 | </Grid> |
| 29 | <Grid Grid.Row="1" RowDefinitions="Auto,Auto,Auto,*" MinHeight="0"> |
| 30 | <TextBlock Grid.Row="0" FontSize="10" TextWrapping="Wrap" Opacity="0.9" |
| 31 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 32 | Text="{Binding CodeNavigationMapSettingsSummaryLine}"/> |
| 33 | <StackPanel Grid.Row="1" Margin="0,6,0,0" Spacing="4" Orientation="Horizontal"> |
| 34 | <TextBlock FontSize="11" Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" Text="Якорь:"/> |
| 35 | <TextBlock FontSize="11" FontWeight="SemiBold" |
| 36 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 37 | Text="{Binding WorkspaceNavigationMapAnchorLabel}"/> |
| 38 | </StackPanel> |
| 39 | <TextBlock Grid.Row="2" Margin="0,8,0,4" |
| 40 | Text="{Binding WorkspaceNavigationMapStatus}" |
| 41 | FontSize="11" TextWrapping="Wrap" |
| 42 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}"/> |
| 43 | <Panel Grid.Row="3"> |
| 44 | <ScrollViewer HorizontalScrollBarVisibility="Disabled" |
| 45 | VerticalScrollBarVisibility="Auto" |
| 46 | IsVisible="{Binding ShowCodeNavigationMapList}"> |
| 47 | <ItemsControl ItemsSource="{Binding WorkspaceNavigationMapItems}"> |
| 48 | <ItemsControl.ItemTemplate> |
| 49 | <DataTemplate DataType="vm:WorkspaceNavigationMapItemVm"> |
| 50 | <Button Margin="0,0,0,6" |
| 51 | Padding="6,8" |
| 52 | HorizontalAlignment="Stretch" |
| 53 | HorizontalContentAlignment="Left" |
| 54 | Background="Transparent" |
| 55 | BorderThickness="1" |
| 56 | BorderBrush="{DynamicResource CascadeTheme.WorkspacePanelBorderBrush}" |
| 57 | CornerRadius="6" |
| 58 | Command="{Binding $parent[UserControl].DataContext.OpenWorkspaceNavigationRelatedCommand}" |
| 59 | CommandParameter="{Binding FullPath}"> |
| 60 | <StackPanel Spacing="2"> |
| 61 | <TextBlock Text="{Binding RelativePath}" |
| 62 | FontSize="12" |
| 63 | FontWeight="SemiBold" |
| 64 | TextWrapping="Wrap" |
| 65 | Foreground="{DynamicResource CascadeTheme.SolutionExplorerHeaderForeground}"/> |
| 66 | <TextBlock Text="{Binding KindRationaleLine}" |
| 67 | FontSize="10" Opacity="0.85" |
| 68 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 69 | TextWrapping="Wrap"/> |
| 70 | </StackPanel> |
| 71 | </Button> |
| 72 | </DataTemplate> |
| 73 | </ItemsControl.ItemTemplate> |
| 74 | </ItemsControl> |
| 75 | </ScrollViewer> |
| 76 | <TextBlock VerticalAlignment="Center" |
| 77 | TextWrapping="Wrap" |
| 78 | FontSize="11" |
| 79 | Opacity="0.85" |
| 80 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 81 | IsVisible="{Binding !ShowCodeNavigationMapList}" |
| 82 | Text="Список отключён: в [code_navigation_map] view задай list или both. Correspondence — страница MFD Correspondence."/> |
| 83 | </Panel> |
| 84 | </Grid> |
| 85 | </Grid> |
| 86 | </UserControl> |
| 87 | |