| 1 | <UserControl xmlns="https://github.com/avaloniaui" |
| 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | xmlns:views="using:CascadeIDE.Views" |
| 4 | x:Class="CascadeIDE.Views.PanelChromeHeader" |
| 5 | x:Name="Root" |
| 6 | x:CompileBindings="False"> |
| 7 | <UserControl.Resources> |
| 8 | <views:PanelChromeTitleDisplayConverter x:Key="PanelChromeTitleDisplayConverter"/> |
| 9 | </UserControl.Resources> |
| 10 | <Border Classes="panelChromeHeaderStrip"> |
| 11 | <Grid ColumnDefinitions="Auto,*,Auto,Auto" MinHeight="30"> |
| 12 | <Border Grid.Column="0" Classes="panelTitleAccent" VerticalAlignment="Center"/> |
| 13 | <TextBlock x:Name="TitleText" |
| 14 | Grid.Column="1" |
| 15 | Classes="panelChromeTitle headerTitlePart" |
| 16 | VerticalAlignment="Center" |
| 17 | TextTrimming="CharacterEllipsis"> |
| 18 | <TextBlock.Text> |
| 19 | <MultiBinding Converter="{StaticResource PanelChromeTitleDisplayConverter}"> |
| 20 | <Binding Path="Title" ElementName="Root" Mode="OneWay"/> |
| 21 | <Binding Path="UppercaseTitle" ElementName="Root" Mode="OneWay"/> |
| 22 | </MultiBinding> |
| 23 | </TextBlock.Text> |
| 24 | </TextBlock> |
| 25 | <!-- Концепт Power: аварийная остановка в заголовке панели --> |
| 26 | <Border Grid.Column="2" |
| 27 | VerticalAlignment="Center" |
| 28 | Margin="0,0,10,0" |
| 29 | CornerRadius="6" |
| 30 | Background="{DynamicResource CascadeTheme.PowerEmergency}" |
| 31 | BoxShadow="0 4 14 0 #88FF3355, 0 2 8 0 #40000000" |
| 32 | IsVisible="{Binding ShowEmergencyStop, ElementName=Root}"> |
| 33 | <Button Content="{Binding PanelChrome_EmergencyStopCaps, Source={StaticResource Loc}}" |
| 34 | Classes="panelChromeEmergencyBtn" |
| 35 | Command="{Binding EmergencyStopCommand, ElementName=Root}" |
| 36 | VerticalAlignment="Center"/> |
| 37 | </Border> |
| 38 | <Button Grid.Column="3" |
| 39 | x:Name="OverflowButton" |
| 40 | Classes="panelChromeOverflowBtn" |
| 41 | Content="⋯" |
| 42 | VerticalAlignment="Center" |
| 43 | IsVisible="{Binding ShowOverflow, ElementName=Root}" |
| 44 | Click="OnOverflowButtonClick"> |
| 45 | <Button.ContextMenu> |
| 46 | <ContextMenu x:Name="OverflowContextMenu"> |
| 47 | <MenuItem Header="{Binding PanelChrome_OverflowActionsPlaceholder, Source={StaticResource Loc}}" IsEnabled="False"/> |
| 48 | <Separator/> |
| 49 | <MenuItem Header="{Binding PanelChrome_CopyTitle, Source={StaticResource Loc}}" Click="OnCopyTitleMenuClick"/> |
| 50 | </ContextMenu> |
| 51 | </Button.ContextMenu> |
| 52 | </Button> |
| 53 | </Grid> |
| 54 | </Border> |
| 55 | </UserControl> |
| 56 | |