174 references to CurrentFrame
PresentationFramework (174)
src\Framework\System\Windows\FrameworkTemplate.cs (15)
1033
bool isInsideNameScope = Names.Depth > 0 && (IsNameScope(Names.
CurrentFrame
.Type) || Names.
CurrentFrame
.InsideNameScope);
1035
Names.
CurrentFrame
.Type = templateReader.Type;
1038
Names.
CurrentFrame
.InsideNameScope = true;
1046
bool isInsideNameScope = IsNameScope(Names.
CurrentFrame
.Type) || Names.
CurrentFrame
.InsideNameScope;
1048
Names.
CurrentFrame
.Type = Names.PreviousFrame.Property.Type;
1051
Names.
CurrentFrame
.InsideNameScope = true;
1057
Names.
CurrentFrame
.Property = templateReader.Member;
1065
if (Names.
CurrentFrame
.Property.DeferringLoader != null)
1069
Names.
CurrentFrame
.Property = null;
1079
if (Names.
CurrentFrame
.Property == XamlLanguage.ConnectionId)
1083
_styleConnector.Connect((int)templateReader.Value, Names.
CurrentFrame
.Instance);
1124
if (!Names.
CurrentFrame
.InsideNameScope &&
1131
Names.
CurrentFrame
.Instance = createdObject;
src\Framework\System\Windows\Markup\Baml2006\Baml2006ReaderContext.cs (1)
38
get { return _stack.
CurrentFrame
; }
src\Framework\System\Windows\Markup\WpfXamlLoader.cs (37)
106
if (dObject != null && stack.
CurrentFrame
.XmlnsDictionary != null)
108
XmlnsDictionary dictionary = stack.
CurrentFrame
.XmlnsDictionary;
114
stack.
CurrentFrame
.Instance = args.Instance;
180
if (stack.Depth == 0 || stack.
CurrentFrame
.Type != null)
186
WpfXamlFrame iteratorFrame = stack.
CurrentFrame
;
191
stack.
CurrentFrame
.XmlnsDictionary =
197
if (stack.
CurrentFrame
.XmlnsDictionary == null)
199
stack.
CurrentFrame
.XmlnsDictionary =
203
stack.
CurrentFrame
.XmlnsDictionary.Add(xamlReader.Namespace.Prefix, xamlReader.Namespace.Namespace);
211
if (stack.
CurrentFrame
.Type != null)
215
stack.
CurrentFrame
.Type = stack.PreviousFrame.Property.Type;
220
if (stack.
CurrentFrame
.FreezeFreezable)
229
if (dependencyObject != null && stack.
CurrentFrame
.XmlSpace.HasValue)
231
XmlAttributeProperties.SetXmlSpace(dependencyObject, stack.
CurrentFrame
.XmlSpace.Value ? "default" : "preserve");
246
stack.
CurrentFrame
.Property = xamlReader.Member;
249
if (!stack.
CurrentFrame
.Property.IsDirective)
251
System.Windows.Baml2006.WpfXamlMember wpfMember = stack.
CurrentFrame
.Property as System.Windows.Baml2006.WpfXamlMember;
258
FrameworkPropertyMetadata metadata = prop.GetMetadata(stack.
CurrentFrame
.Type.UnderlyingType) as FrameworkPropertyMetadata;
285
stack.
CurrentFrame
.Property = null;
308
WpfXamlFrame currentFrame = stack.
CurrentFrame
;
339
if (stack.
CurrentFrame
.Property.IsDirective && stack.
CurrentFrame
.Property == XamlLanguage.Shared)
354
if (stack.
CurrentFrame
.Property.IsDirective && stack.
CurrentFrame
.Property == XamlReaderHelper.Freeze)
357
stack.
CurrentFrame
.FreezeFreezable = freeze;
366
else if (stack.
CurrentFrame
.Property == XmlSpace.Value || stack.
CurrentFrame
.Property == XamlLanguage.Space)
368
if (typeof(DependencyObject).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
371
stack.
CurrentFrame
.XmlSpace = (string)xamlReader.Value == "default";
379
stack.
CurrentFrame
.Instance != null &&
380
stack.
CurrentFrame
.Property == XamlLanguage.ConnectionId &&
381
typeof(Style).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
383
styleConnector.Connect((int)xamlReader.Value, stack.
CurrentFrame
.Instance);
395
if (stack.Depth != 0 && stack.
CurrentFrame
.Type == null)
397
stack.
CurrentFrame
.Type = xamlReader.Type;
403
stack.
CurrentFrame
.Type = xamlReader.Type;
406
stack.
CurrentFrame
.FreezeFreezable = true;
src\Framework\System\Windows\Markup\XamlReader.cs (3)
288
if (dObject != null && _stack.
CurrentFrame
.XmlnsDictionary != null)
290
XmlnsDictionary dictionary = _stack.
CurrentFrame
.XmlnsDictionary;
518
if (xamlReader.NodeType == System.Xaml.XamlNodeType.Value && _stack.
CurrentFrame
.Property == synchronousRecordProperty)
src\Framework\System\Windows\TemplateContent.cs (112)
120
isInNameScope =
CurrentFrame
.IsInNameScope || (
CurrentFrame
.Type != null && FrameworkTemplate.IsNameScope(
CurrentFrame
.Type));
121
isInStyleOrTemplate =
CurrentFrame
.IsInStyleOrTemplate ||
122
(
CurrentFrame
.Type != null &&
123
(typeof(FrameworkTemplate).IsAssignableFrom(
CurrentFrame
.Type.UnderlyingType) ||
124
typeof(Style).IsAssignableFrom(
CurrentFrame
.Type.UnderlyingType)));
127
if (Depth == 0 ||
CurrentFrame
.Type != null)
132
CurrentFrame
.Type = xamlType;
133
CurrentFrame
.Name = name;
134
CurrentFrame
.IsInNameScope = isInNameScope;
135
CurrentFrame
.IsInStyleOrTemplate = isInStyleOrTemplate;
145
isInNameScope =
CurrentFrame
.IsInNameScope || (
CurrentFrame
.Type != null && FrameworkTemplate.IsNameScope(
CurrentFrame
.Type));
146
isInStyleOrTemplate =
CurrentFrame
.IsInStyleOrTemplate ||
147
(
CurrentFrame
.Type != null &&
148
(typeof(FrameworkTemplate).IsAssignableFrom(
CurrentFrame
.Type.UnderlyingType) ||
149
typeof(Style).IsAssignableFrom(
CurrentFrame
.Type.UnderlyingType)));
152
if (Depth == 0 ||
CurrentFrame
.Type != null)
157
CurrentFrame
.Namespaces.Add(nsd);
158
CurrentFrame
.IsInNameScope = isInNameScope;
159
CurrentFrame
.IsInStyleOrTemplate = isInStyleOrTemplate;
167
Frame iteratorFrame = this.
CurrentFrame
;
227
Stack.
CurrentFrame
.Instance = args.Instance;
495
stack.
CurrentFrame
.NameSet == false &&
496
stack.
CurrentFrame
.Type != null &&
497
!stack.
CurrentFrame
.IsInNameScope &&
498
!stack.
CurrentFrame
.IsInStyleOrTemplate)
501
if (typeof(FrameworkElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType) ||
502
typeof(FrameworkContentElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
506
UpdateSharedPropertyNames(name, sharedProperties, stack.
CurrentFrame
.Type);
507
stack.
CurrentFrame
.Name = name;
509
stack.
CurrentFrame
.NameSet = true;
523
stack.
CurrentFrame
.NameSet == false &&
524
stack.
CurrentFrame
.Type != null &&
525
!stack.
CurrentFrame
.IsInNameScope &&
526
!stack.
CurrentFrame
.IsInStyleOrTemplate)
529
if (typeof(FrameworkElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType) ||
530
typeof(FrameworkContentElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
534
UpdateSharedPropertyNames(name, sharedProperties, stack.
CurrentFrame
.Type);
535
stack.
CurrentFrame
.Name = name;
537
stack.
CurrentFrame
.NameSet = true;
540
XamlType type = stack.
CurrentFrame
.Property.Type;
549
if (!stack.
CurrentFrame
.IsInStyleOrTemplate)
551
if (stack.
CurrentFrame
.NameSet == false && !stack.
CurrentFrame
.IsInNameScope)
554
if (typeof(FrameworkElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType) ||
555
typeof(FrameworkContentElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
559
UpdateSharedPropertyNames(name, sharedProperties, stack.
CurrentFrame
.Type);
560
stack.
CurrentFrame
.Name = name;
562
stack.
CurrentFrame
.NameSet = true;
567
TemplateLoadData.RootName = stack.
CurrentFrame
.Name;
571
if (typeof(ContentPresenter).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
575
stack.
CurrentFrame
.ContentSource,
576
stack.
CurrentFrame
.Name,
583
stack.
CurrentFrame
.ContentSet,
584
stack.
CurrentFrame
.ContentSourceSet,
585
stack.
CurrentFrame
.ContentTemplateSet,
586
stack.
CurrentFrame
.ContentTemplateSelectorSet,
587
stack.
CurrentFrame
.ContentStringFormatSet
592
if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
596
stack.
CurrentFrame
.ContentSource,
597
stack.
CurrentFrame
.Name,
604
stack.
CurrentFrame
.ContentSet,
605
stack.
CurrentFrame
.ColumnsSet
614
stack.
CurrentFrame
.Property = xamlReader.Member;
616
if (!stack.
CurrentFrame
.IsInStyleOrTemplate)
621
if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
624
stack.
CurrentFrame
.ContentSet = true;
626
stack.
CurrentFrame
.ColumnsSet = true;
628
else if (typeof(ContentPresenter).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
631
stack.
CurrentFrame
.ContentSet = true;
633
stack.
CurrentFrame
.ContentTemplateSet = true;
635
stack.
CurrentFrame
.ContentTemplateSelectorSet = true;
637
stack.
CurrentFrame
.ContentStringFormatSet = true;
639
stack.
CurrentFrame
.ContentSourceSet = true;
642
if (!stack.
CurrentFrame
.IsInNameScope &&
657
stack.
CurrentFrame
.Type,
658
stack.
CurrentFrame
.Name,
684
IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType) ||
686
IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
690
stack.
CurrentFrame
.ContentSource =
700
stack.
CurrentFrame
.ContentSourceSet = false;
711
stack.
CurrentFrame
.Property = null;
715
if (!stack.
CurrentFrame
.IsInStyleOrTemplate)
717
if (FrameworkTemplate.IsNameProperty(stack.
CurrentFrame
.Property, stack.
CurrentFrame
.Type))
721
stack.
CurrentFrame
.Name = name;
722
stack.
CurrentFrame
.NameSet = true;
729
if (!stack.
CurrentFrame
.IsInNameScope)
732
if (typeof(FrameworkElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType) ||
733
typeof(FrameworkContentElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
735
TemplateLoadData.NamedTypes.Add(name, stack.
CurrentFrame
.Type);
738
UpdateSharedPropertyNames(name, sharedProperties, stack.
CurrentFrame
.Type);
743
if (typeof(ContentPresenter).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType)
744
&& stack.
CurrentFrame
.Property.Name == "ContentSource")
746
stack.
CurrentFrame
.ContentSource = xamlReader.Value as String;
792
if (!stack.
CurrentFrame
.IsInStyleOrTemplate)
795
if (stack.Depth > 0 && stack.
CurrentFrame
.NameSet == false && stack.
CurrentFrame
.Type != null && !stack.
CurrentFrame
.IsInNameScope)
798
if (typeof(FrameworkElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType) ||
799
typeof(FrameworkContentElement).IsAssignableFrom(stack.
CurrentFrame
.Type.UnderlyingType))
803
UpdateSharedPropertyNames(name, sharedProperties, stack.
CurrentFrame
.Type);
804
stack.
CurrentFrame
.Name = name;
806
stack.
CurrentFrame
.NameSet = true;
1022
XamlType type = frames.
CurrentFrame
.Property.Type;
1037
if (!(insideStyle || insideTemplate) && FrameworkTemplate.IsNameProperty(xamlReader.Member, frames.
CurrentFrame
.Type))
1042
frames.
CurrentFrame
.Property = xamlReader.Member;
1053
if (!insideTemplate && frames.
CurrentFrame
.Property == XamlLanguage.ConnectionId)
1057
OwnerTemplate.StyleConnector.Connect((int)xamlReader.Value, frames.
CurrentFrame
.Instance);
src\Shared\MS\Internal\Xaml\Context\XamlContextStack.cs (6)
24
Debug.Assert(
CurrentFrame
!= null);
25
Debug.Assert(
CurrentFrame
.Depth == Depth);
34
_currentFrame = source.
CurrentFrame
;
38
T iteratorFrame = source.
CurrentFrame
;
107
Debug.Assert(
CurrentFrame
.Depth == Depth);
120
Debug.Assert(
CurrentFrame
.Depth == Depth);