File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ public string IcoPath
66
66
}
67
67
}
68
68
}
69
+ /// <summary>
70
+ /// Determines if Icon has a border radius
71
+ /// </summary>
72
+ public bool RoundedIcon { get ; set ; } = false ;
69
73
70
74
/// <summary>
71
75
/// Delegate function, see <see cref="Icon"/>
Original file line number Diff line number Diff line change 82
82
BorderThickness =" 0" >
83
83
<Image
84
84
x : Name =" ImageIcon"
85
- Width =" 32 "
86
- Height =" 32 "
85
+ Width =" {Binding IconXY} "
86
+ Height =" {Binding IconXY} "
87
87
Margin =" 0,0,0,0"
88
88
HorizontalAlignment =" Center"
89
89
Source =" {Binding Image, TargetNullValue={x:Null}}"
90
90
Stretch =" Uniform"
91
- Visibility =" {Binding ShowIcon}" />
91
+ Visibility =" {Binding ShowIcon}" >
92
+ <Image .Clip>
93
+ <EllipseGeometry RadiusX =" {Binding IconRadius}" RadiusY =" {Binding IconRadius}" Center =" 16 16" />
94
+ </Image .Clip>
95
+ </Image >
92
96
</Border >
93
97
<Border
94
98
Margin =" 9,0,0,0"
Original file line number Diff line number Diff line change @@ -84,6 +84,19 @@ public Visibility ShowIcon
84
84
}
85
85
}
86
86
87
+ public double IconRadius
88
+ {
89
+ get
90
+ {
91
+ if ( Result . RoundedIcon )
92
+ {
93
+ return IconXY / 2 ;
94
+ }
95
+ return IconXY ;
96
+ }
97
+
98
+ }
99
+
87
100
public Visibility ShowGlyph
88
101
{
89
102
get
@@ -175,6 +188,8 @@ public int ResultProgress
175
188
176
189
public string QuerySuggestionText { get ; set ; }
177
190
191
+ public double IconXY { get ; set ; } = 32 ;
192
+
178
193
public override bool Equals ( object obj )
179
194
{
180
195
return obj is ResultViewModel r && Result . Equals ( r . Result ) ;
You can’t perform that action at this time.
0 commit comments