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