Giter Site home page Giter Site logo

imagelistview's People

Watchers

 avatar

imagelistview's Issues

Need Help for CheckBox in DetailsView

Ozgur,

I am happy with your proposal.

But now I need help. I am in the process to integrate the proposed CheckBox
into the DetailsView. So far that was easier than expected. However...

For the thumnails I grab the checkbox location for each item in the
ItemListView.HitTest() using 

Point location = layoutManager.GetCheckBoxLocation(bounds);
this.Items[index].CheckBoxLocation = location;

I am struggling to get the Y-co-ordinate for each row to code something
similar like above. Have I overseen something, or do I need to code the
whole Row.Location stuff or is the HitTest() the wrong place ?

BTW - I need the this.Items[index].CheckBoxLocation to check if the MouseUp
coordinates are within the CheckBox rectangle.


Robby





Original issue reported on code.google.com by [email protected] on 7 Mar 2010 at 5:03

Attachments:

Collection for checked items

Now that we have item checkboxes, we need an !ImageListView.!CheckedItems 
property to iterate over checked items.

Original issue reported on code.google.com by oozcitak on 11 Mar 2010 at 1:33

Scroll bars does scroll by integral item height

* Posted by tonyt on CP *

When in details view, the control does not scroll by the
correct LargeChange amount, and results in only a portion 
of the first visible item shown. By convention, the top of
the first visible item's bounds should be at the top of the
control's content bounds.

I think the problem is that the ScrollBar's LargeChange 
value is not correctly set to be a multiple of the item 
height.

From: ImageListViewLayoutManager.cs:

   // Current line for detail view:
   mImageListView.vScrollBar.LargeChange = mItemAreaBounds.Height;

   // This corrects the issue:                     
   mImageListView.vScrollBar.LargeChange = 
      mItemSize.Height * ( mItemAreaBounds.Height / mItemSize.Height );

Original issue reported on code.google.com by oozcitak on 10 Mar 2010 at 9:14

AllowDuplicateFileNames = false doesn't work

*Posted by XChrome on CP*

It is possible to drag'n'drop the same file from other applications (eg. 
windows explorer) again and again to the imagelisteview-area, although 
AllowDuplicateFileNames = false.

Original issue reported on code.google.com by oozcitak on 28 Dec 2009 at 9:35

Issue30 Follow-up GetFileIcon() BackColor

Thanks for implementing Issue30 GetFileIcon() and using the icon as
fallback to the thumbnail generation routine.

GetFileIcon() provides transparent alpha channel images. The 5.2 standard
fills the background color for thumbnails with white color. That is oK for
"normal" thumbnail images. However, for the GetFileIcon() icons I would
prefer a transparent background especially if the control background color
is changed to darker colors.

Proposed simple solution:
class Utility
{
  ...
  internal static Image ThumbnailFromFile(string filename, Size size,
UseEmbeddedThumbnails useEmbeddedThumbnails, Color backColor)
  ...
  // flag whether background color shall be cleared
  // false = do not clear background for GetFileIcon()
  // true  = clear background for all other thumbnails
  bool clearBackColor = true;

            // Get the shell icon if the source file is not an image file
            if (source == null)
            {
                try
                {
                    bool large = false;
                    if (size.Width > 32 || size.Height > 32)
                        large = true;
                    source = GetFileIcon(filename, large);
                    clearBackColor = false;     // << modified
                }
                catch
                {
                    if (source != null)
                        source.Dispose();
                    source = null;
                }
            }

            // If all failed, return null.
            if (source == null) return null;

            // Create the thumbnail
            try
            {
                Size scaled = GetSizedImageBounds(source, size);
                thumb = new Bitmap(source, scaled.Width, scaled.Height);
                using (Graphics g = Graphics.FromImage(thumb))
                {
                    g.PixelOffsetMode = PixelOffsetMode.None;
                    g.InterpolationMode = InterpolationMode.HighQualityBicubic;

                    if (clearBackColor)         // << modified
                        g.Clear(backColor);

                    g.DrawImage(source, 0, 0, scaled.Width, scaled.Height);
                }
            }


Robby   

Original issue reported on code.google.com by [email protected] on 2 Mar 2010 at 3:35

Hide scrollbars

Add a new property to show/hide scrollbars.

Original issue reported on code.google.com by oozcitak on 3 Mar 2010 at 11:00

Resize virtual item initial thumbnails

The CacheManager does not down size the initial thumbnails added with virtual 
items.

Original issue reported on code.google.com by oozcitak on 2 Mar 2010 at 11:01

Drag item

Dragging a single item immediately to its right moves the item.

Original issue reported on code.google.com by oozcitak on 24 Nov 2009 at 3:11

ImagListViewItems properties

Any chance to get some of the properties belonging to the 
ImageListViewItem writeable?

I specifically mean those properties like: FileSize, FNumber, Aperture ...

The reason is that i saved those to a database where i earlier pick them 
from the file. But when i now read the image from the database i dont have 
access to file on disk. When i read from database and want to:
Manina......ImageListViewItem.FileSize = "from database" i get the message 
that its just readable.

Some thing to fix ?

Heino

Original issue reported on code.google.com by [email protected] on 4 Mar 2010 at 1:10

Remove ImageListViewItem.GetImage

The framework already has many functions to load images. Adding another layer 
on top is not needed.

Original issue reported on code.google.com by oozcitak on 24 Feb 2010 at 9:11

black-style renderer

*Posted by XChrome on CP*

Can you please add the old black-style renderer from the first demo project 
again? The black-style was cool.

Original issue reported on code.google.com by oozcitak on 28 Dec 2009 at 9:36

Filmstrip mode

Either add a FilmStrip view mode or write a custom renderer.

Original issue reported on code.google.com by oozcitak on 25 Nov 2009 at 10:50

ItemClick bug

* Posted by Kevin via email *

I have implemented a right-click context menu at the item level.  I have 
found that if the initial click on an item is a right-click it works 
perfectly, but only once!    if the first click is a left-click, for any 
subsequent right-clicks after any initial click , the itemclick event will no 
longer fire on a right-click for that image.  once I move to another image 
and come back, it seems to reset, but again, only for the initial right-
click, then nada.

Original issue reported on code.google.com by oozcitak on 27 Jan 2010 at 2:49

Use VisualStyleRenderer for hovered state

* Posted by tonyt on CP *

One other suggestion is to use VisualStyleRenderer for
drawing the highlighting (for both hover and selected
items), if available on the current system.


// Your current code that draws the highlighting
// for the hovered item:

if ((state & ItemState.Hovered) != ItemState.None)
{
   using( Brush bHovered = new LinearGradientBrush( bounds, 
                  Color.FromArgb( 8, SystemColors.Highlight ), 
                  Color.FromArgb( 32, SystemColors.Highlight ), 
                  LinearGradientMode.Vertical ) )
   {
         Utility.FillRoundedRectangle( g, bHovered, bounds, 
            ( mImageListView.View == View.Details ? 2 : 4 ) );
   }
}

// Revised to use VisualStyleRenderer (if supported):

if ((state & ItemState.Hovered) != ItemState.None)
{
   VisualStyleRenderer renderer = 
         new VisualStyleRenderer( 
            VisualStyleElement.Button.PushButton.Normal );
   renderer.SetParameters( "BrowserTabBar::Menu", 14, 2 );
   renderer.DrawBackground( g, bounds, bounds );
}

Original issue reported on code.google.com by oozcitak on 10 Mar 2010 at 9:22

ctrl selection bug

*Posted by fredzhu on CP*

Add many images(>20)
hold ctrl key
select images one by one

well, when we select 5 - 10 , the previous selection was cleared.

The reason is when we move mouse a little, it start to do drag and drop
don't start drag when we hold ctrl or shift key, or don't start drag if it's 
still move in himself. 

Original issue reported on code.google.com by oozcitak on 3 Dec 2009 at 10:05

Add a virtual mode

In virtual mode, the implementor will be responsible for providing item 
thumbnails.

Original issue reported on code.google.com by oozcitak on 10 Jan 2010 at 10:15

Aggressive caching

* Posted by fredzhu on CP *

I means, when I add 50 images and only could view 20 images in the 
ImageListView
It seems ImageListView cached 20 images and then stop caching.
If you scroll down to view other 30 images, it start to cache those 30 
images....

But why not keep caching another 30 images even we only could view parts of 
them at first?
In this case, 5 mins later, we don't need to wait for thumbnail when we 
scroll down.

Original issue reported on code.google.com by oozcitak on 8 Feb 2010 at 12:58

New add item overload with initial thumbnails

An initial thumbnail image can be specified for virtual items. This should 
also be possible with regular items.

Original issue reported on code.google.com by oozcitak on 11 Mar 2010 at 11:01

Localization

Default column header texts need to be made localizable. Add a resource file 
for that.

Original issue reported on code.google.com by oozcitak on 25 Nov 2009 at 10:54

Hover events

Add events for item hover and column hover.

Original issue reported on code.google.com by oozcitak on 9 Feb 2010 at 10:05

Drag drop error with InsertInternal

What steps will reproduce the problem?
1. Create 2 ImageListView (left and right)
2. Add two or some images to left one
3. Drag and drop images from left one to right one.
4. Remove all images in left one
5. Now we want to drag and drop images from right one to left one but can 
not.

What is the expected output? What do you see instead?
I think images would be added to right listview but nothings is added.

What version of the product are you using? On what operating system?
I've used  the latest version 3.3 with Windows 7, Visual Studio 2008 SP1

Please provide any additional information below.
I've investigated and found an ArgumentOutOfRangeException has been thrown 
at mImageListView.Items.InsertInternal(index, item) in DragDrop method of 
class ImageListViewNavigationManager. I think there's something wrong with 
DropToRight make index is greater than number of items. My solution is try 
insert again like below:

do
{

    try
    {
        mImageListView.Items.InsertInternal(index, item);
        break;
    }
    catch (Exception ex)
    {
        Debug.Print("EXCEPTION when insert item into " + 
mImageListView.Name + " - COUNT: "
            + mImageListView.Items.Count + ", INSERT POS: " + index + ", 
EXCEPTION: " + ex.Message);
    }

    // Decrease position
    index--;

} while (index >= 0);

Original issue reported on code.google.com by langxangvn on 31 Dec 2009 at 9:41

Properties ImageListViewItem

Ozgur,

I am not sure why you have set the majority of the ImageListViewItem
properties to Browsable(false). Since the EXIF properties can be nicely
used in a PropertyGrid, I suggest to group them and reverse the Browsable()
settings. Enclosed my proposal:

Keep-on coding

Rob


#region Properties
        /// <summary>
        /// Gets or sets the background color of the item.
        /// </summary>
        [Category("Appearance"), Browsable(false), Description("Gets or
sets the background color of the item."), DefaultValue(typeof(Color),
"Transparent")]
        public Color BackColor
        {
            get
            {
                return mBackColor;
            }
            set
            {
                if (value != mBackColor)
                {
                    mBackColor = value;
                    if (mImageListView != null)
                        mImageListView.Refresh();
                }
            }
        }
        /// <summary>
        /// Gets the cache state of the item thumbnail.
        /// </summary>
        [Category("Behavior"), Browsable(false), Description("Gets the
cache state of the item thumbnail.")]
        public CacheState ThumbnailCacheState { get { return
mImageListView.cacheManager.GetCacheState(mGuid); } }
        /// <summary>
        /// Gets a value determining if the item is focused.
        /// </summary>
        [Category("Appearance"), Browsable(false), Description("Gets a
value determining if the item is focused.")]
        public bool Focused
        {
            get
            {
                if (owner == null || owner.FocusedItem == null) return false;
                return (this == owner.FocusedItem);
            }
            set
            {
                if (owner != null)
                    owner.FocusedItem = this;
            }
        }
        /// <summary>
        /// Gets or sets the foreground color of the item.
        /// </summary>
        [Category("Appearance"), Browsable(true), Description("Gets or sets
the foreground color of the item."), DefaultValue(typeof(Color), "WindowText")]
        public Color ForeColor
        {
            get
            {
                return mForeColor;
            }
            set
            {
                if (value != mForeColor)
                {
                    mForeColor = value;
                    if (mImageListView != null)
                        mImageListView.Refresh();
                }
            }
        }
        /// <summary>
        /// Gets the unique identifier for this item.
        /// </summary>
        [Category("Behavior"), Browsable(false), Description("Gets the
unique identifier for this item.")]
        internal Guid Guid { get { return mGuid; } private set { mGuid =
value; } }
        /// <summary>
        /// Gets the virtual item key associated with this item.
        /// Returns null if the item is not a virtual item.
        /// </summary>
        [Category("Behavior"), Browsable(false), Description("Gets the
virtual item key associated with this item.")]
        public object VirtualItemKey { get { return mVirtualItemKey; } }
        /// <summary>
        /// Gets the ImageListView owning this item.
        /// </summary>
        [Category("Behavior"), Browsable(false), Description("Gets the
ImageListView owning this item.")]
        public ImageListView ImageListView { get { return mImageListView; }
private set { mImageListView = value; } }
        /// <summary>
        /// Gets the index of the item.
        /// </summary>
        [Category("Behavior"), Browsable(false), Description("Gets the
index of the item."), EditorBrowsable(EditorBrowsableState.Advanced)]
        public int Index { get { return mIndex; } }
        /// <summary>
        /// Gets or sets a value determining if the item is selected.
        /// </summary>
        [Category("Appearance"), Browsable(false), Description("Gets or
sets a value determining if the item is selected."), DefaultValue(false)]
        public bool Selected
        {
            get
            {
                return mSelected;
            }
            set
            {
                if (value != mSelected)
                {
                    mSelected = value;
                    if (mImageListView != null)
                        mImageListView.OnSelectionChangedInternal();
                }
            }
        }
        /// <summary>
        /// Gets or sets the user-defined data associated with the item.
        /// </summary>
        [Category("Data"), Browsable(false), Description("Gets or sets the
user-defined data associated with the item.")]
        public object Tag { get; set; }
        /// <summary>
        /// Gets or sets the text associated with this item. If left blank,
item Text 
        /// reverts to the name of the image file.
        /// </summary>
        [Category("Appearance"), Browsable(true), Description("Gets or sets
the text associated with this item. If left blank, item Text reverts to the
name of the image file.")]
        public string Text
        {
            get
            {
                return mText;
            }
            set
            {
                mText = value;
                if (mImageListView != null)
                    mImageListView.Refresh();
            }
        }
        /// <summary>
        /// Gets the thumbnail image. If the thumbnail image is not cached,
it will be 
        /// added to the cache queue and DefaultImage of the owner image
list view will
        /// be returned. If the thumbnail could not be cached ErrorImage of
the owner
        /// image list view will be returned.
        /// </summary>
        [Category("Appearance"), Browsable(false), Description("Gets the
thumbnail image.")]
        public Image ThumbnailImage
        {
            get
            {
                if (mImageListView == null)
                    throw new InvalidOperationException("Owner control is
null.");

                CacheState state = ThumbnailCacheState;
                if (state == CacheState.Error)
                    return mImageListView.ErrorImage;

                Image img = mImageListView.cacheManager.GetImage(Guid);
                if (img != null)
                    return img;

                if (isVirtualItem)
                    mImageListView.cacheManager.Add(Guid, mVirtualItemKey,
mImageListView.ThumbnailSize, mImageListView.UseEmbeddedThumbnails);
                else
                    mImageListView.cacheManager.Add(Guid, FileName,
mImageListView.ThumbnailSize, mImageListView.UseEmbeddedThumbnails);
                return mImageListView.DefaultImage;
            }
        }
        /// <summary>
        /// Gets or sets the draw order of the item.
        /// </summary>
        [Category("Appearance"), Browsable(false), Description("Gets or
sets the draw order of the item."), DefaultValue(0)]
        public int ZOrder { get { return mZOrder; } set { mZOrder = value; } }
        /// <summary>
        /// Gets the last access date of the image file represented by this
item.
        /// </summary>
        [Category("Date Information"), Browsable(true), Description("Gets
the last access date of the image file represented by this item.")]
        public DateTime DateAccessed { get { UpdateFileInfo(); return
mDateAccessed; } }
        /// <summary>
        /// Gets the creation date of the image file represented by this item.
        /// </summary>
        [Category("Date Information"), Browsable(true), Description("Gets
the creation date of the image file represented by this item.")]
        public DateTime DateCreated { get { UpdateFileInfo(); return
mDateCreated; } }
        /// <summary>
        /// Gets the modification date of the image file represented by
this item.
        /// </summary>
        [Category("Date Information"), Browsable(true), Description("Gets
the modification date of the image file represented by this item.")]
        public DateTime DateModified { get { UpdateFileInfo(); return
mDateModified; } }
        /// <summary>
        /// Gets the shell type of the image file represented by this item.
        /// </summary>
        [Category("File Information"), Browsable(true), Description("Gets
the shell type of the image file represented by this item.")]
        public string FileType { get { UpdateFileInfo(); return mFileType; } }
        /// <summary>
        /// Gets or sets the name of the image fie represented by this item.
        /// </summary>        
        [Category("File Information"), Browsable(true), Description("Gets
or sets the name of the image fie represented by this item.")]
        public string FileName
        {
            get
            {
                return mFileName;
            }
            set
            {
                if (mFileName != value)
                {
                    mFileName = value;
                    if (!isVirtualItem)
                    {
                        isDirty = true;
                        if (mImageListView != null)
                        {
                            mImageListView.cacheManager.Remove(Guid);
                            mImageListView.itemCacheManager.Add(this);
                            mImageListView.Refresh();
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Gets the path of the image fie represented by this item.
        /// </summary>        
        [Category("File Information"), Browsable(true), Description("Gets
the path of the image fie represented by this item.")]
        public string FilePath { get { UpdateFileInfo(); return mFilePath; } }
        /// <summary>
        /// Gets file size in bytes.
        /// </summary>
        [Category("File Information"), Browsable(true), Description("Gets
file size in bytes.")]
        public long FileSize { get { UpdateFileInfo(); return mFileSize; } }
        /// <summary>
        /// Gets image dimensions.
        /// </summary>
        [Category("Image Information"), Browsable(true), Description("Gets
image dimensions.")]
        public Size Dimensions { get { UpdateFileInfo(); return
mDimensions; } }
        /// <summary>
        /// Gets image resolution in pixels per inch.
        /// </summary>
        [Category("Image Information"), Browsable(true), Description("Gets
image resolution in pixels per inch.")]
        public SizeF Resolution { get { UpdateFileInfo(); return
mResolution; } }
        /// <summary>
        /// Gets image deascription.
        /// </summary>
        [Category("Information"), Browsable(true), Description("Gets image
deascription.")]
        public string ImageDescription { get { UpdateFileInfo(); return
mImageDescription; } }
        /// <summary>
        /// Gets the camera model.
        /// </summary>
        [Category("Camera Information"), Browsable(true), Description("Gets
the camera model.")]
        public string EquipmentModel { get { UpdateFileInfo(); return
mEquipmentModel; } }
        /// <summary>
        /// Gets the date and time the image was taken.
        /// </summary>
        [Category("Date Information"), Browsable(true), Description("Gets
the date and time the image was taken.")]
        public DateTime DateTaken { get { UpdateFileInfo(); return
mDateTaken; } }
        /// <summary>
        /// Gets the name of the artist.
        /// </summary>
        [Category("Information"), Browsable(true), Description("Gets the
name of the artist.")]
        public string Artist { get { UpdateFileInfo(); return mArtist; } }
        /// <summary>
        /// Gets image copyright information.
        /// </summary>
        [Category("Information"), Browsable(true), Description("Gets image
copyright information.")]
        public string Copyright { get { UpdateFileInfo(); return
mCopyright; } }
        /// <summary>
        /// Gets the exposure time in seconds.
        /// </summary>
        [Category("Camera Information"), Browsable(true), Description("Gets
the exposure time in seconds.")]
        public string ExposureTime { get { UpdateFileInfo(); return
mExposureTime; } }
        /// <summary>
        /// Gets the F number.
        /// </summary>
        [Category("Camera Information"), Browsable(true), Description("Gets
the F number.")]
        public float FNumber { get { UpdateFileInfo(); return mFNumber; } }
        /// <summary>
        /// Gets the ISO speed.
        /// </summary>
        [Category("Camera Information"), Browsable(true), Description("Gets
the ISO speed.")]
        public ushort ISOSpeed { get { UpdateFileInfo(); return mISOSpeed; } }
        /// <summary>
        /// Gets the shutter speed.
        /// </summary>
        [Category("Camera Information"), Browsable(true), Description("Gets
the shutter speed.")]
        public string ShutterSpeed { get { UpdateFileInfo(); return
mShutterSpeed; } }
        /// <summary>
        /// Gets the lens aperture value.
        /// </summary>
        [Category("Camera Information"), Browsable(true), Description("Gets
the lens aperture value.")]
        public string Aperture { get { UpdateFileInfo(); return mAperture; } }
        /// <summary>
        /// Gets user comments.
        /// </summary>
        [Category("Information"), Browsable(true), Description("Gets user
comments.")]
        public string UserComment { get { UpdateFileInfo(); return
mUserComment; } }
        #endregion

Original issue reported on code.google.com by [email protected] on 28 Feb 2010 at 11:16

4.2 vitrualmode Titles Renderer Error

What steps will reproduce the problem?
1. Virtual mode hooked to a database
2. Add items
3. Use TitlesRenderer

What is the expected output? What do you see instead?

Some items don't have the text property set, looks like they start to show
again in the next row not was not visable. Scroll down and they are there.
Threading issue maybe?

What version of the product are you using? On what operating system?

4.2   Windows 7 X64

Please provide any additional information below.

DW.Volume if you want to email me about this.

Original issue reported on code.google.com by [email protected] on 13 Jan 2010 at 11:24

Attachments:

Shell icon fall-back can use Item icons

Now that we fetch shell icons for each item for the new ShowFileIcons 
property, there is no need to separately fetch shell icons for a fall-back 
for item thumbnails.

Original issue reported on code.google.com by oozcitak on 10 Mar 2010 at 11:30

display the new item

What steps will reproduce the problem?
1.add a item by a image filename
2.remove all the items
3.add another one by filename ,the imagelistview did't display the thumb 
image but i zoom the form ,the thumb image show

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 26 Feb 2010 at 7:40

Attachments:

GetFileIcon

Your code could benefit from a GetFileIcon() method in your Utility class.
Enclosed code ready to copy & paste:

Keep-on coding
Rob

[DllImport("User32.dll")]
        public static extern int DestroyIcon(IntPtr hIcon);

        public static Image GetFileIcon(string fileName, bool largeIcon)
        {
            SHGFI flags = SHGFI.SmallIcon;

            if (largeIcon)
                flags = SHGFI.LargeIcon;

            SHFILEINFO shinfo = new SHFILEINFO();
            IntPtr hImgSmall = SHGetFileInfo(fileName, 0, out shinfo,
(uint)Marshal.SizeOf(shinfo), SHGFI.Icon | flags);

            Image icon =
(Image)System.Drawing.Icon.FromHandle(shinfo.hIcon).Clone();
            DestroyIcon(shinfo.hIcon);

            return icon;
        }

Original issue reported on code.google.com by [email protected] on 28 Feb 2010 at 11:03

Items.Clear doesnt clear items in Virtual mode.

What steps will reproduce the problem?
1. Virtual mode hooked to a database
2. Add items
3. Items.Clear
4. add more items

What is the expected output? What do you see instead?

System.ArgumentException was unhandled
  Message="An item with the same key has already been added."
  Source="mscorlib"
  StackTrace:
       at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue
value, Boolean add)
       at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
       at Manina.Windows.Forms.ImageListViewCacheManager.DoWork()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(
TryCode
code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 


What version of the product are you using? On what operating system?

4.3 Visual Studio 2008 WIndows 7 x64

Please provide any additional information below.

Me.ImageListView1.ClearThumbnailCache()
            Me.ImageListView1.Items.Clear()

            Dim Results As IEnumerable(Of POAEntities.documents) = From c
In DB.documents _
                          Where c.LotIdentifier = SubPartLotIdent _
                          Select c

            If Results.Count > 0 Then

                Dim MyThumb As Image

                For Each NewRow As POAEntities.documents In Results
                    Console.WriteLine(NewRow.DocumentIndex)
                    MyThumb =
Image.FromStream(ConvertBytesToMemoryStream(NewRow.Thumbnail))
                    Me.ImageListView1.Items.Add(NewRow.DocumentIndex,
NewRow.DocumentIndex.ToString, MyThumb)
                Next

            End If

Original issue reported on code.google.com by [email protected] on 20 Jan 2010 at 7:14

Add MultiSelect property

How do you think about add MultiSelect property of image list view.

Original issue reported on code.google.com by langxangvn on 2 Mar 2010 at 8:50

After Form Loads - some thumb images don't appear.

What steps will reproduce the problem?
1. Use Virtual mode with a database
2. Have more that 10 images added
3.

What is the expected output? What do you see instead?

All thumbnail images are show. Some thumbnail images are not shown.

What version of the product are you using? On what operating system?

4.3 WIndows 7 X64 Visual Studio 2008

Please provide any additional information below.

Only occurs after the Form has loaded. Occurs consistantly. Seems to act
very much like a previous issue in that its the last two rows visable when
the window is drawn.

Original issue reported on code.google.com by [email protected] on 21 Jan 2010 at 12:08

Attachments:

Demo application for v6.0

It would be nice to have a demo application demonstrating the new features 
(themes, checkboxes) in version 6.0.

Original issue reported on code.google.com by oozcitak on 11 Mar 2010 at 1:36

Renderers can use DrawImageUnscaled instead of DrawImage

After Issue 33, thumbnails can no longer exceed control's ThumnailSize 
setting, hence it is no longer necessary to use DrawImage in the renderers. 
There may or may not be any difference performance-wise. This needs to be 
tested.

Original issue reported on code.google.com by oozcitak on 2 Mar 2010 at 11:15

Mono support

The control builds successfully on Mono with a few glitches:

* Mono doesn't like when control's Text property is set to null.
* The ControlCollection (Controls property) is created after the control's 
constructor, meaning the child scroll bars need to be added somewhere else.
* The P/Invoke call to get the file type does not work in Mono. This needs 
to be replaced with something suitable for the Linux platform. The Linux 
specific call needs to be hidden from the Windows build with something like 
this:

public bool IsMono()
{
  return Type.GetType("Mono.Runtime") != null;
}

Original issue reported on code.google.com by oozcitak on 15 Feb 2010 at 3:08

Focus and keyboard navigation

*Posted by XChrome on CP:*

found some little bugs (tested with default (Vista-)Style)

1. When another control gets the focus - for example a treeview - and you 
make a right-click with your mouse over an item in the imageviewlist, the 
item-background becomes gray (no focus), instead blue, as usual. A right-
click on an item should set the focus to the imageviewlist as well as left-
click.

2. If an item is selected but another control is clicked the item-
background becomes gray - just like windows explorer. Thats okay. But if 
you hover over the gray item with your mouse, the item-background becomes 
an ugly gray+bluehover colormix. In Windows-Explorer on Vista an item 
becomes the dark blue color - like selected (with focus) + hover. On 
mouseleave its gray again. Should be fixed, too.

And now some suggestions for improvement:

3. The "Focus rectangle"-Drawing should only appear when more than one item 
is selected via Shift/Ctrl+Mouseclick (see 4.+5.)

4. I see you have a Shift+Mouseclick function to select items. That should 
not work with right-click - thats only for context-menu. Please make a test 
with Windows Explorer 
(works just the same under Windows XP as it does under Windows Vista)
- If you hold down the shiftkey, the focus rectangle appears and you can 
make a left-click to select some additional items.
- If you still hold the shiftkey, and make a right-click over the selected 
items, the context-menu appears.
- If you still hold the shiftkey, and make a right-click over another item, 
the selected items lose the focus and the other item is selected
- If you still hold the shiftkey, and make a right-click somewhere else in 
the imageviewlist, all selected items are losing the focus.

5. Can you please add a Ctrl+Mouseclick function for selecting multiple 
items?
- Same right-click proporties as above

Original issue reported on code.google.com by oozcitak on 25 Nov 2009 at 11:44

Using a context menu to get items:

I'm sorry I didn't get back to you on this issue sooner but I wanted to
research how its supposed to be done. The way I think that the control
should work is that you should be able to get the last item selected with a
context menu with:

ContextMenuStrip.SourceControl

Unfortunatly the control doesn't set a value for it. It is nothing.

If not, I have to set a global var to hold the select item till I get to it
in event down stream of the itemclick event.





Original issue reported on code.google.com by [email protected] on 6 Feb 2010 at 2:29

Renderers should check the thumbnail size before drawing

What steps will reproduce the problem?
1. Add some virtual items
2. Supply virtual item images larger than the thumbnail size.
3. Rendered thumbnails will not be resized down.

Original issue reported on code.google.com by oozcitak on 26 Jan 2010 at 9:38

pane-view + xp-renderer won't work

*Posted by XChrome on CP*

I noticed that the combination pane-view + xp-renderer won't work as expected 
(no thumbnails, everything looks ). The other renderers are okay. 

Original issue reported on code.google.com by oozcitak on 28 Dec 2009 at 9:35

Pimp-up Colors 4-All

Ozgur,
I like the Renderer and all Views. There is one missing bit, get custom
colors into the game. Enclosed my proposal.

Introduce a new class ImageListViewColor with static members Default, Noir,
etc.
Replace inline color settings with ImageListViewColor properties.
Add ImageListViewColor Colors property to ImageListView

That's it in short, attached the complete source code and two screenshots
using the default renderer with ImageListViewColor.Noir().

If you want to consider it for your standard code let me know, then I'll do
the last tweaks in the Default Renderer since I am not 100% happy with the
details view.

Robby

Original issue reported on code.google.com by [email protected] on 3 Mar 2010 at 11:22

Attachments:

File locking

There are a number of Image.FromFile which keep the image files locked.

ImageListViewCacheManager: 330
ImageListViewItem: 437, 440

Original issue reported on code.google.com by oozcitak on 24 Feb 2010 at 8:46

Overriding drag and drop for database connections

In using this control with my database app I need to handle the drag drop
event with out having the controls code exeute. It's easy just to blow away
the code in the drag drop event in ImageListViewNavigationManager for the
moment but was wondering about a long term plan for overriding drag and
drop and other (like hover) events to tailor this control.  Do you have any
thoughts on how I should do this to be keep as close to any long range
plans you have for this control?

I can get the event with the current version of course in my code but the
controls events still execute.

Original issue reported on code.google.com by [email protected] on 28 Jan 2010 at 8:36

CheckBox to ImageListViewItem

Ozgur,
This enhancement provides an option to include a CheckBox to the
ImageListViewItem and is a significant addition to the guts of your
control.

This option becomes handy if you would like to check several items 
for further batch processing. Regard this as an alternative to
mouse select, which has the downside that selections disappear
when user does not press shift or control on mouse click.

This implementation allows to toggle check marks for a single item 
or
mouse select several items, click on a checkbox of a selected item
and all other selected items will have the toggled check mark.

New features:
=============
ImageListView()     
---------------
Properties: 
bool              ShowCheckBox      whether to show checkbox
ContentAlignment  CheckBoxAlign     position checkbox
int       CheckBoxPadding   checkbox padding all

Events:     
OnItemCheckBoxClick

Methods:
void         CheckAll()     Marks all items as checked.
void         ClearChecked()     Marks all items as unchecked.
void         InverseChecked()   Inverses all items check mark.


ImageListViewItem() 
-------------------
Properties: 
bool         Checked        value whether the item is checked

Please note, attached screenshot includes the proposed FileIcon property as
proposed in Issue39 (which I marked by mistake as defect).

Robby

Original issue reported on code.google.com by [email protected] on 7 Mar 2010 at 11:17

Attachments:

Animated GIFS

*Posted by XChrome on CP*

Is there a way to support animated gifs? With static images like jpg, non-
animated gif, png everything works fine, but every animated gif throws an 
error. Maybe you could use the ImageAnimator.CanAnimate (on gif-extensions 
only) to check, if the images has frames and extract the first frame for the 
thumbnail.

Original issue reported on code.google.com by oozcitak on 3 Dec 2009 at 10:04

Update hovered item on mouse wheel

* Posted by tonyt on CP *

I noticed one thing it does very well, something that even
the Windows Common Control ListView has a problem with, is 
that with hover highlighting, when the mouse wheel is used 
to scroll the control, the hovered item is not updated until 
the mouse moves (the problem in the CommCtrls ListView is
only an issue with hot-tracking enabled).

You seem to have addressed that problem nicely, except that 
there seems to be a long delay before the hover highlighting 
is changed to the new hovered item just after a mouse wheel 
scroll.   Are you using a timer for that?

Original issue reported on code.google.com by oozcitak on 10 Mar 2010 at 9:13

Make virtual item keys public

Virtual item keys should be public.

Original issue reported on code.google.com by oozcitak on 11 Feb 2010 at 8:11

ShowFileIcon property

For those who like it fancy, introduce a property whether to display the
file icon.

The proposed solution displays the file icon in thumbnails and details view:

class ImageListView
{
  private bool mShowFileIcon;

/// <summary>
/// Gets or sets whether to display the file icon.
/// </summary>
[Category("Appearance"), Description("Gets or sets whether to display the
file icon."), DefaultValue(true)]
public bool ShowFileIcon
{
   get { return mShowFileIcon; }
   set { mShowFileIcon = value; }
}

public ImageListView()
{
  ...
  mShowFileIcon = true;
}

class ImageListViewRenderer
public virtual void DrawItem
{
  ...
  if (mImageListView.ShowFileIcon)
  g.DrawImage(Utility.GetFileIcon(item.FileName, false), bounds.Right - 18,
bounds.Top + 2);

  // Focus rectangle
  ...
}


Original issue reported on code.google.com by [email protected] on 5 Mar 2010 at 10:19

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.