'how Handy Control don't effect on my App theme?

I want to use PersianDatepicker in my WPF App. I use HandyControl For That. but when use it in my App All of My App themes changed.

I use this Tag in my App.xaml

    <ResourceDictionary.MergedDictionaries >
        <hc:ThemeResources />
        <hc:Theme />
    </ResourceDictionary.MergedDictionaries>

Now I don't want this package to affect the All of My App themes.



Solution 1:[1]

You can use it in a specific UserControl and add config in it's resource like this:

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:hc="https://handyorg.github.io/handycontrol"
    x:Name="UserControl">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <hc:Theme />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel>
            <hc:PersianDateTimePicker
                Style="{StaticResource DateTimePickerExtendPersian}" />
    </StackPanel>
</UserControl>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohammad Roshani