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:
1 parent
3be68c3010
commit
d997aee5f7
23 files changed
+161
-129
No files matched your search
+3
-3
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user