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

EnableRubberBandSelection Property

Example 





Gets or sets a value that indicates whether rubber band selection is enabled in this control. .NET support
Syntax
[CategoryAttribute("Appearance")]
[DescriptionAttribute("Margin of each item image.")]
public bool EnableRubberBandSelection {get; set;}
'Declaration
 
<CategoryAttribute("Appearance")>
<DescriptionAttribute("Margin of each item image.")>
Public Property EnableRubberBandSelection As Boolean
'Usage
 
Dim instance As ImageList
Dim value As Boolean
 
instance.EnableRubberBandSelection = value
 
value = instance.EnableRubberBandSelection
[CategoryAttribute("Appearance")]
[DescriptionAttribute("Margin of each item image.")]
public bool EnableRubberBandSelection {get; set;}
CategoryAttribute("Appearance")
DescriptionAttribute("Margin of each item image.")
 get_EnableRubberBandSelection();
set_EnableRubberBandSelection(value);
[CategoryAttribute("Appearance")]
[DescriptionAttribute("Margin of each item image.")]
public:
property bool EnableRubberBandSelection {
   bool get();
   void set (    bool value);
}

Property Value

true if rubber band selection is enabled in this control, otherwise; false.
Remarks

When the value of this property is true, the user can draw a rectangle on the control to select multiple items. This rectangle will be filled using the RubberBandFill brush.

Example
Copy CodeCopy Code  
Public Sub ImageList_EnableRubberBandSelection(ByVal imageList As ImageList)
   ' Show the item text
   imageList.SelectionMode = SelectionMode.Multiple
   imageList.EnableRubberBandSelection = True

   Dim fillBrush As SolidColorBrush = New SolidColorBrush(Colors.Red)
   fillBrush.Opacity = 0.5

   imageList.RubberBandFill = fillBrush
End Sub
public void ImageList_EnableRubberBandSelection(ImageList imageList)
{
   // Show the item text
   imageList.SelectionMode = SelectionMode.Multiple;
   imageList.EnableRubberBandSelection = true;

   SolidColorBrush fillBrush = new SolidColorBrush(Colors.Red);
   fillBrush.Opacity = .5;

   imageList.RubberBandFill = fillBrush;
}
<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"
    Height="600" Width="800" Title="EnableRubberBandSelection Sample">
  <DockPanel>
    <Leadtools_Windows_Controls:ImageList
              Name="theImageList"
              DockPanel.Dock= "Bottom"
              EnableRubberBandSelection="True"
              HorizontalAlignment="Center" VerticalAlignment="Bottom" ItemBorderBrush="Red" ItemSelectedForeground="Blue" ItemSelectedBackground="Yellow">
      <Leadtools_Windows_Controls:ImageList.RubberBandFill>
        <SolidColorBrush Color="Red" Opacity=".5"/>
      </Leadtools_Windows_Controls:ImageList.RubberBandFill>
      <Leadtools_Windows_Controls:ImageListItem Source="file:///c:\users\Public\Documents\LEADTOOLS Images\cannon.jpg" Text="slave.jpg"/>
      <Leadtools_Windows_Controls:ImageListItem Source="file:///c:\users\Public\Documents\LEADTOOLS Images\clean.tif" Text="clean.tif"/>
    </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.