更新
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
|
||||
|
||||
|
||||
using WPFluent.Controls;
|
||||
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
using WPFluent.Controls;
|
||||
|
||||
namespace WPFluent.Markup;
|
||||
|
||||
@@ -22,7 +24,10 @@ namespace WPFluent.Markup;
|
||||
public class ImageIconExtension : MarkupExtension
|
||||
{
|
||||
public ImageIconExtension(ImageSource? source) { Source = source; }
|
||||
|
||||
public ImageIconExtension(string source)
|
||||
{
|
||||
Source = new BitmapImage(new Uri(source, UriKind.RelativeOrAbsolute));
|
||||
}
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
var imageIcon = new ImageIcon { Source = Source, Width = Width, Height = Height, };
|
||||
|
||||
Reference in New Issue
Block a user