<?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>大聲想 － Think Louder &#187; WPF</title>
	<atom:link href="http://thinklouder.cn/tag/wpf/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinklouder.cn</link>
	<description>on Linux, Mac, Open Source, etc.</description>
	<lastBuildDate>Mon, 05 Jul 2010 21:44:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<atom:link rel='hub' href='http://thinklouder.cn/?pushpress=hub'/>
		<item>
		<title>WPF一则</title>
		<link>http://thinklouder.cn/2008/11/wpf-notes/</link>
		<comments>http://thinklouder.cn/2008/11/wpf-notes/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 03:12:48 +0000</pubDate>
		<dc:creator>Sun Liwen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.thinklouder.cn/?p=28</guid>
		<description><![CDATA[Button控件的Content内容因为过长而被截断。 可以指定Button的MinWidth属性，内容显示不下，Button会自动变长。 &#60;Window x:Class=&#34;WPFSandBox.StretchButtonWindow&#34; xmlns=&#34;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#34; xmlns:x=&#34;http://schemas.microsoft.com/winfx/2006/xaml&#34; Title=&#34;Window1&#34; Height=&#34;300&#34; Width=&#34;300&#34;&#62; &#60;UniformGrid Rows=&#34;4&#34;&#62; &#60;Button HorizontalAlignment=&#34;Left&#34; Name=&#34;StretchButton&#34; MinWidth=&#34;80&#34; Content=&#34;Very Long Label&#34; /&#62; &#60;TextBlock HorizontalAlignment=&#34;Stretch&#34; Text=&#34;{Binding Path=ActualWidth, ElementName=StretchButton}&#34; /&#62; &#60;/UniformGrid&#62; &#60;/Window&#62; Tags: UI, WPF No comment]]></description>
			<content:encoded><![CDATA[<p>Button控件的Content内容因为过长而被截断。<br />
可以指定Button的MinWidth属性，内容显示不下，Button会自动变长。</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Window</span> <span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;WPFSandBox.StretchButtonWindow&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">Title</span>=<span style="color: #ff0000;">&quot;Window1&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;300&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;300&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UniformGrid</span> <span style="color: #000066;">Rows</span>=<span style="color: #ff0000;">&quot;4&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Button</span> </span>
<span style="color: #009900;">            <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;StretchButton&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">MinWidth</span>=<span style="color: #ff0000;">&quot;80&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;Very Long Label&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> </span>
<span style="color: #009900;">            <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Stretch&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;{Binding Path=ActualWidth, ElementName=StretchButton}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UniformGrid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Window<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<hr />
<p>
<small>
Tags: <a href="http://thinklouder.cn/tag/ui/" rel="tag">UI</a>, <a href="http://thinklouder.cn/tag/wpf/" rel="tag">WPF</a><br/>
<a href="http://thinklouder.cn/2008/11/wpf-notes/#comments-heading">No comment</a>
</small>
</p>]]></content:encoded>
			<wfw:commentRss>http://thinklouder.cn/2008/11/wpf-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
