Git Product home page Git Product logo

wpfdnc's Introduction

This is a small test project to explore an implementation of Drag and Drop in WPF using a TreeView representation of a moderately complex data tree. The sample data comes from a Star Wars fan fiction site.

The data consists of the following:

  • Authors that have the following fields:
    • Name - the name of the author
    • Books - the books they have authored. This is really just the list of series that individual stories are associated with.
  • Books. As the site doesn't really deal with books, but rather stories, a book for our purposes is simply a set of stories published that are associated together as a series: Books have the following fields:
    • Chapters - this is the list of stories published in the series.
    • Title - this is the name of the series. If there is no real series then the title of the 'book' is the title of the one story the book contains.
  • Chapters. As implied above, all chapters must be associated with a book. If a story (chapter) is really a standalone story then it is part of a book with the same name as the story itself. Chapters have the following fields:
    • ChapterName - the title of the story as it was published on the site.
    • Date - the date a story was published on the site

Inside the WpfBooks project the code is organized as follows:

  • Author.cs/Book.cs/Chapter.cs - the basic data elements that get moved about.
  • Utils.cs - contains the code to generate the sample data.
  • MainWindow.xaml.cs - creates the overall UI and has a function to move the observable data from one place to another (moving chapters from one book to another or reorder chapters in a book).
  • MainWindowDnd.cs - contains the code for handling all of the Drag and Drop functionality.

wpfdnc's People

Contributors

melston avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.