I have created a resource in XAML like this:<window.resources> <!--Opretter Agents objekt--> <local:agents x:key="AgentsList" xmlns:x="#unknown" xmlns:local="#unknown" /></window.resources>Now I wish to "update" that resource.I wish to load from a XML file, and then make the resource use "agents".agents = FindResource("AgentsList") as Agents;agents = AgentsXmlSerializer.DeSerialize();so I want the window resource <local:agents x:key="AgentsList" xmlns:x="#unknown" xmlns:local="#unknown" />to use the agents I just deserialized agents = AgentsXmlSerializer.DeSerialize();how do I do this? 解决方案 这篇关于从代码更新Xaml中的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-09 20:36