Can the Icon be disposed safely after a call to Imaging.CreateBitmapSourceFromHIcon?

Hi all,
for a Grid that shows file paths and the associated file icon for a set of given files we extract the Icon of those files and create ImageSource instances for later use.
Roughly:
FileIcons aIcon = new FileIcons(filePath);
System.Drawing.Icon i = aIcon.GetSmallIconWithTypeName(isFolder, out typeName);
ImageSource imgSource = Imaging.CreateBitmapSourceFromHIcon(i.Handle, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
Irrelevant but just for info: The FileIcons class uses SHGetFileInfo and ExtractIconEx of the Shell32.dll to get the Icon.
The interesting part is: After the call to 
Imaging.CreateBitmapSourceFromHIcon(...)
Can I safely dispose the Icon the ImageSource was created from AND keep using the ImageSource afterwards?
Thanks for the help,
Frank

Hi Frank,
Based on your code, your case related to WPF, I would move your thread to WPF forum for better support.
Have a nice day!
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Can the icons on the iPhone screens be bigger?

    Can the icons on the iPhone screens be bigger?

    If you mean the apps on your homescreen I dont believe there is a way to make them bigger. As far as my experience goes in apple products I have not seem a way to enlarge the icons on your iphone screen.. I hope this help and best of luck.
    -Jason

  • Hi Experts, can the secondary windows be processed after the main window?

    Hi Experts,
    at the end of the main window there is a command node and can the secondary windows be processed after the main window? thanks for your reply.
    Kind regards
    Dawson

    Hello Dawson
    No it can't Process the secondary window if you are calling a new Page in that command line.
    Even if it gets called I don't think it will give the desired output.
    Give it a try, But I am sure its not going to give you the desired output instead attach the command line to the end of your secondary window and in condition tab of secondary window check the check box "Only after Main window".
    Hope this discussion was helpful.
    Cheers,
    Suvendu

  • Can the icons be removed?

    How can the icons be removed from Safari search page they are a mix of what I have searched for and my favorites I never asked for an icon and I do not want the icon to be on my safari search page! How do I remove them?

    What is the application?
    Place your cursonr on it and wait.  A little pane will come up to tell you what the application is

  • The icons in the bookmark tool bar are blank and the text that use to be below the icon is gone. I now have to cursor over the blank icons to see the text and the one I want. Can the icon/text customization be returned?

    In the Navigation Toolbar, the icons "Back", "Forward" etc. show the small icon and the descriptive text below the Icon. My Bookmark Toolbar use to have the same icon/text format but at some point, possibly a browser update, that changed. Currently, I do have a visible Bookmark Toolbar BUT the icons do not show the website icon, as previously, and the text below each icon is gone. I an cursor over each icon and the text becomes visible next to the icon. This is a bit of a pain to find a bookmark. Can I do a customization to return to the icon/text format.
    Was this changed because browser users requested this option, or was it an internal decision.? If the later why make such changes when not requested?
    Ed Sander

    That wasn't a change in Firefox. It sounds like something is broken in your Firefox installation, or you are misunderstanding the different between the Bookmarks Toolbar and the other Toolbars.
    In the Bookmarks Toolbar the text appears next to the website icon, not below the icon as with the other two Toolbars, and it's not switchable between text and no text as with the other Toolbars. With both the bookmark icon and the Bookmark name missing, something is broken in your installation. You need to do a little troubleshooting.
    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]
    If your problem isn't related to an extension, your bookmarks data base file (places.sqlite) is probably corrupt. <br />
    http://kb.mozillazine.org/Locked_or_damaged_places.sqlite <br />
    Be aware that if you delete the "places.sqlite" and similar files, your bookmark website icons won't automatically appear (the JSON backups don't have that icon data) when you restart Firefox and the places.sqlite is rebuilt using the backup data file, but the icons should be saved the first time each bookmark is used for the first time.

  • ALL the Icons disappear for seconds after using five-finger-gesture and swipe to another page in the home screen

    Hello,
    iPad Air, 8.1.2
    This issue has been making me annoyed for a long time...
    You can find the bug by following steps:
    1). Go to Settings APP.
    2). Use five-finger-gesture to close this APP, and quickly swipe to another page of home screen before the icons in the current page haven't dropped down.( I mean...The animation that likes icons dropping down)
    3). You can see ALL the icons will disappear for seconds.
    I've restored the firmware again and again, but it doesn't helped at all...
    And if I turn on the "reduce motion" option, the icons won't disappear.
    And...Some little bugs:
    1) In APP switcher, when swiping up to close APPs, the icon's animation is lost. (I mean...The icons shouldn't disappear without any animations. In iOS7, the icons should have a "closing animation"
    2)In lock screen, press the power button with a very high speed, and you will see the "time" in the lock screen is being appeared and disappeared, appeared and disappeared, appeared and disappeared...
    I hope you can understand me, I'm sorry for my bad English, I'm a middle school student in China, and I have to report these bugs.

    I am not seeing that problem, however, this is a user forum. You aren't talking to Apple here.
    if you want to report a problem to Apple use this: http://www.apple.com/feedback/ipad.html

  • Where can the log file be found after printing to the PDF printer?

    Cannot locate the log file after printing to the Adobe PDF printer.  The box was unchecked for delete log file after successful print.  Running Adobe Acrobat X Standard (v10.0.0) on a windows 2008 R2 server.

    There is usually no log file when the conversion succeeds. Only in certain cases are their warning or information messages, usually of little interest.

  • Can the base URL be canged after cal is configured?

    In cal 6, I have http://server:8080
    but I want it to respond on http://server:8080/cal
    Is this possible to change without a reinstall?
    I ren through the csconfigurato, but it only addresses port #.
    Thanks for any help!

    I met
    uiBaseUrl
    Specifies a URL for the base server address. For example: "https://proxyserver".
    Corresponding ics.conf parameter:
    ui.base.url (no default)
    in the config file trying to find a solution for a different problem.

  • My iphone has inceased its size as if I has blown the icons up i cannot make a call i cannot shrink it down to show the icons

    my iphone 4 has increased its display size and i cannot decrease it to make a call or see my icons

    Double tap with screen with 3 fingers. Wen you get it back to normal, go to Settings > General > Accessibility, and turn off the Zoom function.
    Stedman

  • Using a downloaded image as the icon style for a Button

    Hello
    I have a problem and after a lot of investigation I have reached to no conclusion.
    When setting the icon to a Button, a Class of an image is needed. This can be done very simply by embeding an image. But what I would like to do is use an image known only at runtime.
    More exactly I can not download an image from an external source, obtain it bitmapData or something else, convert it and assign it as the icon style for a Button.
    So my problem is that for the Flex components that need an image, a Class needs to be assigned, and I can not use an external image to download it, to convert it in some way and assign it.
    Does anybody have any sugestion? Is it possible?
    My purpose is to make some utility that just downloads the images and after the downloading has been completed, to notify the "client" it should take the "created Class" to use it as a style.
    Thank you in advance for your time,
    Claude Bur.

    A quick google search turned up this solution:
    http://blog.benstucki.net/?p=42
    - Jason

  • Can the ipad mini make calls to a mobile phone other than a iphone.

    Can the ipad mini be used to make calls to any mobile phone.

    The iPad Mini has no phone capabilities.

  • Mail app is blank. I can not see any thing but a blank page with blue lined format. It does not shut down either. It just blinks out after a few seconds and the icon is there alone on my home screen then everything goes black and my home screen comes

    MY Mail app does not respond in anyway to anything. The icon shows I have over 300 emails but I have no access to them. When I tap on the Mail icon a blank white page comes up with the blue format lines. No emails, no inbox, nothing, not a single letter of the alphabet is there. Within a few seconds it blinks out and I see the icon and my home screen. Soon it just blinks out to black. I am left with the icon at the bottom center of the screen. I have no way to shut it down. I have no access to the emails (300) in my inbox. All that is happening is my memory is getting filled up with emails. I would appreciate any solution to this problem barring deleting my email set up in settings.
    if I have to resort to that I will, in the meantime I am hoping for a different resolution. Thanks everyone, you are all amazing and greatly appreciated. Sincerely, Diane.

    Hey There Diane,
    If I'm understanding your situation, you've got an iPad running iOS 6.1.3 and the Mail app is not working.  I understand you don't want to remove and re-add your email account.  
    The first thing I would suggest is to make sure your iPad is backed up to iCloud or iTunes.
    Do you have an iMAP or a POP email account?  When you go online to your email service provider's website, are you able to access the 300 emails in your inbox?
    Since the Mail app is part of your iOS operating system, upgrading that software to the latest version, which is 8.1.3 may resolve this issue.  
    If an app you installed unexpectedly quits, stops responding, or won’t open - Apple Support
    http://support.apple.com/en-us/HT201398
    Try these steps if you have an unresponsive app on your iPhone, iPad, or iPod touch.
    Restart the app
    Close the app and open it again.Restart your device
    Turn your device off and back on.Check for iOS and app updates
    Make sure that you're using latest version of iOS.
    Open the App Store and tap Updates.
    If updates are available, tap Update All.
    If asked, enter your Apple ID password. 
    You might need a Wi-Fi connection to update some apps.
    Update the iOS software on your iPhone, iPad, and iPod touch - Apple Support
    http://support.apple.com/en-us/HT204204
    Update the iOS software on your iPhone, iPad, and iPod touch
    Learn how to update your iOS device wirelessly or using iTunes.
    iOS software updates introduce new features that let you do even more with your iPhone, iPad, or iPod touch. Be sure to keep your devices up to date so that you don't miss out on the latest features.Before you update
    Back up your device to iCloud or iTunes.
    If you use your device's Personal Hotspot for your computer's Internet connection, update your device wirelessly or connect your computer to another network.Update your device wirelessly
    The easiest way to update your device is wirelessly, also called “over the air.” Here’s how:
    Plug in your device to a power source.
    Tap Settings > General > Software Update.
    Tap Download and Install. Updates might download automatically while your device is connected to Wi-Fi and a power source.
    Tap Install, or tap Later to install the update later. If you use a passcode, you'll need to enter it before installing the update.
    If you have some free space, but not enough to update over the air, you can either update using iTunes or delete content manually from your device. Whether you use iTunes or update over the air, you'll have the same amount of free space on your device after you update.
    Some iOS software updates aren't available as over-the-air updates. VPN or proxy connections might prevent your device from contacting the iOS update servers.Update your device using iTunes
    If you can’t update wirelessly, or if you want to update with iTunes, follow these steps:
    Install the latest version of iTunes on your computer.
    Plug in your device to your computer.
    In iTunes, select your device.
    In the Summary pane, click Check for Update. 
    Click Download and Update.
    If you don't have enough free space to update using iTunes, you'll need to delete content manually from your device.
    Find out what to do if you get other error messages while updating your device.
    Last Modified: Jan 12, 2015
    Hope this helps ...
    - Judy

  • What do you do when you can't connect to the internet and you get this message XUl Runner after you click on the icon to open Mozilla? Then it says error platform'1.9.2.16 is not campatible wwith minVersion =1.9.2.17 maxVersion 1.9.2.17

    I can't get the internet to open and when you click on the icon to open firefox the above message is displayed and I don't know how to fix what is causing the error.

    Do a clean (re-)install:
    * Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 3.6.x: http://www.mozilla.com/en-US/firefox/all-older.html
    * Firefox 4.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Do not remove personal data if you uninstall the current version.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.

  • My ipod touch has a permanent image of the end of a USB cable with an arrow pointing to an icon of ITunes. I can't reset, and ipod does not appear on itunes when I plug it into the computer.  This happened after I agreed to a failed software update.

    My ipod touch has a permanent image of the end of a USB cable with an arrow pointing to an icon of ITunes. I can't reset using the two button method, and ipod does not appear on itunes when I plug it into the computer - and nothing else happens either.  This happened after I agreed to a software update which failed.  How can I get it going again?

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • I can't get imovie to open after trying to shift the image to my TV by clicking fn F3.  If I hold the mouse on the imovie icon for a few seconds the imovie window opens but if I click anywhere on the window it disappears

    I can't get imovie to open after trying to shift the image from my macbook pro to the tv screen like I have done many times before.  If I double click on the imovie icon, imovie doesn't open, but the strip across the top shows iMovie, file, edit , clip, view, text share window help tabs across the top.  The iMovie window will appear if I click on the iMovie icon on the dock for a few seconds, or if I do control F3 at the same time, but when I click on the window it disappears.  When I hover the mouse over the iMovie window that appears the window has a blue border around it.  when I move the mouse outside the iMovie window the blue border goes away.  If I sweep 4 fingers from the top of the screen down, the screen dims a little but the iMovie window doesn't appear. If I click play under the view tab I can hear audio, but still no iMovie window.  It's as if the window is being blocked by the desk top somehow.

    Similar issues here.
    I purchased five movies for download and having nothing but problems getting them downloaded. I keep receiving error messages and the download stops and I have to restart it, just to get another minute worth of download with each restart. Now Apple has my money and I have nothing.

Maybe you are looking for

  • Can I make professional sounding recording with Logic in an untreated room?

    I have a small bedroom-recording studio. Since starting with Logic over a year ago I have been amazed at how much you can really do with this program. I would really like to start producing my songs at level that competes with the sound quality of wh

  • About the OMF format

    Hi everyone here! I now want the information of the OMF file,I need only the detail of the very track's split audio object's name, timing and the track's ID . i try to use the event list of the audio track , but it cannot be transfered to TXT file so

  • Outlook contacts synced from Safari?

    I had checked my work email off of Outlooks web browser(I do not have this linked on my phone, I only check this email account via Safari) and it synced all my email contacts to my phone. How do I stop this? I really do not want or need these contact

  • How to insert a movie into a slideshow?

    I'm using iPhoto 6.0.6 on a MacBook Pro running OS X 10.6.8. I'm creating a slide show, and I want to insert a video into the slideshow, so that I manually advance through the slides (I know how to set that up), and then manually start the movie, aft

  • Adding entry to others button list in people screen

    Hi All, In the people screen - Enter and Maintain. There is Others button at bottom right corner. I want to insert an entry into the others tab and invoke my page on clicking that menu. Can anyone please help me how to create an entry in others tab T