中易网

WPF中的xaml引用不同项目间资源的问题

答案:3  悬赏:70  
解决时间 2021-01-12 11:16
  • 提问者网友:夢醒日落
  • 2021-01-11 22:07
WPF中的xaml引用不同项目间资源的问题
最佳答案
  • 二级知识专家网友:神鬼未生
  • 2021-01-11 23:21
Thread t1 = null;
Thread t2 = null;
private void Form1_Load(object sender, EventArgs e)
{
t1 = new Thread(new ThreadStart(T1));
t1.Start();
t2 = new Thread(new ThreadStart(T2));
t2.Start();
}

private void button1_Click(object sender, EventArgs e)
{
if (t1.ThreadState == ThreadState.Aborted||t1.ThreadState==ThreadState.Stopped)
{
MessageBox.Show("线程1结束了");
t1.Abort();
}
if (t2.ThreadState == ThreadState.Aborted||t1.ThreadState==ThreadState.Stopped)
{
MessageBox.Show("线程2结束了");
t2.Abort();
}
}
private void T1()
{
MessageBox.Show("进程1");

}
private void T2()
{
MessageBox.Show("进程2");

}
全部回答
  • 1楼网友:污到你湿
  • 2021-01-11 23:41
工作目录的路径?
  • 2楼网友:污到你湿
  • 2021-01-11 23:30
其中resources中的images的btn.png的properties的Build Action要设置为resource,然后使用
即可,当让要引用resources工程,意思是告诉wpf去resource的dll中找到btn.png这个组件。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息