|
40 | 40 | </Menu>
|
41 | 41 | <Grid>
|
42 | 42 | <Grid.RowDefinitions>
|
43 |
| - <RowDefinition Height="50" /> |
| 43 | + <RowDefinition Height="Auto" /> |
44 | 44 | <RowDefinition Height="*" />
|
45 | 45 | </Grid.RowDefinitions>
|
46 |
| - <Grid.ColumnDefinitions> |
47 |
| - <ColumnDefinition Width="*" /> |
48 |
| - </Grid.ColumnDefinitions> |
49 | 46 |
|
50 |
| - <Grid |
| 47 | + <!-- Header section with Fluent 2 design tokens --> |
| 48 | + <Border |
51 | 49 | Grid.Row="0"
|
52 |
| - Margin="8"> |
| 50 | + Classes="Fluent2Surface" |
| 51 | + Margin="24,16,24,0" |
| 52 | + Padding="16"> |
| 53 | + <Grid> |
| 54 | + <Grid.ColumnDefinitions> |
| 55 | + <ColumnDefinition Width="Auto" /> |
| 56 | + <ColumnDefinition Width="*" /> |
| 57 | + <ColumnDefinition Width="Auto"/> |
| 58 | + </Grid.ColumnDefinitions> |
| 59 | + <TextBlock |
| 60 | + Grid.Column="0" |
| 61 | + Classes="Fluent2Body" |
| 62 | + Margin="0,0,12,0" |
| 63 | + VerticalAlignment="Center" |
| 64 | + Text="Clip path:" /> |
| 65 | + <TextBox |
| 66 | + Grid.Column="1" |
| 67 | + Classes="Fluent2" |
| 68 | + Margin="0,0,12,0" |
| 69 | + Text="{Binding CurrentPath, Mode=OneWay}" /> |
| 70 | + <Button |
| 71 | + Grid.Column="2" |
| 72 | + Classes="Fluent2Primary" |
| 73 | + Command="{Binding OpenFolderPicker}" |
| 74 | + Content="Browse" /> |
| 75 | + </Grid> |
| 76 | + </Border> |
| 77 | + |
| 78 | + <!-- Main content area with Fluent 2 elevation and spacing --> |
| 79 | + <Grid |
| 80 | + Grid.Row="1" |
| 81 | + Margin="24,16,24,24"> |
53 | 82 | <Grid.ColumnDefinitions>
|
54 |
| - <ColumnDefinition Width="75" /> |
| 83 | + <ColumnDefinition Width="320" /> |
| 84 | + <ColumnDefinition Width="16" /> |
55 | 85 | <ColumnDefinition Width="*" />
|
56 |
| - <ColumnDefinition Width="75"/> |
57 | 86 | </Grid.ColumnDefinitions>
|
58 |
| - <Label Grid.Column="0" HorizontalAlignment="Left" VerticalContentAlignment="Center" Content="Clip path:"></Label> |
59 |
| - <TextBox Grid.Column="1" Text="{Binding CurrentPath, Mode=OneWay}" /> |
60 |
| - <Button Grid.Column="2" HorizontalAlignment="Right" Command="{Binding OpenFolderPicker}" Content="Browse" /> |
61 |
| - </Grid> |
62 | 87 |
|
63 |
| - <DockPanel Grid.Row="1"> |
64 |
| - <StackPanel |
65 |
| - Width="225" |
66 |
| - DockPanel.Dock="Left"> |
67 |
| - <TextBox Margin="8" Watermark="Search" Text="{Binding SearchText}" /> |
68 |
| - <ListBox |
69 |
| - ItemsSource="{Binding FilteredClips}" |
70 |
| - SelectedItem="{Binding SelectedClip}"> |
71 |
| - <ListBox.Styles> |
72 |
| - <Style Selector="ListBoxItem"> |
73 |
| - <Setter Property="Padding" Value="0"/> |
74 |
| - </Style> |
75 |
| - </ListBox.Styles> |
76 |
| - <ListBox.ItemTemplate> |
77 |
| - <DataTemplate> |
78 |
| - <StackPanel Margin="8"> |
79 |
| - <TextBox Text="{Binding Name, Mode=TwoWay}" /> |
80 |
| - <ComboBox |
81 |
| - DisplayMemberBinding="{Binding DisplayName}" |
82 |
| - ItemsSource="{Binding Clip.ClipTypes}" |
83 |
| - SelectedValue="{Binding ClipType, Mode=TwoWay}" |
84 |
| - SelectedValueBinding="{Binding KeyId}" /> |
85 |
| - <TextBlock MaxLines="1" Text="{Binding ClipType}" /> |
86 |
| - </StackPanel> |
87 |
| - </DataTemplate> |
88 |
| - </ListBox.ItemTemplate> |
89 |
| - </ListBox> |
90 |
| - </StackPanel> |
| 88 | + <!-- Left panel: Clips navigation with Fluent 2 surface treatment --> |
| 89 | + <Border |
| 90 | + Grid.Column="0" |
| 91 | + Classes="Fluent2SurfaceElevated"> |
| 92 | + <ScrollViewer> |
| 93 | + <StackPanel Margin="16" Spacing="16"> |
| 94 | + <!-- Search section --> |
| 95 | + <StackPanel Spacing="8"> |
| 96 | + <TextBlock |
| 97 | + Classes="Fluent2Subtitle" |
| 98 | + Text="Search Clips" /> |
| 99 | + <TextBox |
| 100 | + Classes="Fluent2" |
| 101 | + Watermark="Type to search clips..." |
| 102 | + Text="{Binding SearchText}" /> |
| 103 | + </StackPanel> |
| 104 | + |
| 105 | + <!-- Clips list section --> |
| 106 | + <StackPanel Spacing="8"> |
| 107 | + <TextBlock |
| 108 | + Classes="Fluent2Subtitle" |
| 109 | + Text="Available Clips" /> |
| 110 | + <ListBox |
| 111 | + Classes="Fluent2" |
| 112 | + ItemsSource="{Binding FilteredClips}" |
| 113 | + SelectedItem="{Binding SelectedClip}"> |
| 114 | + <ListBox.ItemTemplate> |
| 115 | + <DataTemplate> |
| 116 | + <Border |
| 117 | + CornerRadius="4" |
| 118 | + Padding="12"> |
| 119 | + <StackPanel Spacing="8"> |
| 120 | + <TextBox |
| 121 | + Classes="Fluent2" |
| 122 | + Text="{Binding Name, Mode=TwoWay}" |
| 123 | + Watermark="Clip name" /> |
| 124 | + <ComboBox |
| 125 | + Classes="Fluent2" |
| 126 | + DisplayMemberBinding="{Binding DisplayName}" |
| 127 | + ItemsSource="{Binding Clip.ClipTypes}" |
| 128 | + SelectedValue="{Binding ClipType, Mode=TwoWay}" |
| 129 | + SelectedValueBinding="{Binding KeyId}" /> |
| 130 | + <TextBlock |
| 131 | + Classes="Fluent2Caption" |
| 132 | + MaxLines="1" |
| 133 | + Text="{Binding ClipType}" /> |
| 134 | + </StackPanel> |
| 135 | + </Border> |
| 136 | + </DataTemplate> |
| 137 | + </ListBox.ItemTemplate> |
| 138 | + </ListBox> |
| 139 | + </StackPanel> |
| 140 | + </StackPanel> |
| 141 | + </ScrollViewer> |
| 142 | + </Border> |
| 143 | + |
| 144 | + <!-- Splitter space --> |
| 145 | + <GridSplitter |
| 146 | + Grid.Column="1" |
| 147 | + Background="Transparent" |
| 148 | + ResizeDirection="Columns" |
| 149 | + Width="16" /> |
91 | 150 |
|
92 |
| - <AvaloniaEdit:TextEditor |
93 |
| - x:Name="avaloniaEditor" |
94 |
| - FontFamily="Cascadia Code,Consolas,Menlo,Monospace" |
95 |
| - ShowLineNumbers="True" |
96 |
| - SyntaxHighlighting="Xml" |
97 |
| - WordWrap="False"> |
98 |
| - <i:Interaction.Behaviors> |
99 |
| - <behaviors:DocumentTextBindingBehavior Text="{Binding SelectedClip.ClipXml, Mode=TwoWay}" /> |
100 |
| - </i:Interaction.Behaviors> |
101 |
| - </AvaloniaEdit:TextEditor> |
102 |
| - </DockPanel> |
| 151 | + <!-- Right panel: Code editor with Fluent 2 surface treatment --> |
| 152 | + <Border |
| 153 | + Grid.Column="2" |
| 154 | + Classes="Fluent2SurfaceElevated"> |
| 155 | + <Grid> |
| 156 | + <Grid.RowDefinitions> |
| 157 | + <RowDefinition Height="Auto" /> |
| 158 | + <RowDefinition Height="*" /> |
| 159 | + </Grid.RowDefinitions> |
| 160 | + |
| 161 | + <!-- Editor header --> |
| 162 | + <Border |
| 163 | + Grid.Row="0" |
| 164 | + Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}" |
| 165 | + CornerRadius="8,8,0,0" |
| 166 | + Padding="16,12"> |
| 167 | + <TextBlock |
| 168 | + Classes="Fluent2Subtitle" |
| 169 | + Text="Clip Content" /> |
| 170 | + </Border> |
| 171 | + |
| 172 | + <!-- AvaloniaEdit component (unchanged) --> |
| 173 | + <Border |
| 174 | + Grid.Row="1" |
| 175 | + CornerRadius="0,0,8,8" |
| 176 | + ClipToBounds="True"> |
| 177 | + <AvaloniaEdit:TextEditor |
| 178 | + x:Name="avaloniaEditor" |
| 179 | + FontFamily="Cascadia Code,Consolas,Menlo,Monospace" |
| 180 | + ShowLineNumbers="True" |
| 181 | + SyntaxHighlighting="Xml" |
| 182 | + WordWrap="False"> |
| 183 | + <i:Interaction.Behaviors> |
| 184 | + <behaviors:DocumentTextBindingBehavior Text="{Binding SelectedClip.ClipXml, Mode=TwoWay}" /> |
| 185 | + </i:Interaction.Behaviors> |
| 186 | + </AvaloniaEdit:TextEditor> |
| 187 | + </Border> |
| 188 | + </Grid> |
| 189 | + </Border> |
| 190 | + </Grid> |
103 | 191 | </Grid>
|
104 | 192 | </DockPanel>
|
105 | 193 |
|
|
0 commit comments