|
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
|
Traducción
Original
|
Block.Padding (Propiedad)
Espacio de nombres: System.Windows.Documents
Ensamblado: PresentationFramework (en PresentationFramework.dll)
XMLNS para XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
<object> <object.Padding> <Thickness .../> </object.Padding> </object>
<object Padding="uniformThickness"/> - or - <object Padding="independentThickness"/> - or - <object Padding="qualifiedUniformThickness"/> - or - <object Padding="qualifiedIndependentThickness"/>
Valores XAML
Valor de propiedad
Tipo: System.Windows.Thickness<FlowDocument Background="LightSlateGray" ColumnWidth="2000"> <Section Background="DarkMagenta" Margin="0" Padding="0"> <Paragraph Background="White"> <Run>Default paragraph.</Run> </Paragraph> <Paragraph Background="White"> <Run>Default paragraph.</Run> </Paragraph> <Paragraph Background="LightBlue" Margin="50"> <Run>This paragraph has a magin of 50 pixels set, but no padding.</Run> </Paragraph> <Paragraph Background="LightCoral" Padding="50"> <Run>This paragraph has padding of 50 pixels set, but no margin.</Run> </Paragraph> <Paragraph Background="LightGreen" Margin="50" Padding="50"> <Run>This paragraph has both padding and margin set to 50 pixels.</Run> </Paragraph> <Paragraph Background="White"> <Run>Default paragraph.</Run> </Paragraph> <Paragraph Background="White"> <Run>Default paragraph.</Run> </Paragraph> </Section> </FlowDocument>

FlowDocument flowDoc = new FlowDocument(); Section sec = new Section(); flowDoc.Background = Brushes.LightSlateGray; flowDoc.ColumnWidth = 2000; sec.Background = Brushes.DarkMagenta; sec.Padding = sec.Margin = new Thickness(0); Paragraph defPar1 = new Paragraph(new Run("Default paragraph.")); Paragraph defPar2 = new Paragraph(new Run("Default paragraph.")); Paragraph defPar3 = new Paragraph(new Run("Default paragraph.")); Paragraph defPar4 = new Paragraph(new Run("Default paragraph.")); defPar1.Background = defPar2.Background = defPar3.Background = defPar4.Background = Brushes.White; Paragraph marginPar = new Paragraph(new Run("This paragraph has a magin of 50 pixels set, but no padding.")); marginPar.Background = Brushes.LightBlue; marginPar.Margin = new Thickness(50); Paragraph paddingPar = new Paragraph(new Run("This paragraph has padding of 50 pixels set, but no margin.")); paddingPar.Background = Brushes.LightCoral; paddingPar.Padding = new Thickness(50); Paragraph marginPaddingPar = new Paragraph(new Run("This paragraph has both padding and margin set to 50 pixels.")); marginPaddingPar.Background = Brushes.LightGreen; marginPaddingPar.Padding = marginPaddingPar.Margin = new Thickness(50); sec.Blocks.Add(defPar1); sec.Blocks.Add(defPar2); sec.Blocks.Add(marginPar); sec.Blocks.Add(paddingPar); sec.Blocks.Add(marginPaddingPar); sec.Blocks.Add(defPar3); sec.Blocks.Add(defPar4); flowDoc.Blocks.Add(sec);
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (no se admite el rol Server Core), Windows Server 2008 R2 (se admite el rol Server Core con SP1 o versiones posteriores; no se admite Itanium)
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.