Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# and the Icon Class

C# and the Icon Class

Scheduled Pinned Locked Moved C#
csharphelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lea Hayes
    wrote on last edited by
    #1

    Hi, I am currently developing a toolstrip extension which will provide a feature to switch between several different icon sizes. I cannot assume that a provided Icon object will contain the required size, and so in such circumstances the next available size down must be enlarged at runtime. My only issue is in determining whether or not the Icon object contains the requested size. The following pseudo-code demonstrates what I am trying to achieve:

    public bool IconContainsSize(Icon icon, Size size)
    {
    foreach (subicon in icon)
    if (subicon.Size == size)
    return true;
    return false;
    }

    Once I have finished my extension I plan to upload an article here at CodeProject so that others can benefit from having a toolstrip which provides a facility to switch between the multiple button sizes provided within the programmer specified icon resources. This is literally the only part of my solution that I am struggling with! I am sure that there must be a .NET approach to this. :~ Thanks, Lea Hayes

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups