now hc styles can be referenced in window.resource

by the way, supported multiple themes at the same time, It may be related to #574
This commit is contained in:
NaBian committed 2021-05-30 01:47:30 +08:00
1 parent 3be68c3010
commit d997aee5f7
23 files changed
+161 -129

No files matched your search

@@ -13,13 +13,13 @@ namespace HandyControl.Tools
var count = comboBox.Items.Count;
if (count == 1)
{
return ResourceHelper.GetResource<Style>(ResourceToken.ComboBoxItemCapsuleSingle);
return ResourceHelper.GetResourceInternal<Style>(ResourceToken.ComboBoxItemCapsuleSingle);
}
var index = comboBox.ItemContainerGenerator.IndexFromContainer(comboBoxItem);
return index == 0
? ResourceHelper.GetResource<Style>(ResourceToken.ComboBoxItemCapsuleHorizontalFirst)
: ResourceHelper.GetResource<Style>(index == count - 1
? ResourceHelper.GetResourceInternal<Style>(ResourceToken.ComboBoxItemCapsuleHorizontalFirst)
: ResourceHelper.GetResourceInternal<Style>(index == count - 1
? ResourceToken.ComboBoxItemCapsuleHorizontalLast
: ResourceToken.ComboBoxItemCapsuleDefault);
}