using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Media::Imaging;

      Image图像处理

              //Image
            property ImageSource^ Image
            {
                ImageSource^ get()
                {
                    return _Image;
                }
                void set(ImageSource^ value)
                {
                    _Image = value;
                    OnPropertyChanged("Image");
                }
            }

void SetImage(Windows::Foundation::Uri^ baseUri, Platform::String^ path) //SetImage() in C# code
            {
                Windows::Foundation::Uri^ uri = ref new Windows::Foundation::Uri("ms-appx:///" + path);        
                Image = ref new BitmapImage(uri);
            }
Windows::Foundation::Uri^ _baseUri = ref new Windows::Foundation::Uri("ms-appx:///");
SetImage(_baseUri, "SampleData/Images/60Banana.png");

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2021-08-09
  • 2021-10-30
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2022-12-23
  • 2021-05-15
  • 2021-11-23
  • 2021-10-28
  • 2022-01-09
  • 2021-09-09
相关资源
相似解决方案