Wednesday, December 3, 2014

Refer WPF dictionary in another library

<UserControl x:Class="ProcessPictureUserControls.DualSensors"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:lib="clr-namespace:PPLibrary;assembly=PPLibrary1.12.0.1" 
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d" 
             Name="UserControl"
             d:DesignHeight="40" d:DesignWidth="200">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/PPLibrary1.12.0.1;component/Themes/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

.
.
.
<Border Name="InnerBorder" CornerRadius="20" Margin="3" BorderBrush="LightGray" Background="{StaticResource ResourceKey=DarkBrush}"  BorderThickness="{Binding Path=RegulationState, Mode=OneWay, Converter={StaticResource ResourceKey=regulationStateToBorderOnOffConverter},FallbackValue=1}" />

No comments:

Post a Comment