How to merge resource dictionaries from another assembly

LINOLINO Member

This merges locally defined resource dictionaries:

<Application.Resources>


</Application.Resources>

How can I merge a resource dictionary located in another assembly?

The UWP syntax to accomplish this looks like this:
<ResourceDictionary.MergedDictionaries>

</ResourceDictionary.MergedDictionaries>

How do I do this in XAMARIN 3.x ??

Answers

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    I think your answer is in this blog which gives the following example.

    <Application.Resources>
            <ResourceDictionary MergedWith="local:Colors">
            <Style x:Key="LabelPageHeadingStyle" TargetType="Label">
                <Setter Property="FontAttributes" Value="Bold" />
                <Setter Property="HorizontalOptions" Value="Center" />
                <Setter Property="TextColor" Value="{StaticResource HeadingTextColor}" />
            </Style>
            </ResourceDictionary>
    </Application.Resources>
    

    I'm assuming that the local namespace can be referencing another assembly here of course.

Sign In or Register to comment.