You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The custom control does not apply default style while it use as root element in xaml #185
kind/enhancementNew feature or requestplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformplatform/ios 🍎Categorizes an issue or PR as relevant to the iOS platformplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platform
Bug report (I searched for similar issues and did not find one)
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
kind/enhancementNew feature or requestplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformplatform/ios 🍎Categorizes an issue or PR as relevant to the iOS platformplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platform
Activity
Daoting commentedon Sep 11, 2018
xaml content like this:
<dt:SingleWin
x:Class="Dt.Sample.SamplesMain"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dt="using:Dt.Base">
...
</dt:SingleWin>
code-behind:
public sealed partial class SamplesMain : SingleWin
{
public SamplesMain()
{
InitializeComponent();
}
}
jeromelaban commentedon Sep 11, 2018
Thanks for the report! DefaultStyleKey is not supported yet. it's forcibly using this.GetType() by default for now. I'll link this issue to #119.
davidjohnoliver commentedon Jul 2, 2020
Fixed by #1766
Merge pull request unoplatform#185 from unoplatform/pj/fix-dotnet-pac…