Skip to content

Commit d81d52d

Browse files
committed
Update Readme.md
1 parent ca3c210 commit d81d52d

1 file changed

Lines changed: 68 additions & 68 deletions

File tree

Readme.md

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -317,74 +317,6 @@ var comboBox = panel.AddComboBox();
317317
var textBox = panel.AddTextBox();
318318
```
319319

320-
**SetBackground** extension sets the panel background color.
321-
322-
```csharp
323-
panel.SetBackground("Red");
324-
panel.SetBackground("#FF0000");
325-
panel.SetBackground("#AAFF0000");
326-
panel.SetBackground(Colors.Red);
327-
panel.SetBackground(Brushes.Red);
328-
panel.SetBackground(new LinearGradientBrush(
329-
[
330-
new GradientStop(Colors.White, 0),
331-
new GradientStop(Colors.Red, 1)
332-
], 45));
333-
```
334-
335-
**SetTitleBarBackground** extension sets the panel title bar background color.
336-
337-
```csharp
338-
panel.SetTitleBarBackground("Blue");
339-
panel.SetTitleBarBackground("#0000FF");
340-
panel.SetTitleBarBackground("#AA0000FF");
341-
panel.SetTitleBarBackground(Colors.Blue);
342-
panel.SetTitleBarBackground(Brushes.Blue);
343-
panel.SetTitleBarBackground(new LinearGradientBrush(
344-
[
345-
new GradientStop(Colors.White, 0),
346-
new GradientStop(Colors.Blue, 1)
347-
], 45));
348-
```
349-
350-
**SetSlideOutPanelBackground** extension sets the slide-out panel background color for the target panel.
351-
352-
```csharp
353-
panel.SetSlideOutBackground("Green");
354-
panel.SetSlideOutBackground("#00FF00");
355-
panel.SetSlideOutBackground("#AA00FF00");
356-
panel.SetSlideOutBackground(Colors.Green);
357-
panel.SetSlideOutBackground(Brushes.Green);
358-
panel.SetSlideOutBackground(new LinearGradientBrush(
359-
[
360-
new GradientStop(Colors.White, 0),
361-
new GradientStop(Colors.Green, 1)
362-
], 45));
363-
```
364-
365-
**AddStackPanel** extension adds a vertical stack panel to the Ribbon panel.
366-
367-
```csharp
368-
var stackPanel = panel.AddStackPanel();
369-
```
370-
371-
By default, the StackPanel accommodates one to three elements vertically.
372-
If the added items exceed the maximum threshold, they will be automatically added to a new column.
373-
374-
These 5 items will create 2 vertical panels, one will contain 3 items and the other 2 items:
375-
376-
```csharp
377-
var stackPanel = panel.AddStackPanel();
378-
stackPanel.AddPushButton<StartupCommand>("Execute");
379-
stackPanel.AddPullDownButton("Execute");
380-
stackPanel.AddSplitButton("Execute");
381-
stackPanel.AddLabel("Items:");
382-
stackPanel.AddComboBox();
383-
stackPanel.AddTextBox();
384-
```
385-
386-
![verticalStack](https://github.com/user-attachments/assets/3cef1e86-89a3-4f9c-8a06-b7661c6f428f)
387-
388320
**SetImage** extension adds an image to the RibbonButton.
389321

390322
```csharp
@@ -443,8 +375,76 @@ pushButton.AddShortcuts(["RE", "NP"]);
443375
pushButton.AddShortcuts(new List<string>() {"RE", "NP"});
444376
```
445377

378+
**AddStackPanel** extension adds a vertical stack panel to the Ribbon panel.
379+
380+
```csharp
381+
var stackPanel = panel.AddStackPanel();
382+
```
383+
384+
By default, the StackPanel accommodates one to three elements vertically.
385+
If the added items exceed the maximum threshold, they will be automatically added to a new column.
386+
387+
These 5 items will create 2 vertical panels, one will contain 3 items and the other 2 items:
388+
389+
```csharp
390+
var stackPanel = panel.AddStackPanel();
391+
stackPanel.AddPushButton<StartupCommand>("Execute");
392+
stackPanel.AddPullDownButton("Execute");
393+
stackPanel.AddSplitButton("Execute");
394+
stackPanel.AddLabel("Items:");
395+
stackPanel.AddComboBox();
396+
stackPanel.AddTextBox();
397+
```
398+
399+
![verticalStack](https://github.com/user-attachments/assets/3cef1e86-89a3-4f9c-8a06-b7661c6f428f)
400+
446401
The method design is intended to add only the default shortcut assignment, and does not override the user's settings if they decide to change it.
447402

403+
**SetBackground** extension sets the panel background color.
404+
405+
```csharp
406+
panel.SetBackground("Red");
407+
panel.SetBackground("#FF0000");
408+
panel.SetBackground("#AAFF0000");
409+
panel.SetBackground(Colors.Red);
410+
panel.SetBackground(Brushes.Red);
411+
panel.SetBackground(new LinearGradientBrush(
412+
[
413+
new GradientStop(Colors.White, 0),
414+
new GradientStop(Colors.Red, 1)
415+
], 45));
416+
```
417+
418+
**SetTitleBarBackground** extension sets the panel title bar background color.
419+
420+
```csharp
421+
panel.SetTitleBarBackground("Blue");
422+
panel.SetTitleBarBackground("#0000FF");
423+
panel.SetTitleBarBackground("#AA0000FF");
424+
panel.SetTitleBarBackground(Colors.Blue);
425+
panel.SetTitleBarBackground(Brushes.Blue);
426+
panel.SetTitleBarBackground(new LinearGradientBrush(
427+
[
428+
new GradientStop(Colors.White, 0),
429+
new GradientStop(Colors.Blue, 1)
430+
], 45));
431+
```
432+
433+
**SetSlideOutPanelBackground** extension sets the slide-out panel background color for the target panel.
434+
435+
```csharp
436+
panel.SetSlideOutBackground("Green");
437+
panel.SetSlideOutBackground("#00FF00");
438+
panel.SetSlideOutBackground("#AA00FF00");
439+
panel.SetSlideOutBackground(Colors.Green);
440+
panel.SetSlideOutBackground(Brushes.Green);
441+
panel.SetSlideOutBackground(new LinearGradientBrush(
442+
[
443+
new GradientStop(Colors.White, 0),
444+
new GradientStop(Colors.Green, 1)
445+
], 45));
446+
```
447+
448448
### ContextMenu Extensions
449449

450450
**ConfigureContextMenu** extension registers an action used to configure a Context menu.

0 commit comments

Comments
 (0)