StreamResourceInfo sri=Application.GetResourceStream(
            new Uri("stop.ani",UriKind.Relative));
            Cursor customCurrsor=new Cursor (sri.Stream);
            this.Cursor=customCurrsor;


Cursor对象不直接支持URI资源语法,通过该语法其它WPF元素(如Image对象)可以使用保存在编译过的程序集中的文件,然后。为应用程序添加光标文件作为资源,然后作为可以用于构造Cursor对象的资源检索改资源,用Application.GetResourceStream()

相关文章:

  • 2022-12-23
  • 2021-10-26
  • 2021-04-14
  • 2021-04-11
  • 2021-11-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案