using System; using System.IO; //using System.Windows.Controls; using System.Windows; using System.Windows.Controls; using System.Windows.Forms; using System.Windows.Xps.Packaging; using System.Xml; namespace HelloXPSWorld { public partial class Form1: Form { DocumentViewer viewer; private System.Windows.Forms.TextBox txt; public Form1() { InitializeComponent(); } private void Form1_Load(object sender,EventArgs e) { viewer = new DocumentViewer(); XpsDocument xd = new XpsDocument("test.xps",FileAccess.ReadWrite); viewer.Document = xd.GetFixedDocumentSequence(); viewer.Visibility = Visibility.Collapsed; bool bln = viewer.IsVisible;//here it is false viewer.BringIntoView(); } } }
viewer.Visibility = Visibility.Collapsed
Controls.Add(viewer)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)