module SlideDescription

Apr 15, 2010 at 2:40 PM

Hello

I would like to have the long descriptions of some of my images displayed as multiple lines instead of the slideviewer truncating the text. From my configuration.xml:

<<module name="SlideDescription">
     <option name="TitleFontSize" value="16" />
     <option name="DescriptionHeight" value="100" />
 <option name="DescriptionFontSize" value="12" />
</module>
I can change font sizes, but nothing seems to happen when adjusting the DescriptionHeight.
Is this the right way of increasing the size of the description area? If not, how are you supposed to do it?
best regards
/p

<!-- BODY{font:x-small 'Verdana';margin-right:1.5em} .c{cursor:hand} .b{color:red;font-family:'Courier New';font-weight:bold;text-decoration:none} .e{margin-left:1em;text-indent:-1em;margin-right:1em} .k{margin-left:1em;text-indent:-1em;margin-right:1em} .t{color:#990000} .xt{color:#990099} .ns{color:red} .dt{color:green} .m{color:blue} .tx{font-weight:bold} .db{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;border-left:1px solid #CCCCCC;font:small Courier} .di{font:small Courier} .d{color:blue} .pi{color:blue} .cb{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;font:small Courier;color:#888888} .ci{font:small Courier;color:#888888} PRE{margin:0px;display:inline} --> <script type="text/javascript">// <![CDATA[// <![CDATA[ function f(e){ if (e.className=="ci"){if (e.children(0).innerText.indexOf("\n")>0) fix(e,"cb");} if (e.className=="di"){if (e.children(0).innerText.indexOf("\n")>0) fix(e,"db");} e.id=""; } function fix(e,cl){ e.className=cl; e.style.display="block"; j=e.parentElement.children(0); j.className="c"; k=j.children(0); k.style.visibility="visible"; k.href="#"; } function ch(e){ mark=e.children(0).children(0); if (mark.innerText=="+"){ mark.innerText="-"; for (var i=1;i<e.children.length;i++) e.children(i).style.display="block"; } else if (mark.innerText=="-"){ mark.innerText="+"; for (var i=1;i<e.children.length;i++) e.children(i).style.display="none"; }} function ch2(e){ mark=e.children(0).children(0); contents=e.children(1); if (mark.innerText=="+"){ mark.innerText="-"; if (contents.className=="db"||contents.className=="cb") contents.style.display="block"; else contents.style.display="inline"; } else if (mark.innerText=="-"){ mark.innerText="+"; contents.style.display="none"; }} function cl(){ e=window.event.srcElement; if (e.className!="c"){e=e.parentElement;if (e.className!="c"){return;}} e=e.parentElement; if (e.className=="e") ch(e); if (e.className=="k") ch2(e); } function ex(){} function h(){window.status=" ";} document.onclick=cl; // ]]></script>

Developer
Apr 18, 2010 at 2:31 PM

Yes, that is how you change the description height.  But, first, you need to be using the 2.1 release (this feature was added in that release).  Second, your description height should be in increments of 30.  See the XMLConfiguration sample to see an example of this is action.

Also check out this... 

http://slideshow2.codeplex.com/WorkItem/View.aspx?WorkItemId=808

As well as the links to discussion threads included in that work item.

Jan 28, 2011 at 6:03 PM

In the SlideDescription.cs, you could comment out the "TrimText" call, as below:

 

			#region [ Description ]

				#region [ DescriptionHeight ]
				public double DescriptionHeight
				{
					get { return (double)GetValue(DescriptionHeightProperty); }
					set { SetValue(DescriptionHeightProperty, value); }
				}

				public static readonly DependencyProperty DescriptionHeightProperty =
							DependencyProperty.Register(
								"DescriptionHeight",
								typeof(double),
								typeof(SlideDescription),
								null);

				#endregion

				#region [ Description ]
					/// <summary>
				/// Gets or sets the description.
				/// </summary>
				/// <value>The description.</value>
				public string Description
				{
					get { return (string)GetValue(DescriptionProperty); }
					set
					{
						SetValue(DescriptionProperty, value);

						if (DescriptionElement != null)
						{
							DescriptionElement.Text = Description;
							//TrimText(Description, DescriptionElement, DescriptionHeight);
						}
					}
				}

Just keep in mind that any text that is taller than your description height is going to get cut off. You might want to try throwing a scrollbox or something in there (that's what I'm going to try next) to contain the description TextBlock.