I have a .xaml file Namely "Default.resx" Which is in a separate folder called "Resources". I register this file on app.xaml file as below.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Resources/Default.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Then try to use on a .XAML file like
<TextBox x:Name="TxtClient" FontSize="9" Grid.Column="3" vali:TextBoxBehavior.HomeOnLostFocus="True" LostFocus="TxtClient_LostFocus"
Height="19" Style="{StaticResource TextAutoCompleteStyle}" Text="{Binding FieldName, Mode=TwoWay}" Margin="4,1,1,0" d:LayoutOverrides="HorizontalAlignment" />
'TextAutoCompleteStyle " I have defined on Default.resx file as below
<Style x:Key="TextAutoCompleteStyle" TargetType="TextBox">
<Setter Property="Height" Value="15"/>
<Setter Property="Width" Value="10"/>
<Setter Property="Foreground" Value="Black"/>
</Style>
Note- However inline static resource is working fine. If we define the static resource on page and use to the control on the same page.
Please Help
Thanks