-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve data bindings and view model composition
- Loading branch information
1 parent
7300f94
commit be6d689
Showing
4 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using ReactiveUI; | ||
using Vocup.IO; | ||
using Vocup.Models; | ||
using Vocup.Settings; | ||
|
||
namespace Vocup.ViewModels; | ||
|
||
/// <summary> | ||
/// Represents an opened vocabulary book. Multiple instances can be used simultaneously to implement tabs for books. | ||
/// </summary> | ||
public class BookViewModel : ReactiveObject | ||
{ | ||
public BookViewModel(BookContext bookContext, IVocupSettings settings) | ||
{ | ||
Book = bookContext.Book; | ||
BookContext = bookContext; | ||
} | ||
|
||
public Book Book { get; } | ||
public BookContext BookContext { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters