The custom control does not apply default style while it use as root element in xaml #185
Labels
kind/enhancement
New feature or request
platform/android 🤖
Categorizes an issue or PR as relevant to the Android platform
platform/ios 🍎
Categorizes an issue or PR as relevant to the iOS platform
platform/wasm 🌐
Categorizes an issue or PR as relevant to the WebAssembly platform
I'm submitting a...
Current behavior
The custom control does not apply default style while it use as root element in xaml. When I set style by key in constructor instead of DefaultStyleKey, it's correct. The code:
public SingleWin()
{
#if UWP
DefaultStyleKey = typeof(SingleWin);
#else
Style = (Style)Application.Current.Resources["SingleWin"];
#endif
}
Expected behavior
Minimal reproduction of the problem with instructions
Environment
The text was updated successfully, but these errors were encountered: