PrintManager
Этот класс отвечает за печать диаграммы.
Наследует: FrameworkElement
Реализует: IDocumentPaginatorSource
Конструкторы
public PrintManager()
printManager = PrintManager()
Создайте по умолчанию PrintManager.
Свойства
public DataTemplate BackgroundTemplate { get; set; }
value = printManager.BackgroundTemplate
printManager.BackgroundTemplate = value
Получает или устанавливает DataTemplate напечатанный в качестве фона для каждой страницы.
public Rect Bounds { get; set; }
value = printManager.Bounds
printManager.Bounds = value
Получает или устанавливает область модели, которая должна быть напечатана, в координатах модели.
public Diagram Diagram { get; internal set; }
value = printManager.Diagram
printManager.Diagram = value
Получает Диаграмму, для которой этот PrintManager выполняет печать.
public virtual DocumentPaginator DocumentPaginator { get; }
value = printManager.DocumentPaginator
Не используйте это свойство, но позвоните по телефону DocumentPaginator}, чтобы безопасно использовать DocumentPaginator.
public DataTemplate ForegroundTemplate { get; set; }
value = printManager.ForegroundTemplate
printManager.ForegroundTemplate = value
Получает или устанавливает DataTemplate напечатанный в качестве переднего плана для каждой страницы.
public Thickness Margin { get; set; }
value = printManager.Margin
printManager.Margin = value
Получает или устанавливает поля внутри размера страницы, вокруг печатной области.
public PrintPageOptions PageOptions { get; set; }
value = printManager.PageOptions
printManager.PageOptions = value
Получает или устанавливает, как печать заполняет каждую страницу.
public IEnumerable<Part> Parts { get; set; }
value = printManager.Parts
printManager.Parts = value
Получает или устанавливает коллекцию деталей, которые должны быть напечатаны.
public double Scale { get; set; }
value = printManager.Scale
printManager.Scale = value
Получает или устанавливает масштабный коэффициент, при котором все печатается.
Методы
protected virtual void OnCompleted()
printManager.OnCompleted()
Это называется после того, как операция печати завершена.
public void Paginate(Action<DocumentPaginator> act)
printManager.Paginate(act)
Используйте DocumentPaginator безопасным способом.
- act
- Action<DocumentPaginator>, который вызывается с помощью DocumentPaginator с предварительной инициализацией и последующей очисткой.
public void Print(PrintDialog dlg)
printManager.Print(dlg)
Распечатайте диаграмму, используя выбор, сделанный в данном PrintDialog.
- dlg
События
public event RoutedEventHandler Completed
printManager.Completed += handler
Это RoutedEvent происходит после завершения печати.
Поля
public static readonly DependencyProperty BackgroundTemplateProperty
value = PrintManager.BackgroundTemplateProperty
Идентифицирует свойство зависимости BackgroundTemplate.
public static readonly DependencyProperty BoundsProperty
value = PrintManager.BoundsProperty
Идентифицирует свойство зависимостей Bounds.
public static readonly RoutedEvent CompletedEvent
value = PrintManager.CompletedEvent
Идентифицирует перенаправленное событие Completed.
public static readonly DependencyProperty ForegroundTemplateProperty
value = PrintManager.ForegroundTemplateProperty
Идентифицирует свойство зависимости ForegroundTemplate.
public static readonly DependencyProperty MarginProperty
value = PrintManager.MarginProperty
Идентифицирует свойство зависимости Margin.
public static readonly DependencyProperty PageOptionsProperty
value = PrintManager.PageOptionsProperty
Идентифицирует свойство зависимости PageOptions.
public static readonly DependencyProperty PartsProperty
value = PrintManager.PartsProperty
Идентифицирует свойство зависимости частей.
public static readonly DependencyProperty ScaleProperty
value = PrintManager.ScaleProperty
Идентифицирует свойство зависимости Scale.