Skip to content

Commit a4f1598

Browse files
committed
Fix issue with component Description not showing up when hovering mouse on components in component tool box
1 parent 6da3397 commit a4f1598

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

src/Pixel.Automation.Core/Attributes/ToolBoxItemAttribute.cs

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,52 @@ namespace Pixel.Automation.Core.Attributes
99
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
1010
public class ToolBoxItemAttribute : Attribute
1111
{
12+
/// <summary>
13+
/// Name of the ToolBox Item
14+
/// </summary>
1215
public string Name { get; }
16+
17+
/// <summary>
18+
/// Category to which ToolBox Item belongs
19+
/// </summary>
1320
public string Category { get; }
21+
22+
/// <summary>
23+
/// SubCategory within Category
24+
/// </summary>
1425
public string SubCategory { get; }
26+
27+
/// <summary>
28+
/// Custom Icon for the ToolBoxItem
29+
/// </summary>
1530
public string IconSource { get; }
31+
32+
/// <summary>
33+
/// Description for the ToolBox Item
34+
/// </summary>
1635
public string Description { get; }
36+
37+
/// <summary>
38+
/// Tags associated with ToolBox Item that can be used to filter items
39+
/// </summary>
1740
public List<string> Tags { get; }
1841

42+
/// <summary>
43+
/// constructor
44+
/// </summary>
45+
/// <param name="name"></param>
46+
/// <param name="category"></param>
47+
/// <param name="subCategory"></param>
48+
/// <param name="iconSource"></param>
49+
/// <param name="description"></param>
50+
/// <param name="tags"></param>
1951
public ToolBoxItemAttribute(string name, string category, string subCategory = "", string iconSource = null, string description = null, params string[] tags)
2052
{
2153
Name = name;
2254
Category = category;
2355
SubCategory = subCategory;
2456
IconSource = iconSource;
25-
Description = null;
57+
Description = description;
2658
this.Tags = new List<string>();
2759
this.Tags.AddRange(tags);
2860
}

src/Pixel.Automation.Designer.Views/ToolBox/Component/ComponentToolBoxView.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@
8080
<ListBox.ItemTemplate>
8181
<DataTemplate>
8282
<StackPanel Orientation="Horizontal" Margin="5 0 0 0">
83-
<iconPacks:PackIconMaterial Kind="Circle" Width="8" Height="8" Margin="0,2,2,0" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource MahApps.Brushes.Accent}" />
84-
<TextBlock Text="{Binding Name}" ToolTip="{Binding Description}" Padding="2" FontSize="11" />
83+
<iconPacks:PackIconMaterial Kind="Circle" Width="10" Height="10" ToolTip="{Binding Description}" ToolTipService.InitialShowDelay="500"
84+
Margin="0,2,2,0" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource MahApps.Brushes.Accent}" />
85+
<TextBlock Text="{Binding Name}" Padding="2" FontSize="11" />
8586
</StackPanel>
8687
</DataTemplate>
8788
</ListBox.ItemTemplate>

0 commit comments

Comments
 (0)