Click here to Skip to main content
13,801,840 members
Click here to Skip to main content

Tagged as

Stats

154.2K views
8.2K downloads
134 bookmarked
Posted 10 Aug 2011
Licenced CPOL

AvalonDock and MVVM

, 9 Oct 2011
Demonstrates a technique for integrating AvalonDock with an MVVM application.
using System;

namespace SampleApp.ViewModels
{
    /// <summary>
    /// An interface for file dialog services.
    /// Allows the 'Main Window' to handle the file dialogs for the view-model.
    /// </summary>
    public interface IDialogProvider
    {
        /// <summary>
        /// This method allows the user to select a file to open (so the view-model can implement 'Open File' functionality).
        /// </summary>
        bool UserSelectsFileToOpen(out string filePath);

        /// <summary>
        /// This method allows the user to select a new filename for an existing file (so the view-model can implement 'Save As' functionality).
        /// </summary>
        bool UserSelectsNewFilePath(string oldFilePath, out string newFilePath);

        /// <summary>
        /// Display an error message dialog box.
        /// </summary>
        void ErrorMessage(string msg);

        /// <summary>
        /// Allow the user to confirm whether they want to close a modified document.
        /// </summary>
        bool QueryCloseModifiedDocument(TextFileDocumentViewModel document);

        /// <summary>
        /// Allow the user to confirm whether they want to close the application when 1 or more documents are modified.
        /// </summary>
        bool QueryCloseApplicationWhenDocumentsModified();
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ashley Davis
Chief Technology Officer OldView
Australia Australia
My book Data Wrangling with JavaScript is printed, it is a comprehensive overview of working with data in JavaScript:
https://www.manning.com/books/data-wrangling-with-javascript

Also please check out Data-Forge Notebook, my notebook-style app for data transformation, analysis and visualizatiion in JavaScript:
http://www.data-forge-notebook.com/

I have a long history in software development with many years in apps, web apps, serious games, sims and VR. Making technology work for business is what I do: building bespoke software solutions that span multiple platforms.

I have years of experience managing teams, preparing technical strategies and creation of software products. I can explain complicated technology to senior management. I have delivered cutting-edge products in fast-paced and high-pressure environments. I know how to focus and prioritize to get the important things done.

I am a passionate technologist and agile practitioner. I have had great success with TDD and am convinced of its ability to produce better code that stabilizes more quickly while being evolved rapidly. I'm a fan of functional programming and its potential for safety, predictability & concurrency.

I contribute to open source and have founded multiple industry groups.

I'm also a keen systems trader, currently trading stocks on the ASX.

Creator of Market Wizard:

https://www.market-wizard.com.au/

Creator of Data-Forge and Data-Forge Notebook:

http://www.data-forge-js.com/
http://www.data-forge-notebook.com/

Web

www.codecapers.com.au

Open source

https://github.com/ashleydavis
https://github.com/data-forge
https://github.com/Real-Serious-Games

Blogs

www.the-data-wrangler.com
www.what-could-possibly-go-wrong.com

Skills

Management of teams & projects
Making sense of technology for senior management
Developing technical strategies
Data wrangling & visualization
Desktop, web & mobile apps
Game dev, serious games, sim

You may also be interested in...

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.181215.1 | Last Updated 10 Oct 2011
Article Copyright 2011 by Ashley Davis
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid