Share via


ImageIcon.Source 属性

定义

获取或设置要用作图标的图像文件的 URI。

public:
 property ImageSource ^ Source { ImageSource ^ get(); void set(ImageSource ^ value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
ImageSource Source();

void Source(ImageSource value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
ImageSource Source();

void Source(ImageSource value);
public ImageSource Source { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public ImageSource Source { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
var imageSource = imageIcon.source;
imageIcon.source = imageSource;
Public Property Source As ImageSource

属性值

要用作图标的图像文件的 URI。 默认为 null

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

适用于

另请参阅