Last active
January 21, 2019 06:52
-
-
Save runceel/a91e5324f06fbddd0d53caf41f063756 to your computer and use it in GitHub Desktop.
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
// 定義 | |
class Poco | |
{ | |
public string Name { get; set; } | |
} | |
// ViewModel | |
class MyVM | |
{ | |
private Poco Poco { get; } | |
public ReadOnlyReactiveProperty<string> Name { get; } | |
public MyVM() | |
{ | |
Poco = new Poco(); | |
// 内部では https://docs.microsoft.com/ja-jp/dotnet/api/system.windows.media.compositiontarget.rendering?view=netframework-4.7.2 のイベントで監視してる | |
Name = Poco.ObserveEveryValueChanged(x => x.Name).ToReadOnlyReactiveProperty(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment