CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets for: Danijel Stulic
C#
try {
    SaveFileDialog saveDialog = new SaveFileDialog
    {
        Filter = "Xml Files (*.xml)|*.xml",
        DefaultExt = ".xml",
    };
    if ((bool)saveDialog.ShowDialog()) {
        using (Stream fileStream = saveDialog.OpenFile()) {
           ...
        }
by Danijel Stulic   September 14, 2009 @ 4:19am
658 Views
no comments
 
C#
public static void ExportToJpeg() {
    prepare(true);
    SaveFileDialog saveDialog = new SaveFileDialog
    {
        Filter = "JPEG Files (*.jpeg)|*.jpeg",
        DefaultExt = ".jpeg",
    };
    if ((bool)saveDialog.ShowDialog()) {
        using (Stream fileStream = saveDialog.OpenFile()) {
            WriteableBitmap bitmap = new WriteableBitmap(containerPanel, null);
by Danijel Stulic   August 17, 2009 @ 5:18am
823 Views
no comments
 
C#
private const string blankTarget = "_blank";
private const string selfTarget = "_self";
 
/// <summary>
/// Open html page specified by Uri in specified target.
/// </summary>
/// <param name="uri"></param>
/// <param name="target">"_blank", "_self", "_top", "_parent", window or frame name.</param>
private static void openHtmlPage(Uri uri, string target) {
        if (String.Equals(target, selfTarget)) {
2041 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate