| 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.WorkspaceNavigationMapView" |
| 7 | x:DataType="nav:WorkspaceNavigationMapViewModel"> |
| 8 | <UserControl.Resources> |
| 9 | <views:StringNotEmptyToBoolConverter x:Key="HciOrientationLineVisible"/> |
| 10 | </UserControl.Resources> |
| 11 | <!-- Карта намерений / CodeNavigationMap (ADR 0039 / 0047 / 0088): слот Pfd — граф подграфа; список related — страница MFD RelatedFiles. --> |
| 12 | <Panel IsVisible="{Binding IsPfdRegionExpanded}"> |
| 13 | <Border BorderBrush="{DynamicResource CascadeTheme.WorkspacePanelBorderBrush}" |
| 14 | BorderThickness="1" |
| 15 | CornerRadius="10" |
| 16 | Padding="8" |
| 17 | Background="{DynamicResource CascadeTheme.TerminalBackground}"> |
| 18 | <Grid> |
| 19 | <Grid.RowDefinitions> |
| 20 | <RowDefinition Height="Auto"/> |
| 21 | <RowDefinition Height="Auto"/> |
| 22 | <RowDefinition Height="Auto"/> |
| 23 | <RowDefinition Height="{Binding CodeNavigationMapListAreaRowHeight}"/> |
| 24 | </Grid.RowDefinitions> |
| 25 | <Grid Grid.Row="0" ColumnDefinitions="*,Auto"> |
| 26 | <views:PanelChromeHeader Grid.Column="0" |
| 27 | Title="Карта намерений · граф" |
| 28 | UppercaseTitle="True"/> |
| 29 | <Border Grid.Column="1" |
| 30 | VerticalAlignment="Center" |
| 31 | Margin="8,0,0,0" |
| 32 | Padding="6,2" |
| 33 | CornerRadius="4" |
| 34 | Background="#22000000" |
| 35 | BorderBrush="{DynamicResource CascadeTheme.WorkspacePanelBorderBrush}" |
| 36 | BorderThickness="1" |
| 37 | IsVisible="{Binding WorkspaceNavigationMapHasRelated}"> |
| 38 | <TextBlock FontSize="10" |
| 39 | FontWeight="SemiBold" |
| 40 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 41 | Text="{Binding WorkspaceNavigationMapRelatedBadge}"/> |
| 42 | </Border> |
| 43 | </Grid> |
| 44 | <StackPanel Grid.Row="1" Margin="0,6,0,0" Spacing="4"> |
| 45 | <TextBlock FontSize="10" |
| 46 | TextWrapping="Wrap" |
| 47 | Opacity="0.9" |
| 48 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 49 | Text="{Binding CodeNavigationMapSettingsSummaryLine}"/> |
| 50 | <TextBlock FontSize="10" |
| 51 | TextWrapping="Wrap" |
| 52 | Opacity="0.85" |
| 53 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 54 | IsVisible="{Binding WorkspaceNavigationMapHciOrientationLine, Converter={StaticResource HciOrientationLineVisible}}" |
| 55 | Text="{Binding WorkspaceNavigationMapHciOrientationLine}"/> |
| 56 | <Button Background="Transparent" |
| 57 | BorderThickness="0" |
| 58 | Padding="0" |
| 59 | HorizontalAlignment="Left" |
| 60 | Command="{Binding ShowCorrespondencePageCommand}" |
| 61 | ToolTip.Tip="{Binding WorkspaceCorrespondenceLayersTooltip}" |
| 62 | IsVisible="{Binding WorkspaceCorrespondenceLayersLine, Converter={StaticResource HciOrientationLineVisible}}"> |
| 63 | <TextBlock FontSize="10" |
| 64 | TextWrapping="Wrap" |
| 65 | Opacity="0.88" |
| 66 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 67 | Text="{Binding WorkspaceCorrespondenceLayersLine}"/> |
| 68 | </Button> |
| 69 | <Button Background="Transparent" |
| 70 | BorderThickness="0" |
| 71 | Padding="0" |
| 72 | HorizontalAlignment="Left" |
| 73 | Command="{Binding ShowCorrespondencePageCommand}" |
| 74 | IsVisible="{Binding WorkspaceAdrCorrespondenceLine, Converter={StaticResource HciOrientationLineVisible}}"> |
| 75 | <TextBlock FontSize="10" |
| 76 | TextWrapping="Wrap" |
| 77 | Opacity="0.9" |
| 78 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 79 | Text="{Binding WorkspaceAdrCorrespondenceLine}"/> |
| 80 | </Button> |
| 81 | <StackPanel Orientation="Horizontal" Spacing="4"> |
| 82 | <TextBlock FontSize="11" |
| 83 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 84 | Text="Якорь:"/> |
| 85 | <TextBlock FontSize="11" |
| 86 | FontWeight="SemiBold" |
| 87 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 88 | Text="{Binding WorkspaceNavigationMapAnchorLabel}"/> |
| 89 | </StackPanel> |
| 90 | <views:CodeNavigationMapMiniMapControl x:Name="CodeNavigationMapMiniMap" |
| 91 | Height="{Binding CodeNavigationMapGraphHeight}" |
| 92 | HorizontalAlignment="Stretch" |
| 93 | Margin="0,4,0,0" |
| 94 | Cursor="Hand" |
| 95 | IsVisible="{Binding ShowCodeNavigationMapGraph}" |
| 96 | Scene="{Binding CodeNavigationMapGraphScene}" |
| 97 | OpenFileCommand="{Binding OpenWorkspaceNavigationRelatedCommand}"/> |
| 98 | <TextBlock Margin="0,2,0,0" |
| 99 | FontSize="10" |
| 100 | Opacity="0.85" |
| 101 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 102 | TextWrapping="Wrap" |
| 103 | IsVisible="{Binding ShowCodeNavigationMapGraphClickHint}" |
| 104 | Text="Клик по узлу — открыть файл; в control flow — подсветка фрагмента (code anchor)."/> |
| 105 | <TextBlock Text="{Binding WorkspaceNavigationMapStatus}" |
| 106 | FontSize="11" |
| 107 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 108 | TextWrapping="Wrap"/> |
| 109 | </StackPanel> |
| 110 | <Border Grid.Row="2" Height="1" Margin="0,8,0,0" |
| 111 | Background="{DynamicResource CascadeTheme.WorkspacePanelBorderBrush}" |
| 112 | IsVisible="{Binding ShowCodeNavigationMapListOnPfd}"/> |
| 113 | <ScrollViewer Grid.Row="3" |
| 114 | Margin="0,8,0,0" |
| 115 | HorizontalScrollBarVisibility="Disabled" |
| 116 | VerticalScrollBarVisibility="Auto" |
| 117 | IsVisible="{Binding ShowCodeNavigationMapListOnPfd}"> |
| 118 | <ItemsControl ItemsSource="{Binding WorkspaceNavigationMapItems}"> |
| 119 | <ItemsControl.ItemTemplate> |
| 120 | <DataTemplate DataType="vm:WorkspaceNavigationMapItemVm"> |
| 121 | <Button Margin="0,0,0,6" |
| 122 | Padding="6,8" |
| 123 | HorizontalAlignment="Stretch" |
| 124 | HorizontalContentAlignment="Left" |
| 125 | Background="Transparent" |
| 126 | BorderThickness="1" |
| 127 | BorderBrush="{DynamicResource CascadeTheme.WorkspacePanelBorderBrush}" |
| 128 | CornerRadius="6" |
| 129 | Command="{Binding $parent[UserControl].DataContext.OpenWorkspaceNavigationRelatedCommand}" |
| 130 | CommandParameter="{Binding FullPath}"> |
| 131 | <StackPanel Spacing="2"> |
| 132 | <TextBlock Text="{Binding RelativePath}" |
| 133 | FontSize="12" |
| 134 | FontWeight="SemiBold" |
| 135 | TextWrapping="Wrap" |
| 136 | Foreground="{DynamicResource CascadeTheme.SolutionExplorerHeaderForeground}"/> |
| 137 | <TextBlock Text="{Binding KindRationaleLine}" |
| 138 | FontSize="10" |
| 139 | Opacity="0.85" |
| 140 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}" |
| 141 | TextWrapping="Wrap"/> |
| 142 | </StackPanel> |
| 143 | </Button> |
| 144 | </DataTemplate> |
| 145 | </ItemsControl.ItemTemplate> |
| 146 | </ItemsControl> |
| 147 | </ScrollViewer> |
| 148 | </Grid> |
| 149 | </Border> |
| 150 | </Panel> |
| 151 | </UserControl> |
| 152 | |