204 references to StyleHelper
PresentationFramework (204)
src\Framework\System\Windows\Annotations\AnnotationHelper.cs (1)
682
host =
StyleHelper
.FindNameInTemplateContent(fdr, "PART_ContentHost", fdr.TemplateInternal) as Decorator;
src\Framework\System\Windows\Condition.cs (1)
223
StyleHelper
.SealIfSealable(_value);
src\Framework\System\Windows\Controls\ContentPresenter.cs (4)
810
StyleHelper
.UpdateTemplateCache(c, (FrameworkTemplate) e.OldValue, (FrameworkTemplate) e.NewValue, TemplateProperty);
883
StyleHelper
.DoTemplateInvalidations(this, oldTemplate);
1020
StyleHelper
.AddCustomTemplateRoot( container, e );
1073
StyleHelper
.AddCustomTemplateRoot(
src\Framework\System\Windows\Controls\Control.cs (1)
449
StyleHelper
.UpdateTemplateCache(c, (FrameworkTemplate) e.OldValue, (FrameworkTemplate) e.NewValue, TemplateProperty);
src\Framework\System\Windows\Controls\ItemsPresenter.cs (1)
148
StyleHelper
.UpdateTemplateCache(ip, (FrameworkTemplate) e.OldValue, (FrameworkTemplate) e.NewValue, TemplateProperty);
src\Framework\System\Windows\Controls\Page.cs (1)
559
StyleHelper
.UpdateTemplateCache(p, (FrameworkTemplate) e.OldValue, (FrameworkTemplate) e.NewValue, TemplateProperty);
src\Framework\System\Windows\Controls\TreeViewItem.cs (1)
827
int index =
StyleHelper
.QueryChildIndexFromChildName(HeaderPartName, template.ChildIndexFromChildName);
src\Framework\System\Windows\Data\BindingOperations.cs (2)
172
Expression expr =
StyleHelper
.GetExpression(target, dp);
294
object o =
StyleHelper
.GetExpression(target, dp);
src\Framework\System\Windows\DataTrigger.cs (2)
154
StyleHelper
.SealIfSealable(_value);
194
return TriggerConditions[0].ConvertAndMatch(
StyleHelper
.GetDataTriggerValue(dataField, container, TriggerConditions[0].Binding));
src\Framework\System\Windows\DependencyPropertyHelper.cs (1)
217
return
StyleHelper
.IsValueDynamic(templatedParent, templateChildIndex, dependencyProperty);
src\Framework\System\Windows\FrameworkContentElement.cs (7)
162
StyleHelper
.UpdateStyleCache(null, fce, (Style) e.OldValue, (Style) e.NewValue, ref fce._styleCache);
236
StyleHelper
.UpdateThemeStyleCache(null, fce, (Style) oldValue, (Style) newValue, ref fce._themeStyleCache);
532
if (
StyleHelper
.GetValueFromStyleOrTemplate(new FrameworkObject(null, this), dp, ref entry))
673
return
StyleHelper
.GetValueFromTemplatedParent(
745
StyleHelper
.OnTriggerSourcePropertyInvalidated(null, frameworkTemplate, TemplatedParent, dp, e, false /*invalidateOnlyContainer*/,
753
StyleHelper
.OnTriggerSourcePropertyInvalidated(Style, null, this, dp, e, true /*invalidateOnlyContainer*/,
763
StyleHelper
.OnTriggerSourcePropertyInvalidated(ThemeStyle, null, this, dp, e, true /*invalidateOnlyContainer*/,
src\Framework\System\Windows\FrameworkElement.cs (17)
183
StyleHelper
.UpdateStyleCache(fe, null, (Style) e.OldValue, (Style) e.NewValue, ref fe._styleCache);
283
StyleHelper
.UpdateThemeStyleCache(fe, null, (Style) oldValue, (Style) newValue, ref fe._themeStyleCache);
359
UncommonField<HybridDictionary[]> dataField =
StyleHelper
.TemplateDataField;
382
StyleHelper
.InvokeDeferredActions(this, template);
816
return
StyleHelper
.FindNameInTemplateContent(this, childName, template) as DependencyObject;
1230
if ((fe != startNode.FE) ||
StyleHelper
.ShouldGetValueFromStyle(dp))
1235
if ((fe != startNode.FE) ||
StyleHelper
.ShouldGetValueFromTemplate(dp))
1240
if ((fe != startNode.FE) ||
StyleHelper
.ShouldGetValueFromThemeStyle(dp))
1266
if ((fce != startNode.FCE) ||
StyleHelper
.ShouldGetValueFromStyle(dp))
1271
if ((fce != startNode.FCE) ||
StyleHelper
.ShouldGetValueFromThemeStyle(dp))
1880
if (
StyleHelper
.GetValueFromStyleOrTemplate(new FrameworkObject(this, null), dp, ref entry))
1950
return
StyleHelper
.GetValueFromTemplatedParent(
2109
StyleHelper
.OnTriggerSourcePropertyInvalidated(null, frameworkTemplate, TemplatedParent, dp, e, false /*invalidateOnlyContainer*/,
2118
StyleHelper
.OnTriggerSourcePropertyInvalidated(Style, null, this, dp, e, true /*invalidateOnlyContainer*/,
2126
StyleHelper
.OnTriggerSourcePropertyInvalidated(null, TemplateInternal, this, dp, e, !HasTemplateGeneratedSubTree /*invalidateOnlyContainer*/,
2133
StyleHelper
.OnTriggerSourcePropertyInvalidated(ThemeStyle, null, this, dp, e, true /*invalidateOnlyContainer*/,
3041
handlers =
StyleHelper
.GetChildRoutedEventHandlers(templateChildIndex, args.RoutedEvent, ref templatedParentTemplate.EventDependents);
src\Framework\System\Windows\FrameworkElementFactory.cs (6)
231
if (
StyleHelper
.IsStylingLogicalTree(dp, value))
619
StyleHelper
.SealIfSealable(propertyValue.ValueInternal);
633
_childIndex =
StyleHelper
.CreateChildIndexFromChildName(_childName, _frameworkTemplate);
728
if (
StyleHelper
.HasResourceDependentsForChild(_childIndex, ref resourceDependents))
749
StyleHelper
.CreateInstanceDataForChild(dataField, container, treeNode, _childIndex,
824
StyleHelper
.InvalidatePropertiesOnTemplateNode(
src\Framework\System\Windows\FrameworkTemplate.cs (20)
322
return
StyleHelper
.FindNameInTemplateContent(templatedParent, name, this);
414
StyleHelper
.SealTemplate(
453
StyleHelper
.SortResourceDependents(ref ResourceDependents);
502
bool visualsCreated =
StyleHelper
.ApplyTemplateContent(templateDataField, container,
784
StyleHelper
.ParentTemplateValuesField.SetValue(dependencyObject, parentTemplateValues);
789
parentTemplateValues =
StyleHelper
.ParentTemplateValuesField.GetValue(dependencyObject);
810
HybridDictionary instanceValues =
StyleHelper
.EnsureInstanceData(
StyleHelper
.TemplateDataField, templatedParent, InstanceStyleData.InstanceValues);
811
StyleHelper
.ProcessInstanceValue(dependencyObject, childIndex, instanceValues, dependencyProperty,
StyleHelper
.UnsharedTemplateContentPropertyIndex, true /*apply*/);
826
HybridDictionary instanceValues =
StyleHelper
.EnsureInstanceData(
StyleHelper
.TemplateDataField, templatedParent, InstanceStyleData.InstanceValues);
827
StyleHelper
.ProcessInstanceValue(dependencyObject, childIndex, instanceValues, dependencyProperty,
StyleHelper
.UnsharedTemplateContentPropertyIndex, true /*apply*/);
868
StyleHelper
.GetInstanceValue(
869
StyleHelper
.TemplateDataField,
875
StyleHelper
.UnsharedTemplateContentPropertyIndex,
1205
if (
StyleHelper
.HasResourceDependentsForChild(templateChildIndex, ref this.ResourceDependents))
1212
StyleHelper
.InvalidatePropertiesOnTemplateNode(container,
1256
childIndex =
StyleHelper
.QueryChildIndexFromChildName(name, childIndexFromChildName);
src\Framework\System\Windows\Generated\FrameworkContentElement.cs (2)
593
FrameworkElementFactory fef =
StyleHelper
.FindFEF(fefRoot, TemplateChildIndex);
640
StyleHelper
.GetThemeStyle(/* fe = */ null, /* fce = */ this);
src\Framework\System\Windows\Generated\FrameworkElement.cs (2)
613
FrameworkElementFactory fef =
StyleHelper
.FindFEF(fefRoot, TemplateChildIndex);
660
StyleHelper
.GetThemeStyle(/* fe = */ this, /* fce = */ null);
src\Framework\System\Windows\MultiDataTrigger.cs (1)
156
retVal = TriggerConditions[i].ConvertAndMatch(
StyleHelper
.GetDataTriggerValue(dataField, container, TriggerConditions[i].Binding));
src\Framework\System\Windows\MultiTrigger.cs (1)
108
(_conditions[i].SourceName != null) ? _conditions[i].SourceName :
StyleHelper
.SelfName);
src\Framework\System\Windows\ResourceDictionary.cs (1)
2313
StyleHelper
.SealIfSealable(value);
src\Framework\System\Windows\Setter.cs (1)
137
StyleHelper
.SealIfSealable(_value);
src\Framework\System\Windows\Style.cs (15)
45
StyleHelper
.RegisterAlternateExpressionStorage();
478
propertyValue.ChildName =
StyleHelper
.SelfName;
574
StyleHelper
.AddEventDependent(0, this.EventHandlersStore, ref EventDependents);
585
StyleHelper
.SortResourceDependents(ref ResourceDependents);
735
StyleHelper
.UpdateTables(ref propertyValue, ref ChildRecordFromChildIndex,
741
StyleHelper
.AddContainerDependent(propertyValue.Property, false /*fromVisualTrigger*/, ref ContainerDependents);
771
if (propertyValue.ChildName !=
StyleHelper
.SelfName)
779
if( conditions[k].SourceName !=
StyleHelper
.SelfName )
787
StyleHelper
.AddContainerDependent(propertyValue.Property, true /*fromVisualTrigger*/, ref this.ContainerDependents);
789
StyleHelper
.UpdateTables(ref propertyValue, ref ChildRecordFromChildIndex,
799
StyleHelper
.AddPropertyTriggerWithAction( trigger, ((Trigger)trigger).Property, ref this.PropertyTriggersWithActions );
808
StyleHelper
.AddPropertyTriggerWithAction( trigger, triggerCondition.Property, ref this.PropertyTriggersWithActions );
813
StyleHelper
.AddDataTriggerWithAction( trigger, ((DataTrigger)trigger).Binding, ref this.DataTriggersWithActions );
822
StyleHelper
.AddDataTriggerWithAction( trigger, dataCondition.Binding, ref this.DataTriggersWithActions );
840
StyleHelper
.ProcessEventTrigger(eventTrigger,
src\Framework\System\Windows\StyleHelper.cs (91)
81
StyleHelper
.DoStyleInvalidations(fe, fce, oldStyle, newStyle);
85
StyleHelper
.ExecuteOnApplyEnterExitActions(fe, fce, newStyle, StyleDataField);
114
if (
StyleHelper
.IsSetOnContainer(FrameworkElement.OverridesDefaultStyleProperty, ref newThemeStyle.ContainerDependents, true))
149
StyleHelper
.DoThemeStyleInvalidations(fe, fce, oldThemeStyle, newThemeStyle, style);
153
StyleHelper
.ExecuteOnApplyEnterExitActions(fe, fce, newThemeStyle, ThemeStyleDataField);
324
StyleHelper
.DoTemplateInvalidations(fe, oldTemplate);
328
StyleHelper
.ExecuteOnApplyEnterExitActions(fe, null, newTemplate);
408
StyleHelper
.ProcessTemplateContentFromFEF(
427
StyleHelper
.ProcessTemplateTriggers(
450
if (
StyleHelper
.IsSetOnContainer(Control.TemplateProperty, ref containerDependents, true) ||
451
StyleHelper
.IsSetOnContainer(ContentPresenter.TemplateProperty, ref containerDependents, true))
458
if (
StyleHelper
.IsSetOnContainer(FrameworkElement.StyleProperty, ref containerDependents, true))
465
if (
StyleHelper
.IsSetOnContainer(FrameworkElement.DefaultStyleKeyProperty, ref containerDependents, true))
472
if (
StyleHelper
.IsSetOnContainer(FrameworkElement.OverridesDefaultStyleProperty, ref containerDependents, true))
479
if (
StyleHelper
.IsSetOnContainer(FrameworkElement.NameProperty, ref containerDependents, true))
874
StyleHelper
.UpdateTables(ref propertyValue, ref childRecordFromChildIndex,
881
StyleHelper
.AddEventDependent(factory._childIndex, factory.EventHandlersStore,
939
conditions[k].SourceChildIndex =
StyleHelper
.QueryChildIndexFromChildName(conditions[k].SourceName, childIndexFromChildID);
948
if (propertyValue.ChildName ==
StyleHelper
.SelfName)
954
StyleHelper
.AddContainerDependent(propertyValue.Property, true /*fromVisualTrigger*/, ref containerDependents);
957
StyleHelper
.UpdateTables(ref propertyValue, ref childRecordFromChildIndex,
967
StyleHelper
.AddPropertyTriggerWithAction( triggerBase, trigger.Property, ref propertyTriggersWithActions );
975
StyleHelper
.AddPropertyTriggerWithAction( triggerBase, triggerCondition.Property, ref propertyTriggersWithActions );
980
StyleHelper
.AddDataTriggerWithAction( triggerBase, dataTrigger.Binding, ref dataTriggersWithActions );
988
StyleHelper
.AddDataTriggerWithAction( triggerBase, dataCondition.Binding, ref dataTriggersWithActions );
999
StyleHelper
.ProcessEventTrigger(eventTrigger,
1094
int childIndex =
StyleHelper
.QueryChildIndexFromChildName(eventTrigger.SourceName, childIndexFromChildName);
1156
childFef =
StyleHelper
.FindFEF(templateRoot, eventTrigger.TriggerChildIndex);
1183
StyleHelper
.AddDelegateToFireTrigger(eventTrigger.RoutedEvent,
1223
StyleHelper
.AddDelegateToFireTrigger(eventTrigger.RoutedEvent,
1252
StyleHelper
.AddEventDependent(0, eventHandlersStore, ref eventDependents);
1254
eventHandlersStore.AddRoutedEventHandler(routedEvent,
StyleHelper
.EventTriggerHandlerOnContainer, false/* HandledEventsToo */);
1265
StyleHelper
.AddEventDependent(childIndex, childFef.EventHandlersStore, ref eventDependents);
1267
childFef.EventHandlersStore.AddRoutedEventHandler(routedEvent,
StyleHelper
.EventTriggerHandlerOnChild, false/* HandledEventsToo */);
1295
StyleHelper
.AddEventDependent( childIndex,
1298
eventHandlersStore.AddRoutedEventHandler(routedEvent,
StyleHelper
.EventTriggerHandlerOnChild, false/* HandledEventsToo */);
1386
StyleHelper
.ProcessInstanceValuesForChild(
1396
StyleHelper
.ProcessInstanceValuesForChild(
1421
StyleHelper
.ProcessInstanceValuesForChild(
1454
StyleHelper
.ProcessInstanceValuesForChild(
1465
StyleHelper
.ProcessInstanceValuesForChild(
2145
templatedChildren =
StyleHelper
.TemplatedFeChildrenField.GetValue(feContainer);
2146
StyleHelper
.TemplatedFeChildrenField.ClearValue(feContainer);
2150
templatedChildren =
StyleHelper
.TemplatedFeChildrenField.GetValue(fceContainer);
2151
StyleHelper
.TemplatedFeChildrenField.ClearValue(fceContainer);
2303
HybridDictionary parentTemplateValues =
StyleHelper
.ParentTemplateValuesField.GetValue(walk);
2305
StyleHelper
.ParentTemplateValuesField.ClearValue(walk);
2316
StyleHelper
.ProcessInstanceValue(walk, childIndex, instanceValues, dp, -1, false /*apply*/);
2678
sourceNode =
StyleHelper
.GetChild(container, sourceChildIndex);
3170
StyleHelper
.UpdateLoadedFlag( container, oldStyle, newStyle );
3175
StyleHelper
.UpdateInstanceData(
3176
StyleHelper
.StyleDataField,
3198
oldStyle != null ? oldStyle.ContainerDependents :
StyleHelper
.EmptyContainerDependents;
3201
newStyle != null ? newStyle.ContainerDependents :
StyleHelper
.EmptyContainerDependents;
3206
StyleHelper
.InvalidateContainerDependents(container,
3252
StyleHelper
.UpdateLoadedFlag( container, oldThemeStyle, newThemeStyle );
3257
StyleHelper
.UpdateInstanceData(
3258
StyleHelper
.ThemeStyleDataField,
3280
oldThemeStyle != null ? oldThemeStyle.ContainerDependents :
StyleHelper
.EmptyContainerDependents;
3283
newThemeStyle != null ? newThemeStyle.ContainerDependents :
StyleHelper
.EmptyContainerDependents;
3291
StyleHelper
.InvalidateContainerDependents(container,
3324
oldTemplateData =
StyleHelper
.TemplateDataField.GetValue(feContainer);
3338
StyleHelper
.UpdateLoadedFlag( container, oldFrameworkTemplate, newFrameworkTemplate );
3349
StyleHelper
.UpdateInstanceData(
3350
StyleHelper
.TemplateDataField,
3390
oldContainerDependents = (oldFrameworkTemplate != null) ? oldFrameworkTemplate.ContainerDependents :
StyleHelper
.EmptyContainerDependents;
3391
newContainerDependents = (newFrameworkTemplate != null) ? newFrameworkTemplate.ContainerDependents :
StyleHelper
.EmptyContainerDependents;
3395
StyleHelper
.ClearGeneratedSubTree(oldTemplateData,
3403
StyleHelper
.InvalidateContainerDependents(container,
3431
StyleHelper
.ClearGeneratedSubTree(oldTemplateData, feContainer /* fe */, null /* fce */,
3469
List<ResourceDictionary> oldStyleTables =
StyleHelper
.GetResourceDictionariesFromStyle(oldStyle);
3470
List<ResourceDictionary> newStyleTables =
StyleHelper
.GetResourceDictionariesFromStyle(newStyle);
3772
object value =
StyleHelper
.GetChildValue(
3773
StyleHelper
.TemplateDataField,
3808
HybridDictionary parentTemplateValues =
StyleHelper
.ParentTemplateValuesField.GetValue(child.DO);
3818
StyleHelper
.GetInstanceValue(
3819
StyleHelper
.TemplateDataField,
3825
StyleHelper
.UnsharedTemplateContentPropertyIndex,
3874
if ((style != null) &&
StyleHelper
.ShouldGetValueFromStyle(dp))
3883
value =
StyleHelper
.GetChildValue(
3884
StyleHelper
.StyleDataField,
3915
if (
StyleHelper
.ShouldGetValueFromTemplate(dp))
3925
value =
StyleHelper
.GetChildValue(
3926
StyleHelper
.TemplateDataField,
3958
if (
StyleHelper
.ShouldGetValueFromThemeStyle(dp))
3970
value =
StyleHelper
.GetChildValue(
3971
StyleHelper
.ThemeStyleDataField,
5363
if (childName ==
StyleHelper
.SelfName)
5398
index =
StyleHelper
.QueryChildIndexFromChildName(childName, frameworkTemplate.ChildIndexFromChildName);
5417
return
StyleHelper
.GetChild(container, index);
5851
this(binding, logicalOp, value,
StyleHelper
.SelfName)
src\Framework\System\Windows\SystemResources.cs (1)
1839
StyleHelper
.SealIfSealable(value);
src\Framework\System\Windows\TemplateContent.cs (9)
290
StyleHelper
.SealIfSealable(value.ValueInternal);
293
StyleHelper
.UpdateTables(ref value, ref OwnerTemplate.ChildRecordFromChildIndex, ref OwnerTemplate.TriggerSourceRecordFromChildIndex,
353
int childIndex =
StyleHelper
.CreateChildIndexFromChildName(name, OwnerTemplate);
1319
StyleHelper
.UpdateTables(ref pv, ref childRecordFromChildIndex,
1340
StyleHelper
.UpdateTables(ref pv, ref childRecordFromChildIndex,
1356
StyleHelper
.UpdateTables(ref pv, ref childRecordFromChildIndex,
1373
StyleHelper
.UpdateTables(ref pv, ref childRecordFromChildIndex,
1412
StyleHelper
.UpdateTables(ref propertyValue,
1431
StyleHelper
.UpdateTables(ref propertyValue,
src\Framework\System\Windows\TemplateNameScope.cs (4)
185
StyleHelper
.CreateInstanceDataForChild(
186
StyleHelper
.TemplateDataField,
218
return
StyleHelper
.FindNameInTemplateContent(fo.FE, name, fo.FE.TemplateInternal);
264
private static UncommonField<Hashtable> _templatedNonFeChildrenField = (UncommonField<Hashtable>)
StyleHelper
.TemplatedNonFeChildrenField;
src\Framework\System\Windows\TreeWalkHelper.cs (7)
781
StyleHelper
.InvalidateResourceDependents(d, info, ref fe.Style.ResourceDependents,
790
StyleHelper
.InvalidateResourceDependents(d, info, ref fe.TemplateInternal.ResourceDependents,
803
StyleHelper
.InvalidateResourceDependentsForChild(
823
StyleHelper
.InvalidateResourceDependents(d, info, ref themeStyle.ResourceDependents,
856
StyleHelper
.InvalidateResourceDependents(d, info, ref fce.Style.ResourceDependents, !
871
StyleHelper
.InvalidateResourceDependentsForChild(
890
StyleHelper
.InvalidateResourceDependents(d, info, ref themeStyle.ResourceDependents,
src\Framework\System\Windows\Trigger.cs (2)
210
StyleHelper
.SealIfSealable(_value);
221
(_sourceName != null) ? _sourceName :
StyleHelper
.SelfName) };
src\Framework\System\Windows\TriggerBase.cs (2)
250
if (source == dependent && propertyValue.ChildName ==
StyleHelper
.SelfName)
292
target =
StyleHelper
.SelfName;