File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
ricaun.AutoCAD.UI.Example Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
## [ 0.2.0] / 2025-07-04
8
8
### Features
9
9
- Add ` ricaun.AutoCAD.UI.Example ` sample project.
10
+ ### UI
11
+ - Add ` AddSeparator ` extension to create a separator in the ribbon panel.
12
+ ### Example
13
+ - Add ` CircleCreate ` command to the example project.
10
14
### Fixes
11
15
- Fix ` CheckURLValid ` to support ` http ` and ` https ` .
12
16
- Fix ` SetImage ` to update ` Image ` property.
Original file line number Diff line number Diff line change @@ -15,8 +15,13 @@ public override void OnStartup(RibbonControl ribbonControl)
15
15
{
16
16
var ribbonPanel = ribbonControl . CreateOrSelectPanel ( PanelName , TabName ) ;
17
17
18
- ribbonPanel . RowStackedItems (
18
+ ribbonPanel . RowLargeStackedItems (
19
19
ribbonPanel . CreateButton ( "Theme" )
20
+ . SetShowText ( false )
21
+ . SetCommand ( Commands . ThemeChange )
22
+ . SetLargeImage ( "https://github.com/ricaun-io/Autodesk.Icon.Example/releases/download/2.0.0/Box-Grey-Light.tiff" ) ,
23
+ ribbonPanel . CreateButton ( "Theme" )
24
+ . SetShowText ( false )
20
25
. SetCommand ( Commands . ThemeChange )
21
26
. SetLargeImage ( "https://github.com/ricaun-io/Autodesk.Icon.Example/releases/download/2.0.0/Box-Red-Light.tiff" ) ,
22
27
ribbonPanel . CreateButton ( "Theme" )
@@ -27,8 +32,12 @@ public override void OnStartup(RibbonControl ribbonControl)
27
32
. SetLargeImage ( "https://github.com/ricaun-io/Autodesk.Icon.Example/releases/download/2.0.0/Box-Blue-32-Light.png" )
28
33
) ;
29
34
30
- ribbonPanel . CreateButton ( "Circle" )
35
+ ribbonPanel . AddSeparator ( ) ;
36
+
37
+ ribbonPanel . CreateButton ( "Circle\r Create" )
31
38
. SetCommand ( Commands . CircleCreate )
39
+ . SetDescription ( "Create a circle with a random radius in the model space." )
40
+ . SetToolTip ( "This button use the command 'CircleCreate'." )
32
41
. SetLargeImage ( "Resources/Box-Cyan-Light.tiff" ) ;
33
42
34
43
ribbonControl . ActiveTab = ribbonPanel . Tab ;
Original file line number Diff line number Diff line change @@ -420,5 +420,17 @@ public static void Remove(this RibbonTab ribbonTab)
420
420
ribbonControl . Tabs . Remove ( ribbonTab ) ;
421
421
}
422
422
#endregion
423
+
424
+ /// <summary>
425
+ /// Adds a separator to the ribbon panel.
426
+ /// </summary>
427
+ /// <param name="ribbonPanel">The ribbon panel to extend.</param>
428
+ /// <returns>The ribbon panel with the separator added.</returns>
429
+ public static RibbonPanel AddSeparator ( this RibbonPanel ribbonPanel )
430
+ {
431
+ if ( ribbonPanel is null ) return ribbonPanel ;
432
+ ribbonPanel . AddItem ( new RibbonSeparator ( ) ) ;
433
+ return ribbonPanel ;
434
+ }
423
435
}
424
436
}
You can’t perform that action at this time.
0 commit comments