Windows phone 8 在Windows Phone 8中重写样式

Windows phone 8 在Windows Phone 8中重写样式,windows-phone-8,Windows Phone 8,我有一个我们的客户集成的dll,它提供用户控件,我想允许样式覆盖。在Windows应用商店中,我可以执行以下操作: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary.MergedDict

我有一个我们的客户集成的dll,它提供用户控件,我想允许样式覆盖。在Windows应用商店中,我可以执行以下操作:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="ms-appx:///MyDLL/Assets/Styles/Default.xaml"/>
    <ResourceDictionary Source="ms-appx:///OverrideStyles.xaml"/>
  </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

并查找用户应用程序中定义的本地AppboyStyles.xaml。我无法为WindowsPhone8找到合适的URI以允许类似的功能

编辑:

假设我在A.dll中有UserControl1,UserControl1有一个样式资源字典,如下所示:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/A;component/Assets/Styles/Default.xaml"/>
    <ResourceDictionary Source="/TestApp;component/Assets/Styles/Override.xaml"/>
  </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>


这实际上可以在TestApp中使用,但我不能硬编码一个调用应用程序,因为它是一个要分发的库。因此,我需要一种方法来替换调用的应用程序dll名称,或者使用一个URI来计算当前应用程序的资源。

同样的问题?不,我没有对主题做任何事情,只需要允许通过合并的资源字典进行静态资源覆盖。您是否尝试过在代码/C#而不是XAML中合并字典?是的,但这也有一系列问题(大多数情况下,我需要覆盖静态资源,但是可以合并字典的地方发生在控件的样式解析之后。)