Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>No Control</strong></p> <p>You won't have that kind of control over the app that opens unless the app allows for that kind of control through environment variables or command arguments or some other way of setting options. When you launch another app, you are at it's mercy for how it handles files. If you want more control, then you'll have to use an image editor control that can fit inside your app.</p> <p><strong>Embedded Image Editor</strong></p> <p>Image editing is a complex task. Filters that alter the image geometrically or by using shaders is available in <a href="https://stackoverflow.com/questions/8892568/need-recommendations-for-image-editing-library">existing libraries</a>. But if you want more complex effects like framing, adding text, etc., you'll need a professional image editing library. The big-name image editors don't offer their product as a library, but you can find <a href="https://www.google.com/search?btnG=1&amp;pws=0&amp;q=wpf+image+editor&amp;safe=active" rel="nofollow noreferrer">for-sale solutions on the market</a>. If you want something that allows for more composite effects, you may want to <a href="http://blogs.msdn.com/b/swick/archive/2007/12/02/rendering-ink-and-image-to-a-bitmap-using-wpf.aspx" rel="nofollow noreferrer">image-scrape the results of overlaying WPF elements on an existing image</a>.</p> <p><strong>Template Image as Resource</strong></p> <p>An alternative would be to have the template be a resource in your application or dlls that you deliver, that they can't save over. You'd pull the resource out, write it out as a file, then open that file in the default editor. Then they could save, save as, etc, without the risk of overwriting your original template. But you'll still not have control over where they save. You also won't know what they even did. Whether they closed without saving, saved to a certain location, saved over the file, will all be unknown to you. You could monitor folder locations, but you won't get data back unless the app offers that information.</p> <p><strong>Restricting Save Location</strong></p> <p>Now, once you have that settled, target folder is a big issue. The file dialog doesn't have a direct way to limit to a file location. So you'll need to either not use the file dialog or hook into it's <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.filedialog.fileok.aspx" rel="nofollow noreferrer">file-ok event</a>.</p> <p>file-ok event gives you the opportunity to cancel the save/load and leave the dialog open, but I think you're better off creating your own dialog if you intend to keep the file restricted to a single folder.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload