<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WPF Reflections &#187; Windows Computing</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/wpf/tag/windows-computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/wpf</link>
	<description></description>
	<lastBuildDate>Mon, 21 Jan 2013 19:34:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WPF Problems printing documents</title>
		<link>http://itknowledgeexchange.techtarget.com/wpf/wpf-problems-printing-documents/</link>
		<comments>http://itknowledgeexchange.techtarget.com/wpf/wpf-problems-printing-documents/#comments</comments>
		<pubDate>Wed, 14 May 2008 09:04:27 +0000</pubDate>
		<dc:creator>MarkWPF</dc:creator>
				<category><![CDATA[printing]]></category>
		<category><![CDATA[Windows Computing]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/wpf/wpf-problems-printing-documents/</guid>
		<description><![CDATA[Do you have problems printing documents in WPF? My problem manifested itself when I tried to print a document from a FlowDocumentPageViewer (though the same is true from a FlowDocumentReader). The problem I was getting was that if I had multiple pages, they would all be scaled and fitted onto the same size of printed [...]]]></description>
				<content:encoded><![CDATA[<p>Do you have problems printing documents in WPF?</p>
<p>My problem manifested itself when I tried to print a document from a FlowDocumentPageViewer (though the same is true from a FlowDocumentReader).<br />
The problem I was getting was that if I had multiple pages, they would all be scaled and fitted onto the same size of printed page as on the screen.</p>
<p>How do you get around this?<br />
Well the problem lies in the fact that the document is being shown on the screen which has a different size to the printed page.<br />
Realising that, the solution itself is simple &#8211; change the height and width of the document before printing it, like:</p>
<p>Assuming docRdr is a FlowDocumentPageViewer and prtDlg is a PrintDialog:</p>
<p>FlowDocument doc = docRdr.Document;<br />
doc.PageHeight  = prtDlg.PrintableAreaHeight;<br />
doc.PageWidth   = prtDlg.PrintableAreaWidth;<br />
prtDlg.PrintDocument(((IDocumentPaginatorSource)doc).DocumentPaginator, &#8220;Statement&#8221;);</p>
<p>Of course, you will need to remember to save the FlowDocument&#8217;s height and width, then re-apply after you have printed the document.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/wpf/wpf-problems-printing-documents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data validation in WPF using ValidationRule</title>
		<link>http://itknowledgeexchange.techtarget.com/wpf/data-validation-in-wpf-using-validationrule/</link>
		<comments>http://itknowledgeexchange.techtarget.com/wpf/data-validation-in-wpf-using-validationrule/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 23:01:23 +0000</pubDate>
		<dc:creator>MarkWPF</dc:creator>
				<category><![CDATA[Databinding]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Validation]]></category>
		<category><![CDATA[Windows Computing]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/wpf/data-validation-in-wpf-using-validationrule/</guid>
		<description><![CDATA[As I mentioned in a previous post, you can specify validation by creating a Validation class (or classes). You do this by deriving a new class from the ValidationRule class and overriding the Validate method. Why would you do this, instead of implementing IDataErrorInfo? Well, if you wanted to do validation across a number of [...]]]></description>
				<content:encoded><![CDATA[<p>As I mentioned in a previous <a href="http://itknowledgeexchange.techtarget.com/wpf/validation/" title="Validation overview">post</a>, you can specify validation by creating a Validation class (or classes).</p>
<p>You do this by deriving a new class from the ValidationRule class and overriding the Validate method.</p>
<p>Why would you do this, instead of implementing IDataErrorInfo?<br />
Well, if you wanted  to do validation across a number of objects, then this is the way to go.<br />
It also provides a level of separation from your business objects, leaving them to deal with business data and the validation objects to deal with validation.<br />
A downside is that it  is not backwardly compatible with WinForms <img src='http://itknowledgeexchange.techtarget.com/wpf/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>How do you tell your xaml to use it? By specifying it in the ValidationRules element of your binding &#8211; just like IDataErrorInfo.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/wpf/data-validation-in-wpf-using-validationrule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Popup box</title>
		<link>http://itknowledgeexchange.techtarget.com/wpf/popup-box/</link>
		<comments>http://itknowledgeexchange.techtarget.com/wpf/popup-box/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 23:59:16 +0000</pubDate>
		<dc:creator>MarkWPF</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Windows Computing]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/wpf/popup-box/</guid>
		<description><![CDATA[One thing that I have noticed, out there in the real world, is that people new to WPF haven&#8217;t noticed the (slightly) unsung hero Popup. I have actually seen people spending man weeks recreating a floating window as per the popup control in WPF. So what is it? Well it is the ancestor class for [...]]]></description>
				<content:encoded><![CDATA[<p>One thing that I have noticed, out there in the real world, is that people new to WPF haven&#8217;t noticed the (slightly) unsung hero Popup.<br />
I have actually seen people spending  man weeks recreating a floating window as per the popup control in WPF.</p>
<p>So what is it? Well it is the ancestor class for menus, tooltips and the combobox &#8211; and provides the necessary floating behaviour.</p>
<p>An example of using it is:</p>
<p>&lt;StackPanel&gt;<br />
&lt;ListBox Name=&#8221;xxx&#8221; /&gt;<br />
&lt;Popup PopupAnimation=&#8221;Fade&#8221; Placement=&#8221;Mouse&#8221; x:Name=&#8221;pop&#8221;&gt;<br />
&lt;TextBlock Text=&#8221;ggggg&#8221; /&gt;<br />
&lt;/Popup&gt;<br />
&lt;/StackPanel&gt;</p>
<p>This example will show a floating window at the mouse cursor, when the mouse is in the stackpanel. Easy as pie isn&#8217;t it?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/wpf/popup-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
