Click here to Skip to main content
15,884,298 members
Articles / Desktop Programming / WPF

Wrap Panel Virtualization

Rate me:
Please Sign up or sign in to vote.
4.95/5 (18 votes)
2 Jan 2012CPOL2 min read 53.1K   5.6K   41  
WrapPanel doesn't support virtualization. But we can improve the performance by simulating virtualization.
using System;
using System.Collections.Generic;
using System.Text;

namespace Tags
{
    /// <summary>
    /// Provide an interface for Tag streams
    /// </summary>
    public interface ITagInfo
    {
        /// <summary>
        /// Gets file path for reading and writing data
        /// </summary>
        string FilePath
        { get;        }

        /// <summary>
        /// Gets file name part of file path
        /// </summary>
        string FileName
        { get;}

        /// <summary>
        /// Saves Tag information to file
        /// </summary>
        /// <returns>True if save successfully otherwise false</returns>
        bool Save();

        /// <summary>
        /// Load information from file
        /// </summary>
        /// <returns>true if loads successfully otherwise false</returns>
        bool Load();

        /// <summary>
        /// Indicate if file contained exception while loading
        /// </summary>
        bool HaveException
        { get;}

        /// <summary>
        /// Save file with specific formula
        /// </summary>
        /// <param name="Formula">Formula to save file</param>
        bool Save(string Formula);

        /// <summary>
        /// Save file at specific location
        /// </summary>
        bool SaveAs(string path);

        /// <summary>
        /// Indicate if current ITagInfo is template
        /// </summary>
        bool IsTemplate
        {
            get;
            set;
        }

        /// <summary>
        /// Make filename with specific formula
        /// </summary>
        /// <param name="Formula">Formula for rename</param>
        /// <returns>System.String Contains filename</returns>
        string MakeFileName(string Formula);
    }

    /// <summary>
    /// Indicates diffrent type of tags list
    /// </summary>
    public enum TagListTypes
    {
        /// <summary>
        /// List contains ID3
        /// </summary>
        ID3,
        /// <summary>
        /// List Contains ASF
        /// </summary>
        ASF,
        /// <summary>
        /// List Contains both ID3 and ASF
        /// </summary>
        Both
    }

    /// <summary>
    /// Indicates diffrent types of tags system
    /// </summary>
    public enum TagTypes
    {
        /// <summary>
        /// ID3 tag
        /// </summary>
        ID3,
        /// <summary>
        /// WMA tag
        /// </summary>
        ASF
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) KAZ Software Limited
Bangladesh Bangladesh
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions