LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly)
LEAD Technologies, Inc

ShowText Property (ImageList)

Example 





Gets or sets a value that indicate whether to show the items text. .NET support Silverlight support
Syntax
[DescriptionAttribute("Indicates whether to display item text.")]
[CategoryAttribute("Appearance")]
public bool ShowText {get; set;}
'Declaration
 
<DescriptionAttribute("Indicates whether to display item text.")>
<CategoryAttribute("Appearance")>
Public Property ShowText As Boolean
'Usage
 
Dim instance As ImageList
Dim value As Boolean
 
instance.ShowText = value
 
value = instance.ShowText
[DescriptionAttribute("Indicates whether to display item text.")]
[CategoryAttribute("Appearance")]
public bool ShowText {get; set;}
DescriptionAttribute("Indicates whether to display item text.")
CategoryAttribute("Appearance")
 get_ShowText();
set_ShowText(value);
[DescriptionAttribute("Indicates whether to display item text.")]
[CategoryAttribute("Appearance")]
public:
property bool ShowText {
   bool get();
   void set (    bool value);
}

Property Value

true to show the items text, otherwise; false. Default value is true.
Remarks

Changing this property will make this control loop through all the items and setting the ImageListItem.ShowText accordingly.

Example
Copy CodeCopy Code  
''' This example will show a <see cref="ImageList"/> control with the item text and then without the text.
Public Sub ImageList_ShowText(ByVal imageList As ImageList)
   ' Show the item text
   imageList.ShowText = True
   MessageBox.Show("Item text is visible")
   ' Hide the item text
   imageList.ShowText = False
   MessageBox.Show("Item text is not visible")

   ' Show the item text again
   imageList.ShowText = True
   MessageBox.Show("Item text is visible again")
End Sub
/// This example will show a <see cref="ImageList"/> control with the item text and then without the text.
public void ImageList_ShowText(ImageList imageList)
{
   // Show the item text
   imageList.ShowText = true;
   MessageBox.Show("Item text is visible");
   // Hide the item text
   imageList.ShowText = false;
   MessageBox.Show("Item text is not visible");

   // Show the item text again
   imageList.ShowText = true;
   MessageBox.Show("Item text is visible again");
}
/// This example will show a <see cref="ImageList"/> control with the item text and then without the text.
public void ImageList_ShowText(ImageList imageList)
{
   // Show the item text
   imageList.ShowText = true;
   MessageBox.Show("Item text is visible");
   // Hide the item text
   imageList.ShowText = false;
   MessageBox.Show("Item text is not visible");

   // Show the item text again
   imageList.ShowText = true;
   MessageBox.Show("Item text is visible again");
}
''' This example will show a <see cref="ImageList"/> control with the item text and then without the text.
Public Sub ImageList_ShowText(ByVal imageList As ImageList)
   ' Show the item text
   imageList.ShowText = True
   MessageBox.Show("Item text is visible")
   ' Hide the item text
   imageList.ShowText = False
   MessageBox.Show("Item text is not visible")

   ' Show the item text again
   imageList.ShowText = True
   MessageBox.Show("Item text is visible again")
End Sub
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Leadtools_Windows_Controls="clr-namespace:Leadtools.Windows.Controls;assembly=Leadtools.Windows.Controls"
x:Class="ScrollStyle.Window1"
x:Name="Window"
Title="Window1"
Width="640" Height="480" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
   <DockPanel>
     <Leadtools_Windows_Controls:ImageList Margin="8,46,8,196" HorizontalContentAlignment="Center" VerticalContentAlignment="Top"  
                                           Orientation="Vertical" ShowText="False" ItemBorderThickness="2,2,2,2" ItemMargin="0,0,0,0" 
                                           ItemSize="120,128" ItemImageSize="102,102" DockPanel.Dock="Left">
       <Leadtools_Windows_Controls:ImageListItem Source="file:///c:\users\Public\Documents\LEADTOOLS Images\cannon.jpg" Text="cannon.jpg"/>
       <Leadtools_Windows_Controls:ImageListItem Source="file:///c:\users\Public\Documents\LEADTOOLS Images\cannon.jpg" Text="cannon.jpg"/>
       <Leadtools_Windows_Controls:ImageListItem Source="file:///c:\users\Public\Documents\LEADTOOLS Images\eye.gif" Text="eye.gif"/>
     </Leadtools_Windows_Controls:ImageList>
   </DockPanel>
 </Window>
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ImageList Class
ImageList Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.