Forge
deeb25a2
1<UserControl xmlns="https://github.com/avaloniaui"
2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3 xmlns:cn="using:CascadeIDE.Services.ChordNotation"
4 x:Class="CascadeIDE.Views.ChordKeycapStrip">
5 <!-- Шаги последовательности — группы кэпов; внутри шага кэпы плотным рядом. ItemsSource задаётся из кода. -->
6 <ItemsControl x:Name="StepsHost">
7 <ItemsControl.ItemsPanel>
8 <ItemsPanelTemplate>
9 <StackPanel Orientation="Horizontal" Spacing="10"/>
10 </ItemsPanelTemplate>
11 </ItemsControl.ItemsPanel>
12 <ItemsControl.ItemTemplate>
13 <DataTemplate DataType="cn:ChordKeycapStep">
14 <ItemsControl ItemsSource="{Binding Segments}">
15 <ItemsControl.ItemsPanel>
16 <ItemsPanelTemplate>
17 <StackPanel Orientation="Horizontal" Spacing="4"/>
18 </ItemsPanelTemplate>
19 </ItemsControl.ItemsPanel>
20 <ItemsControl.ItemTemplate>
21 <DataTemplate DataType="cn:ChordKeycapSegment">
22 <Border MinWidth="28"
23 Padding="8,5"
24 CornerRadius="5"
25 BorderThickness="1"
26 BorderBrush="{DynamicResource CascadeTheme.WorkspacePanelBorderBrush}"
27 Background="{DynamicResource CascadeTheme.TerminalBackground}">
28 <TextBlock HorizontalAlignment="Center"
29 VerticalAlignment="Center"
30 FontSize="11"
31 FontWeight="SemiBold"
32 Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}"
33 Text="{Binding Label}"/>
34 </Border>
35 </DataTemplate>
36 </ItemsControl.ItemTemplate>
37 </ItemsControl>
38 </DataTemplate>
39 </ItemsControl.ItemTemplate>
40 </ItemsControl>
41</UserControl>
42
View only · write via MCP/CIDE