“The calling thread must be STA, because many UI components require this.” Error in WPF?

后端 未结 2 1814
小鲜肉
小鲜肉 2020-12-16 07:51

I am creating a xps document as below.

Assembly assembly = Assembly.GetExecutingAssembly();
//read embedded xpsDocument file
Stream helpStream = assembly.Get         


        
2条回答
  •  盖世英雄少女心
    2020-12-16 08:19

    Is your code trying to access the xps doc from a background thread? If this is the case, you'll want to use the dispatcher. Info on that here.

    If this doesn't help, could you post the code where you're actually calling GetFixedDocumentSequence()?

提交回复
热议问题