2 types derived from Canvas
PresentationFramework (2)
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
25internal class HighlightComponent : Canvas, IAnnotationComponent, IHighlightRange
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
36internal sealed class MarkedHighlightComponent : Canvas, IAnnotationComponent
6 instantiations of Canvas
IdeBenchmarks (1)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
174_canvas = new Canvas()
Microsoft.VisualStudio.LanguageServices (1)
InheritanceMargin\InheritanceMarginViewMargin.cs (1)
64_mainCanvas = new Canvas { ClipToBounds = true, Width = HeightAndWidthOfMargin };
PresentationFramework (3)
System\Windows\Input\KeyboardNavigation.cs (1)
521Canvas canvas = new Canvas();
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
2541DefaultConstructor = delegate () { return new System.Windows.Controls.Canvas(); },
System\Windows\Markup\KnownTypes.cs (1)
1152case KnownElements.Canvas: o = new System.Windows.Controls.Canvas(); break;
PresentationUI (1)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (1)
2419Canvas canvas = new Canvas();
90 references to Canvas
IdeBenchmarks (2)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (2)
44private Canvas _canvas; 117Canvas.SetTop(glyph, j * WidthAndHeightOfGlyph);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (6)
InlineDiagnostics\InlineDiagnosticsAdornmentManager.cs (2)
171Canvas.SetLeft(visualElement, 178Canvas.SetTop(visualElement, lineView.Bottom - visualElement.DesiredSize.Height);
InlineDiagnostics\InlineDiagnosticsTag.cs (1)
130Canvas.SetLeft(border, view.ViewportRight - border.DesiredSize.Width);
InlineRename\UI\Adornment\RenameFlyout.xaml.cs (2)
150Canvas.SetTop(this, Math.Max(0, top)); 151Canvas.SetLeft(this, Math.Max(0, left));
LineSeparators\LineSeparatorTag.cs (1)
51Canvas.SetTop(border, bounds.Bounds.Bottom - border.Height);
Microsoft.VisualStudio.LanguageServices (4)
InheritanceMargin\InheritanceGlyphManager.cs (3)
45private readonly Canvas _glyphsContainer; 62Canvas canvas, 161=> Canvas.SetTop(glyph, line.TextTop - _textView.ViewportTop);
InheritanceMargin\InheritanceMarginViewMargin.cs (1)
36private readonly Canvas _mainCanvas;
PresentationFramework (73)
System\Windows\Controls\Canvas.cs (14)
69/// <seealso cref="Canvas.LeftProperty" /> 83/// <seealso cref="Canvas.LeftProperty" /> 95/// <seealso cref="Canvas.TopProperty" /> 109/// <seealso cref="Canvas.TopProperty" /> 121/// <seealso cref="Canvas.RightProperty" /> 135/// <seealso cref="Canvas.RightProperty" /> 147/// <seealso cref="Canvas.BottomProperty" /> 161/// <seealso cref="Canvas.BottomProperty" /> 189Canvas p = VisualTreeHelper.GetParent(uie) as Canvas; 202= DependencyProperty.RegisterAttached("Left", typeof(double), typeof(Canvas), 213= DependencyProperty.RegisterAttached("Top", typeof(double), typeof(Canvas), 225= DependencyProperty.RegisterAttached("Right", typeof(double), typeof(Canvas), 236= DependencyProperty.RegisterAttached("Bottom", typeof(double), typeof(Canvas),
System\Windows\Controls\DataGridColumnFloatingHeader.cs (3)
13[TemplatePart(Name = "PART_VisualBrushCanvas", Type = typeof(Canvas))] 98_visualBrushCanvas = GetTemplateChild(VisualBrushCanvasTemplateName) as Canvas; 192private Canvas _visualBrushCanvas;
System\Windows\Controls\GridViewColumnHeader.cs (3)
43[TemplatePart(Name = "PART_FloatingHeaderCanvas", Type = typeof(Canvas))] 99_floatingHeaderCanvas = GetTemplateChild(FloatingHeaderCanvasTemplateName) as Canvas; 996private Canvas _floatingHeaderCanvas;
System\Windows\Controls\Slider.cs (8)
996Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(Maximum - SelectionEnd, 0) * valueToSize); 1000Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize); 1018Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize); 1022Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(Maximum - SelectionEnd,0) * valueToSize); 1063Canvas.SetRight(rangeElement, (thumbSize.Width * 0.5)); 1067Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5)); 1086Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5)); 1090Canvas.SetBottom(rangeElement, (thumbSize.Height * 0.5));
System\Windows\Documents\FixedDSBuilder.cs (1)
237if (fen.uiElement is Canvas)
System\Windows\Documents\FixedPage.cs (12)
213/// <seealso cref="Canvas.LeftProperty" /> 228/// <seealso cref="Canvas.LeftProperty" /> 241/// <seealso cref="Canvas.TopProperty" /> 256/// <seealso cref="Canvas.TopProperty" /> 269/// <seealso cref="Canvas.RightProperty" /> 284/// <seealso cref="Canvas.RightProperty" /> 297/// <seealso cref="Canvas.BottomProperty" /> 312/// <seealso cref="Canvas.BottomProperty" /> 888if (element is Canvas) 892Debug.Assert(currentLevelIndex >= 0 && currentLevelIndex <= ((Canvas)element).Children.Count); 893element = ((Canvas)element).Children[currentLevelIndex]; 1016else if (parent is Canvas parentC)
System\Windows\Documents\FixedTextBuilder.cs (6)
963else if (elements.Current is Canvas) 970Canvas canvas = elements.Current as Canvas; 1392Debug.Assert(elem is FixedPage || elem is Canvas); 1397Canvas canvas = child as Canvas;
System\Windows\Documents\Hyperlink.cs (1)
891if (fe != null && ((fe is Path) || (fe is Canvas) || (fe is Glyphs) || (fe is FixedPage)))
System\Windows\Input\KeyboardNavigation.cs (5)
521Canvas canvas = new Canvas(); 596Canvas.SetLeft(control, rect.X); 597Canvas.SetTop(control, rect.Y); 616Canvas.SetLeft(control, rect.X); 617Canvas.SetTop(control, rect.Y);
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
159case 66: t = () => typeof(Canvas); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (15)
4459Type type = typeof(System.Windows.Controls.Canvas); 4461this.GetXamlType(typeof(System.Windows.Controls.Canvas)), // DeclaringType 4468GetDelegate = delegate (object target) { return ((System.Windows.Controls.Canvas)target).Children; }, 9006Type type = typeof(System.Windows.Controls.Canvas); 9007DependencyProperty dp = System.Windows.Controls.Canvas.TopProperty; 9009this.GetXamlType(typeof(System.Windows.Controls.Canvas)), // DeclaringType 9025Type type = typeof(System.Windows.Controls.Canvas); 9026DependencyProperty dp = System.Windows.Controls.Canvas.LeftProperty; 9028this.GetXamlType(typeof(System.Windows.Controls.Canvas)), // DeclaringType 9044Type type = typeof(System.Windows.Controls.Canvas); 9045DependencyProperty dp = System.Windows.Controls.Canvas.BottomProperty; 9047this.GetXamlType(typeof(System.Windows.Controls.Canvas)), // DeclaringType 9063Type type = typeof(System.Windows.Controls.Canvas); 9064DependencyProperty dp = System.Windows.Controls.Canvas.RightProperty; 9066this.GetXamlType(typeof(System.Windows.Controls.Canvas)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
2538typeof(System.Windows.Controls.Canvas),
System\Windows\Markup\KnownTypes.cs (1)
5613case KnownElements.Canvas: t = typeof(System.Windows.Controls.Canvas); break;
System\Windows\Window.cs (2)
951Canvas.TopProperty.AddOwner(typeof(Window), 1002Canvas.LeftProperty.AddOwner(typeof(Window),
PresentationUI (1)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (1)
2419Canvas canvas = new Canvas();
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (4)
344double currentXPosition = Canvas.GetLeft(_popupToggleButton); 350double currentYPosition = Canvas.GetTop(_popupToggleButton); 358Canvas.SetLeft(_popupToggleButton, currentXPosition + popupToggleButtonOffset.X); 359Canvas.SetTop(_popupToggleButton, currentYPosition + popupToggleButtonOffset.Y);