|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Estrutura FigureLength
.NET Framework 3.5
Assembly: PresentationFramework (em PresentationFramework.dll)
XMLNS para XAML: http://schemas.microsoft.com/winfx/xaml/presentation
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="SDKSample.FigureLengthExample" > <FlowDocumentReader> <FlowDocument > <Paragraph> Raw text inside the paragraph <Figure Name="myFigure" Width="300"> <Paragraph FontStyle="Italic" MouseDown="OnMouseDownDecreaseWidth" > Text inside of paragraph that is inside Figure... </Paragraph> </Figure> </Paragraph> </FlowDocument> </FlowDocumentReader> </Page>
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace SDKSample
{
public partial class FigureLengthExample : Page
{
void OnMouseDownDecreaseWidth(object sender, MouseButtonEventArgs args)
{
FigureLength myFigureLength = myFigure.Width;
double widthValue = myFigureLength.Value;
if (widthValue > 0)
{
myFigure.Width = new FigureLength((widthValue - 10), FigureUnitType.Pixel);
}
}
}
}
Windows Vista, Windows XP SP2, Windows Server 2003
o.NET Framework e.NET Compact Framework não oferecem suporte a todas as versões de cada plataforma. Para obter uma lista de versões suportadas, consulte Requisitos de sistema do .NET framework.