5 types derived from Block
PresentationFramework (5)
src\Framework\System\Windows\Documents\BlockUIContainer.cs (1)
20public class BlockUIContainer : Block
src\Framework\System\Windows\Documents\List.cs (1)
28public class List : Block
src\Framework\System\Windows\Documents\Paragraph.cs (1)
24public class Paragraph : Block
src\Framework\System\windows\Documents\Section.cs (1)
18public class Section : Block
src\Framework\System\Windows\Documents\Table.cs (1)
40public class Table : Block, IAddChild, IAcceptInsertion
216 references to Block
PresentationFramework (216)
src\Framework\MS\Internal\PtsHost\BaseParagraph.cs (4)
230fspap.fBreakPageBefore = _element is Block ? PTS.FromBoolean(StructuralCache.CurrentFormatContext.FinitePage && ((Block)_element).BreakPageBefore) : PTS.FromBoolean(false); 232fspap.fBreakColumnBefore = _element is Block ? PTS.FromBoolean(((Block)_element).BreakColumnBefore) : PTS.FromBoolean(false);
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (7)
520Invariant.Assert(Element is Block || Element is ListItem); 521fskclearIn = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); 687Invariant.Assert(Element is Block || Element is ListItem); 688fskclearIn = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); 824Invariant.Assert(Element is Block || Element is ListItem); 825fskclearIn = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); 1104else if (element is Block || element is ListItem)
src\Framework\MS\Internal\PtsHost\FigureHelper.cs (2)
241FontFamily pageFontFamily = (FontFamily)structuralCache.PropertyOwner.GetValue(Block.FontFamilyProperty); 243double pageFontSize = (double)structuralCache.PropertyOwner.GetValue(Block.FontSizeProperty);
src\Framework\MS\Internal\PtsHost\FloaterParagraph.cs (1)
131fsfloaterprops.fskclear = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty));
src\Framework\MS\Internal\PtsHost\Line.cs (1)
67_textAlignment = (TextAlignment)TextParagraph.Element.GetValue(Block.TextAlignmentProperty);
src\Framework\MS\Internal\PtsHost\LineBase.cs (1)
153Invariant.Assert(!(element is Block), "We do not expect any Blocks inside Paragraphs");
src\Framework\MS\Internal\PtsHost\MbpInfo.cs (5)
31if (o is Block || o is AnchoredBlock || o is TableCell || o is ListItem) 104_margin = (Thickness)block.GetValue(Block.MarginProperty); 105_border = (Thickness)block.GetValue(Block.BorderThicknessProperty); 106_padding = (Thickness)block.GetValue(Block.PaddingProperty); 107_borderBrush = (Brush)block.GetValue(Block.BorderBrushProperty);
src\Framework\MS\Internal\PtsHost\PtsHelper.cs (2)
876double pageFontSize = (double)structuralCache.PropertyOwner.GetValue(Block.FontSizeProperty); 877FontFamily pageFontFamily = (FontFamily)structuralCache.PropertyOwner.GetValue(Block.FontFamilyProperty);
src\Framework\MS\Internal\PtsHost\Section.cs (4)
228double pageFontSize = (double)_structuralCache.PropertyOwner.GetValue(Block.FontSizeProperty); 229FontFamily pageFontFamily = (FontFamily)_structuralCache.PropertyOwner.GetValue(Block.FontFamilyProperty); 376double pageFontSize = (double)_structuralCache.PropertyOwner.GetValue(Block.FontSizeProperty); 377FontFamily pageFontFamily = (FontFamily)_structuralCache.PropertyOwner.GetValue(Block.FontFamilyProperty);
src\Framework\MS\Internal\PtsHost\SubpageParagraph.cs (9)
178fskclearIn = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); 222double pageFontSize = (double)_structuralCache.PropertyOwner.GetValue(Block.FontSizeProperty); 223FontFamily pageFontFamily = (FontFamily)_structuralCache.PropertyOwner.GetValue(Block.FontFamilyProperty); 375fskclearIn = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); 408double pageFontSize = (double)_structuralCache.PropertyOwner.GetValue(Block.FontSizeProperty); 409FontFamily pageFontFamily = (FontFamily)_structuralCache.PropertyOwner.GetValue(Block.FontFamilyProperty); 544fskclearIn = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); 577double pageFontSize = (double)_structuralCache.PropertyOwner.GetValue(Block.FontSizeProperty); 578FontFamily pageFontFamily = (FontFamily)_structuralCache.PropertyOwner.GetValue(Block.FontFamilyProperty);
src\Framework\MS\Internal\PtsHost\TextParagraph.cs (2)
224isParagraphJustified = ((TextAlignment)Element.GetValue(Block.TextAlignmentProperty)) == TextAlignment.Justify; 1535bool isHyphenationEnabled = (bool) Element.GetValue(Block.IsHyphenationEnabledProperty);
src\Framework\MS\Internal\PtsHost\UIElementParagraph.cs (1)
151fsfloaterprops.fskclear = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty));
src\Framework\MS\Internal\Text\DynamicPropertyReader.cs (1)
212double lineHeight = (double)d.GetValue(Block.LineHeightProperty);
src\Framework\MS\Internal\Text\LineProperties.cs (4)
115: this(element, contentHost, defaultTextProperties, markerProperties, (TextAlignment)element.GetValue(Block.TextAlignmentProperty)) 132_flowDirection = (FlowDirection)element.GetValue(Block.FlowDirectionProperty); 134_lineHeight = (double)element.GetValue(Block.LineHeightProperty); 136_lineStackingStrategy = (LineStackingStrategy)element.GetValue(Block.LineStackingStrategyProperty);
src\Framework\System\Windows\Controls\AccessText.cs (3)
311Block.LineHeightProperty.AddOwner(typeof(AccessText)); 327Block.LineStackingStrategyProperty.AddOwner(typeof(AccessText)); 342Block.TextAlignmentProperty.AddOwner(typeof(AccessText));
src\Framework\System\Windows\Controls\RichTextBox.cs (1)
480Block firstBlock = _document.Blocks.FirstBlock;
src\Framework\System\Windows\Controls\TextBlock.cs (5)
992Block.LineHeightProperty.AddOwner(typeof(TextBlock)); 1038Block.LineStackingStrategyProperty.AddOwner(typeof(TextBlock)); 1082Block.PaddingProperty.AddOwner( 1101Block.TextAlignmentProperty.AddOwner(typeof(TextBlock)); 1193Block.IsHyphenationEnabledProperty.AddOwner(typeof(TextBlock));
src\Framework\System\Windows\Controls\TextBox.cs (1)
778public static readonly DependencyProperty TextAlignmentProperty = Block.TextAlignmentProperty.AddOwner(typeof(TextBox));
src\Framework\System\Windows\Controls\TextRangeAdaptor.cs (3)
212TextAlignment alignmentWCP = (TextAlignment)tp.GetValue(Block.TextAlignmentProperty); 250Thickness padding = (Thickness)tp.GetValue(Block.PaddingProperty); 261Thickness padding = (Thickness)tp.GetValue(Block.PaddingProperty);
src\Framework\System\Windows\Documents\AnchoredBlock.cs (8)
47protected AnchoredBlock(Block block, TextPointer insertionPosition) 101Block.MarginProperty.AddOwner( 120Block.PaddingProperty.AddOwner( 139Block.BorderThicknessProperty.AddOwner( 158Block.BorderBrushProperty.AddOwner( 177Block.TextAlignmentProperty.AddOwner(typeof(AnchoredBlock)); 192Block.LineHeightProperty.AddOwner(typeof(AnchoredBlock)); 208Block.LineStackingStrategyProperty.AddOwner(typeof(AnchoredBlock));
src\Framework\System\Windows\Documents\Block.cs (16)
57public Block NextBlock 61return this.NextElement as Block; 69public Block PreviousBlock 73return this.PreviousElement as Block; 84typeof(Block), 134typeof(Block), 156typeof(Block), 178typeof(Block), 200typeof(Block), 221typeof(Block), 269FrameworkElement.FlowDirectionProperty.AddOwner(typeof(Block)); 287typeof(Block), 340typeof(Block), 391typeof(Block), 412typeof(Block), 433typeof(Block),
src\Framework\System\Windows\Documents\BlockCollection.cs (3)
19public class BlockCollection : TextElementCollection<Block> 50public Block FirstBlock 61public Block LastBlock
src\Framework\System\Windows\Documents\Figure.cs (2)
43public Figure(Block childBlock) : this(childBlock, null) 57public Figure(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
src\Framework\System\Windows\Documents\FixedElement.cs (2)
110Block.BorderThicknessProperty.AddOwner(typeof(FixedElement)); 113Block.BorderBrushProperty.AddOwner(typeof(FixedElement));
src\Framework\System\Windows\Documents\FixedSOMTableCell.cs (2)
79element.SetValue(Block.BorderThicknessProperty, new Thickness(1)); 80element.SetValue(Block.BorderBrushProperty, Brushes.Black);
src\Framework\System\Windows\Documents\Floater.cs (2)
50public Floater(Block childBlock) : this(childBlock, null) 64public Floater(Block childBlock, TextPointer insertionPosition) : base(childBlock, insertionPosition)
src\Framework\System\Windows\Documents\FlowDocument.cs (10)
53/// Top-level children of Flow Document must be one of <see cref="Block"/>-derived classes: 117public FlowDocument(Block block) 344Block.TextAlignmentProperty.AddOwner(_typeofThis); 359Block.FlowDirectionProperty.AddOwner(_typeofThis); 374Block.LineHeightProperty.AddOwner(_typeofThis); 390Block.LineStackingStrategyProperty.AddOwner(_typeofThis); 739Block.IsHyphenationEnabledProperty.AddOwner(_typeofThis); 1583return Block.IsValidThickness(value, /*allow NaN*/true); 1663if (value is Block) 1666((Block)value).RepositionWithContent(textContainer.End);
src\Framework\System\Windows\Documents\List.cs (6)
238internal void Apply(Block firstBlock, Block lastBlock) 253Block block = firstBlock; 282block.ClearValue(Block.MarginProperty); 283block.ClearValue(Block.PaddingProperty); 288block = block == lastBlock ? null : (Block)listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\System\Windows\Documents\ListItem.cs (8)
145Block.MarginProperty.AddOwner( 164Block.PaddingProperty.AddOwner( 183Block.BorderThicknessProperty.AddOwner( 202Block.BorderBrushProperty.AddOwner( 221Block.TextAlignmentProperty.AddOwner(typeof(ListItem)); 236Block.FlowDirectionProperty.AddOwner(typeof(ListItem)); 251Block.LineHeightProperty.AddOwner(typeof(ListItem)); 267Block.LineStackingStrategyProperty.AddOwner(typeof(ListItem));
src\Framework\System\windows\Documents\Section.cs (1)
42public Section(Block block)
src\Framework\System\Windows\Documents\TableCell.cs (8)
73public TableCell(Block blockItem) 195Block.PaddingProperty.AddOwner( 214Block.BorderThicknessProperty.AddOwner( 233Block.BorderBrushProperty.AddOwner( 252Block.TextAlignmentProperty.AddOwner(typeof(TableCell)); 267Block.FlowDirectionProperty.AddOwner(typeof(TableCell)); 282Block.LineHeightProperty.AddOwner(typeof(TableCell)); 298Block.LineStackingStrategyProperty.AddOwner(typeof(TableCell));
src\Framework\System\windows\Documents\TextEditorLists.cs (2)
253Block paragraphOrBlockUIContainer = thisSelection.Start.ParagraphOrBlockUIContainer; 308Block paragraphOrBlockUIContainer = thisSelection.Start.ParagraphOrBlockUIContainer;
src\Framework\System\windows\Documents\TextEditorParagraphs.cs (4)
90TextEditorCharacters._OnApplyProperty(This, Block.TextAlignmentProperty, TextAlignment.Left, /*applyToParagraphs*/true); 105TextEditorCharacters._OnApplyProperty(This, Block.TextAlignmentProperty, TextAlignment.Center, /*applyToParagraphs*/true); 120TextEditorCharacters._OnApplyProperty(This, Block.TextAlignmentProperty, TextAlignment.Right, /*applyToParagraphs*/true); 135TextEditorCharacters._OnApplyProperty(This, Block.TextAlignmentProperty, TextAlignment.Justify, /*applyToParagraphs*/true);
src\Framework\System\windows\Documents\TextEditorTyping.cs (2)
766Block paragraphOrBlockUIContainerToDelete = position.ParagraphOrBlockUIContainer; 814Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer;
src\Framework\System\Windows\Documents\TextPointer.cs (4)
1678internal Block ParagraphOrBlockUIContainer 1686Block parentBlock = this.ParentBlock; 3890internal Block ParentBlock 3904return parentBlock as Block;
src\Framework\System\Windows\Documents\TextPointerBase.cs (2)
766Block paragraphOrBlockUIContainer = pointer.ParagraphOrBlockUIContainer; 782Block paragraphOrBlockUIContainer = position.ParagraphOrBlockUIContainer;
src\Framework\System\Windows\Documents\TextRangeBase.cs (1)
1374TextSchema.IsValidChild(/*position*/insertPosition, /*childType*/typeof(Block)) &&
src\Framework\System\Windows\Documents\TextRangeEdit.cs (19)
755Block startParagraphOrBlockUIContainer = start.ParagraphOrBlockUIContainer; 763if (property == Block.FlowDirectionProperty) 790Block block = GetNextBlock(start, end); 815if (property == Block.FlowDirectionProperty) 838private static void SetPropertyOnParagraphOrBlockUIContainer(DependencyObject parent, Block block, DependencyProperty property, object value, PropertyValueAction propertyValueAction) 853FlowDirection flowDirection = (FlowDirection)block.GetValue(Block.FlowDirectionProperty); 900if (property == Block.FlowDirectionProperty) 920private static void PreserveBlockContentStructuralProperty(Block block, DependencyProperty property, object currentValue, object newValue) 1029private static Block GetNextBlock(TextPointer pointer, TextPointer limit) 1031Block block = null; 1037block = pointer.Parent as Block; 1224private static void SwapBlockLeftAndRightMargins(Block block) 1226object value = block.GetValue(Block.MarginProperty); 1243SetPropertyValue(block, Block.MarginProperty, value, newValue); 1384TextRangeEdit.SetParagraphProperty(range.Start, range.End, Block.MarginProperty, thickness, propertyValueAction); 1460Block firstParagraphOrBlockUIContainer = startPosition.ParagraphOrBlockUIContainer; 1461Block secondParagraphOrBlockUIContainer = endPosition.ParagraphOrBlockUIContainer; 1516Block first = startPosition.ParagraphOrBlockUIContainer; 1517Block second = endPosition.ParagraphOrBlockUIContainer;
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (12)
46internal static bool MergeParagraphs(Block firstParagraphOrBlockUIContainer, Block secondParagraphOrBlockUIContainer) 252Block firstBlock = range.Start.ParagraphOrBlockUIContainer; 253Block lastBlock = end.ParagraphOrBlockUIContainer; 278Block firstBlock = range.Start.ParagraphOrBlockUIContainer; 281Block lastBlock = end.ParagraphOrBlockUIContainer; 295for (Block block = firstBlock; block != lastBlock && block != null; block = block.NextBlock) 309Block block = firstBlock; 312Block nextBlock = block == lastBlock ? null : block.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as Block; 626internal static bool ParagraphsAreMergeable(Block firstParagraphOrBlockUIContainer, Block secondParagraphOrBlockUIContainer)
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (1)
883Invariant.Assert(TextSchema.IsValidChild(/*position:*/position, /*childType:*/typeof(Block)), "Expecting valid parent-child relationship");
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (6)
899if ((property == Block.MarginProperty && (typeof(Paragraph).IsAssignableFrom(propertyOwnerType) || typeof(List).IsAssignableFrom(propertyOwnerType))) 901(property == Block.PaddingProperty) && typeof(List).IsAssignableFrom(propertyOwnerType)) 1366ValidateMergingPositions(typeof(Block), fragmentStart, fragmentEnd); 1601ApplyContextualProperty(typeof(Block), start, end, property, propertyEntry.Value); 1614ApplyContextualProperty(typeof(Block), start, end, property, propertyEntry.Value); 1652if (targetType == typeof(Block) && start.CompareTo(end) > 0)
src\Framework\System\Windows\Documents\TextSchema.cs (29)
65Block.TextAlignmentProperty, 66Block.LineHeightProperty, 67Block.IsHyphenationEnabledProperty, 79Block.TextAlignmentProperty 192else if (typeof(Block).IsAssignableFrom(newType)) 194return typeof(Block).IsAssignableFrom(siblingType); 337typeof(Block).IsAssignableFrom(type)); 464if (typeof(Block).IsAssignableFrom(type) || typeof(FlowDocument).IsAssignableFrom(type)) 874return typeof(Block).IsAssignableFrom(childType); 996Block.MarginProperty, 997Block.PaddingProperty, 998Block.BorderThicknessProperty, 999Block.BorderBrushProperty, 1014Block.MarginProperty, 1015Block.PaddingProperty, 1016Block.BorderThicknessProperty, 1017Block.BorderBrushProperty, 1044Block.MarginProperty, 1045Block.PaddingProperty, 1046Block.BorderThicknessProperty, 1047Block.BorderBrushProperty, 1136Block.MarginProperty, 1137Block.PaddingProperty, 1138Block.BorderThicknessProperty, 1139Block.BorderBrushProperty, 1140Block.BreakPageBeforeProperty, 1141Block.BreakColumnBeforeProperty, 1142Block.ClearFloatersProperty, 1143Block.IsHyphenationEnabledProperty,
src\Framework\System\windows\Documents\TextSelection.cs (3)
1999FlowDirection renderScopeFlowDirection = (FlowDirection)this.TextView.RenderScope.GetValue(Block.FlowDirectionProperty); 2000FlowDirection paragraphFlowDirection = (FlowDirection)cursorPosition.GetValue(Block.FlowDirectionProperty); 2404Block paragraphOrBlockUIContainer = (caretPosition is TextPointer) ? ((TextPointer)caretPosition).ParagraphOrBlockUIContainer : null;
src\Framework\System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
128case 36: t = () => typeof(Block); break;
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (3)
7710Type type = typeof(System.Windows.Documents.Block); 7711DependencyProperty dp = System.Windows.Documents.Block.TextAlignmentProperty; 7713this.GetXamlType(typeof(System.Windows.Documents.Block)), // DeclaringType
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
2043typeof(System.Windows.Documents.Block),
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
5580case KnownElements.Block: t = typeof(System.Windows.Documents.Block); break;