Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8127761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:38:44+00:00 2026-06-06T07:38:44+00:00

The application is a desktop document management system. Image files (of scanned docs) are

  • 0

The application is a desktop document management system. Image files (of scanned docs) are stored within a shared network folder and its indices within a database. Now, when the image of a selected document page is displayed the user has the option to delete it (via a contextual menu). The problem is, if I try to do this then it throws an exception (the resource is locked) which has all the sense given that it’s being shown on screen. So, currently I maintain a persistent delete queue. Once the app starts I go to the queue and delete the pages of the documents whose indices were deleted from DB and given that they aren’t being displayed the deletion succeed but this seems to be pretty bad code (I mean it works, but not as clean as it should, I guess).

How bad my quick solution is. Given that the app is single-user then the user needs to star the app to use it. Is this a very bad idea or can I implemented using another path.

The images are shown (within the document viewer) by binding it to the current file:

View:

<Image Name="PageViewedPath" Margin="20" Grid.Column="0" />

ViewModel:

public string PageViewedPath { get; set; }

And once the user clicks next or previous I change (within the ViewModel the PageViewedPath). Maybe the problem is this binding which I can’t control in detail, I’m using Caliburn Micro so that’s why just by setting the image name the binding is done.

I think maybe overriding this binding and creating a hardcopy of the image before is being shown must work but I’m not sure if it will and worse, how to do it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:38:45+00:00Added an answer on June 6, 2026 at 7:38 am

    I’ve had a similar problem in an application I developed that was using an image pool. Although the image was not displayed anymore, the file was locked and could not be deleted.

    I solved my problem by loading images with BitmapCacheOption.OnLoad, something like this:

    Image myImage = new Image();
    BitmapImage bi = new BitmapImage();
    bi.BeginInit();
    
    bi.CacheOption = BitmapCacheOption.OnLoad;
    bi.UriSource = imageUri;
    
    // End initialization.
    bi.EndInit();
    myImage.Source = bi;
    

    Here’s a link to an msdn post that shows how to use BitmapCacheOption from xaml:

    http://social.msdn.microsoft.com/forums/en-US/wpf/thread/3cb97997-941f-42a8-a03b-f84b152c1139/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

String DocLocation = System.AppDomain.CurrentDomain.BaseDirectory + Files/test.pdf; // or String DocLocation = Url.Content(~/Files/test.pdf); var document
I'm building a desktop application right now that presents its human-readable output as XHTML
This question concerns XML schemas and files. Suppose I am developing a desktop application
Case : I'm creating an application (desktop application) with VB.NET (actually windows form), and
My desktop application serializes objects using XmlSerializer . I was suggested to leverage DataContractSerializer
In a desktop application with an embedded Derby database, what should I keep alive
Window c# Desktop Application I want to initialize a DataRow object with the selected
In my Desktop application, I want to read the Wall posts,Messages, Like counts etc
In a desktop application created using java and spring, the GUI forms are created
I have a DESKTOP application which interacts with a web service through their RESTful

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.