Skip to content

Commit

Permalink
Fix potential paths in the whole XAML
Browse files Browse the repository at this point in the history
  • Loading branch information
timotei committed Nov 21, 2017
1 parent db9e300 commit 601c050
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -2,8 +2,11 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="150" Height="50" Background="Red">
<UserControl.Resources>
<ImageSource x:Key="ImageSource">/ClassLibrary;component/Resources/image.png</ImageSource>
</UserControl.Resources>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Library User Control" />
<Image x:Name="TheImage" Source="/ClassLibrary;component/Resources/image.png" Height="10" Width="10" />
<Image x:Name="TheImage" Source="{StaticResource ImageSource}" Height="10" Width="10" />
</StackPanel>
</UserControl>
9 changes: 9 additions & 0 deletions ILRepack/Steps/ResourceProcessing/BamlResourcePatcher.cs
Expand Up @@ -66,6 +66,15 @@ private void ProcessRecord(PropertyWithConverterRecord record, AssemblyDefinitio
_otherAssemblies);
}

private void ProcessRecord(TextWithConverterRecord record, AssemblyDefinition containingAssembly)
{
record.Value = XamlResourcePathPatcherStep.PatchPath(
record.Value,
_mainAssembly,
containingAssembly,
_otherAssemblies);
}

private void ProcessRecord(AssemblyInfoRecord record, AssemblyDefinition containingAssembly)
{
var assemblyName = new System.Reflection.AssemblyName(record.AssemblyFullName);
Expand Down

0 comments on commit 601c050

Please sign in to comment.