├── .gitattributes ├── .gitignore ├── WindowsFormsApplication1.sln └── WindowsFormsApplication1 ├── App.config ├── ChildViewModel.cs ├── CustomControl.Designer.cs ├── CustomControl.cs ├── CustomControl.resx ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── ShellViewModel.cs ├── WindowsFormsApplication1.csproj └── packages.config /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | 49 | 50 | # Visual Studio 51 | ######################## 52 | 53 | ## Ignore Visual Studio temporary files, build results, and 54 | ## files generated by popular Visual Studio add-ons. 55 | 56 | # User-specific files 57 | *.suo 58 | *.user 59 | *.userosscache 60 | *.sln.docstates 61 | 62 | # User-specific files (MonoDevelop/Xamarin Studio) 63 | *.userprefs 64 | 65 | # Build results 66 | [Dd]ebug/ 67 | [Dd]ebugPublic/ 68 | [Rr]elease/ 69 | [Rr]eleases/ 70 | x64/ 71 | x86/ 72 | build/ 73 | bld/ 74 | [Bb]in/ 75 | [Oo]bj/ 76 | 77 | # Visual Studio 2015 cache/options directory 78 | .vs/ 79 | # Uncomment if you have tasks that create the project's static files in wwwroot 80 | #wwwroot/ 81 | 82 | # MSTest test Results 83 | [Tt]est[Rr]esult*/ 84 | [Bb]uild[Ll]og.* 85 | 86 | # NUNIT 87 | *.VisualState.xml 88 | TestResult.xml 89 | 90 | # Build Results of an ATL Project 91 | [Dd]ebugPS/ 92 | [Rr]eleasePS/ 93 | dlldata.c 94 | 95 | # DNX 96 | project.lock.json 97 | artifacts/ 98 | 99 | *_i.c 100 | *_p.c 101 | *_i.h 102 | *.ilk 103 | *.meta 104 | *.obj 105 | *.pch 106 | *.pdb 107 | *.pgc 108 | *.pgd 109 | *.rsp 110 | *.sbr 111 | *.tlb 112 | *.tli 113 | *.tlh 114 | *.tmp 115 | *.tmp_proj 116 | *.log 117 | *.vspscc 118 | *.vssscc 119 | .builds 120 | *.pidb 121 | *.svclog 122 | *.scc 123 | 124 | # Chutzpah Test files 125 | _Chutzpah* 126 | 127 | # Visual C++ cache files 128 | ipch/ 129 | *.aps 130 | *.ncb 131 | *.opendb 132 | *.opensdf 133 | *.sdf 134 | *.cachefile 135 | 136 | # Visual Studio profiler 137 | *.psess 138 | *.vsp 139 | *.vspx 140 | *.sap 141 | 142 | # TFS 2012 Local Workspace 143 | $tf/ 144 | 145 | # Guidance Automation Toolkit 146 | *.gpState 147 | 148 | # ReSharper is a .NET coding add-in 149 | _ReSharper*/ 150 | *.[Rr]e[Ss]harper 151 | *.DotSettings.user 152 | 153 | # JustCode is a .NET coding add-in 154 | .JustCode 155 | 156 | # TeamCity is a build add-in 157 | _TeamCity* 158 | 159 | # DotCover is a Code Coverage Tool 160 | *.dotCover 161 | 162 | # NCrunch 163 | _NCrunch_* 164 | .*crunch*.local.xml 165 | nCrunchTemp_* 166 | 167 | # MightyMoose 168 | *.mm.* 169 | AutoTest.Net/ 170 | 171 | # Web workbench (sass) 172 | .sass-cache/ 173 | 174 | # Installshield output folder 175 | [Ee]xpress/ 176 | 177 | # DocProject is a documentation generator add-in 178 | DocProject/buildhelp/ 179 | DocProject/Help/*.HxT 180 | DocProject/Help/*.HxC 181 | DocProject/Help/*.hhc 182 | DocProject/Help/*.hhk 183 | DocProject/Help/*.hhp 184 | DocProject/Help/Html2 185 | DocProject/Help/html 186 | 187 | # Click-Once directory 188 | publish/ 189 | 190 | # Publish Web Output 191 | *.[Pp]ublish.xml 192 | *.azurePubxml 193 | # TODO: Comment the next line if you want to checkin your web deploy settings 194 | # but database connection strings (with potential passwords) will be unencrypted 195 | *.pubxml 196 | *.publishproj 197 | 198 | # NuGet Packages 199 | *.nupkg 200 | # The packages folder can be ignored because of Package Restore 201 | **/packages/* 202 | # except build/, which is used as an MSBuild target. 203 | !**/packages/build/ 204 | # Uncomment if necessary however generally it will be regenerated when needed 205 | #!**/packages/repositories.config 206 | 207 | # Microsoft Azure Build Output 208 | csx/ 209 | *.build.csdef 210 | 211 | # Microsoft Azure Emulator 212 | ecf/ 213 | rcf/ 214 | 215 | # Microsoft Azure ApplicationInsights config file 216 | ApplicationInsights.config 217 | 218 | # Windows Store app package directory 219 | AppPackages/ 220 | BundleArtifacts/ 221 | 222 | # Visual Studio cache files 223 | # files ending in .cache can be ignored 224 | *.[Cc]ache 225 | # but keep track of directories ending in .cache 226 | !*.[Cc]ache/ 227 | 228 | # Others 229 | ClientBin/ 230 | ~$* 231 | *~ 232 | *.dbmdl 233 | *.dbproj.schemaview 234 | *.pfx 235 | *.publishsettings 236 | node_modules/ 237 | orleans.codegen.cs 238 | 239 | # RIA/Silverlight projects 240 | Generated_Code/ 241 | 242 | # Backup & report files from converting an old project file 243 | # to a newer Visual Studio version. Backup files are not needed, 244 | # because we have git ;-) 245 | _UpgradeReport_Files/ 246 | Backup*/ 247 | UpgradeLog*.XML 248 | UpgradeLog*.htm 249 | 250 | # SQL Server files 251 | *.mdf 252 | *.ldf 253 | 254 | # Business Intelligence projects 255 | *.rdl.data 256 | *.bim.layout 257 | *.bim_*.settings 258 | 259 | # Microsoft Fakes 260 | FakesAssemblies/ 261 | 262 | # GhostDoc plugin setting file 263 | *.GhostDoc.xml 264 | 265 | # Node.js Tools for Visual Studio 266 | .ntvs_analysis.dat 267 | 268 | # Visual Studio 6 build log 269 | *.plg 270 | 271 | # Visual Studio 6 workspace options file 272 | *.opt 273 | 274 | # Visual Studio LightSwitch build output 275 | **/*.HTMLClient/GeneratedArtifacts 276 | **/*.DesktopClient/GeneratedArtifacts 277 | **/*.DesktopClient/ModelManifest.xml 278 | **/*.Server/GeneratedArtifacts 279 | **/*.Server/ModelManifest.xml 280 | _Pvt_Extensions 281 | 282 | # Paket dependency manager 283 | .paket/paket.exe 284 | 285 | # FAKE - F# Make 286 | .fake/ -------------------------------------------------------------------------------- /WindowsFormsApplication1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApplication1", "WindowsFormsApplication1\WindowsFormsApplication1.csproj", "{D1C1DE23-19AE-4021-9F5C-CEB3E2F2427A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D1C1DE23-19AE-4021-9F5C-CEB3E2F2427A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D1C1DE23-19AE-4021-9F5C-CEB3E2F2427A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D1C1DE23-19AE-4021-9F5C-CEB3E2F2427A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D1C1DE23-19AE-4021-9F5C-CEB3E2F2427A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/ChildViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | 3 | namespace WindowsFormsApplication1 4 | { 5 | public class ChildViewModel : ReactiveObject 6 | { 7 | string _name; 8 | public string Name 9 | { 10 | get { return _name; } 11 | set { this.RaiseAndSetIfChanged(ref _name, value); } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /WindowsFormsApplication1/CustomControl.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace WindowsFormsApplication1 2 | { 3 | partial class CustomControl 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Component Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.name = new System.Windows.Forms.Label(); 32 | this.SuspendLayout(); 33 | // 34 | // name 35 | // 36 | this.name.AutoSize = true; 37 | this.name.Location = new System.Drawing.Point(53, 41); 38 | this.name.Name = "name"; 39 | this.name.Size = new System.Drawing.Size(51, 20); 40 | this.name.TabIndex = 0; 41 | this.name.Text = "label1"; 42 | // 43 | // CustomControl 44 | // 45 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 46 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 47 | this.Controls.Add(this.name); 48 | this.Name = "CustomControl"; 49 | this.ResumeLayout(false); 50 | this.PerformLayout(); 51 | 52 | } 53 | 54 | #endregion 55 | 56 | private System.Windows.Forms.Label name; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/CustomControl.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | using ReactiveUI; 3 | 4 | namespace WindowsFormsApplication1 5 | { 6 | public partial class CustomControl : UserControl, IViewFor 7 | { 8 | public CustomControl() 9 | { 10 | InitializeComponent(); 11 | 12 | // WhenActivated inside a control is currently breaking 13 | // the designer. crying forever, but until i investigate 14 | // further this needs to be removed 15 | this.OneWayBind(ViewModel, vm => vm.Name, v => v.name.Text); 16 | } 17 | 18 | object IViewFor.ViewModel 19 | { 20 | get { return ViewModel; } 21 | set { ViewModel = (ChildViewModel)value; } 22 | } 23 | 24 | public ChildViewModel ViewModel { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/CustomControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace WindowsFormsApplication1 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.textBoxMyInput = new System.Windows.Forms.TextBox(); 32 | this.btnOK = new System.Windows.Forms.Button(); 33 | this.statusTray = new System.Windows.Forms.StatusStrip(); 34 | this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); 35 | this.child = new WindowsFormsApplication1.CustomControl(); 36 | this.flowLayoutPanel1.SuspendLayout(); 37 | this.SuspendLayout(); 38 | // 39 | // textBoxMyInput 40 | // 41 | this.textBoxMyInput.Location = new System.Drawing.Point(3, 3); 42 | this.textBoxMyInput.Name = "textBoxMyInput"; 43 | this.textBoxMyInput.Size = new System.Drawing.Size(100, 26); 44 | this.textBoxMyInput.TabIndex = 0; 45 | // 46 | // btnOK 47 | // 48 | this.btnOK.Location = new System.Drawing.Point(3, 35); 49 | this.btnOK.Name = "btnOK"; 50 | this.btnOK.Size = new System.Drawing.Size(75, 29); 51 | this.btnOK.TabIndex = 1; 52 | this.btnOK.Text = "OK"; 53 | this.btnOK.UseVisualStyleBackColor = true; 54 | // 55 | // statusTray 56 | // 57 | this.statusTray.ImageScalingSize = new System.Drawing.Size(24, 24); 58 | this.statusTray.Location = new System.Drawing.Point(0, 908); 59 | this.statusTray.Name = "statusTray"; 60 | this.statusTray.Size = new System.Drawing.Size(1507, 22); 61 | this.statusTray.TabIndex = 2; 62 | this.statusTray.Text = "statusStrip1"; 63 | // 64 | // flowLayoutPanel1 65 | // 66 | this.flowLayoutPanel1.Controls.Add(this.textBoxMyInput); 67 | this.flowLayoutPanel1.Controls.Add(this.btnOK); 68 | this.flowLayoutPanel1.Controls.Add(this.child); 69 | this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; 70 | this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 12); 71 | this.flowLayoutPanel1.Name = "flowLayoutPanel1"; 72 | this.flowLayoutPanel1.Size = new System.Drawing.Size(1483, 885); 73 | this.flowLayoutPanel1.TabIndex = 3; 74 | // 75 | // child 76 | // 77 | this.child.Location = new System.Drawing.Point(3, 70); 78 | this.child.Name = "child"; 79 | this.child.Size = new System.Drawing.Size(784, 502); 80 | this.child.TabIndex = 2; 81 | this.child.ViewModel = null; 82 | // 83 | // Form1 84 | // 85 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 86 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 87 | this.ClientSize = new System.Drawing.Size(1507, 930); 88 | this.Controls.Add(this.flowLayoutPanel1); 89 | this.Controls.Add(this.statusTray); 90 | this.Name = "Form1"; 91 | this.Text = "Form1"; 92 | this.flowLayoutPanel1.ResumeLayout(false); 93 | this.flowLayoutPanel1.PerformLayout(); 94 | this.ResumeLayout(false); 95 | this.PerformLayout(); 96 | 97 | } 98 | 99 | #endregion 100 | 101 | private System.Windows.Forms.TextBox textBoxMyInput; 102 | private System.Windows.Forms.Button btnOK; 103 | private System.Windows.Forms.StatusStrip statusTray; 104 | private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; 105 | private CustomControl child; 106 | } 107 | } 108 | 109 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Form1.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Windows.Forms; 3 | 4 | namespace WindowsFormsApplication1 5 | { 6 | public partial class Form1 : Form, IViewFor 7 | { 8 | public Form1() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(d => 13 | { 14 | // at the root, let's do something 15 | d(this.Bind(ViewModel, x => x.EnteredText, x => x.textBoxMyInput.Text)); 16 | d(this.BindCommand(ViewModel, x => x.OKCmd, x => x.btnOK)); 17 | 18 | // we'll propagate the result to the child control 19 | d(this.OneWayBind(ViewModel, vm => vm.Child, v => v.child.ViewModel)); 20 | }); 21 | 22 | ViewModel = new ShellViewModel(); 23 | } 24 | 25 | public ShellViewModel ViewModel { get; set; } 26 | 27 | object IViewFor.ViewModel 28 | { 29 | get { return ViewModel; } 30 | set { ViewModel = (ShellViewModel)value; } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace WindowsFormsApplication1 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WindowsFormsApplication1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WindowsFormsApplication1")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d1c1de23-19ae-4021-9f5c-ceb3e2f2427a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WindowsFormsApplication1.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApplication1.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WindowsFormsApplication1.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/ShellViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Linq; 3 | using ReactiveUI; 4 | 5 | namespace WindowsFormsApplication1 6 | { 7 | public class ShellViewModel : ReactiveObject 8 | { 9 | public ShellViewModel() 10 | { 11 | var canExecute = this.WhenAnyValue(vm => vm.EnteredText) 12 | .Select(s => !string.IsNullOrWhiteSpace(s)); 13 | 14 | Child = new ChildViewModel(); 15 | 16 | OKCmd = ReactiveCommand.Create(canExecute); 17 | OKCmd.Subscribe(_ => Child.Name = "You entered " + EnteredText); 18 | } 19 | 20 | string _enteredText; 21 | public string EnteredText 22 | { 23 | get { return _enteredText; } 24 | set { this.RaiseAndSetIfChanged(ref _enteredText, value); } 25 | } 26 | 27 | string _statusString = ""; 28 | public string Status 29 | { 30 | get { return _statusString; } 31 | set { this.RaiseAndSetIfChanged(ref _statusString, value); } 32 | } 33 | 34 | public ReactiveCommand OKCmd { get; private set; } 35 | 36 | public ChildViewModel Child { get; private set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/WindowsFormsApplication1.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {D1C1DE23-19AE-4021-9F5C-CEB3E2F2427A} 8 | WinExe 9 | Properties 10 | WindowsFormsApplication1 11 | WindowsFormsApplication1 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | ..\packages\reactiveui-core.6.5.0\lib\Net45\ReactiveUI.dll 38 | True 39 | 40 | 41 | ..\packages\reactiveui-winforms.6.5.0\lib\net45\ReactiveUI.Winforms.dll 42 | True 43 | 44 | 45 | ..\packages\Splat.1.6.2\lib\Net45\Splat.dll 46 | True 47 | 48 | 49 | 50 | 51 | ..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll 52 | True 53 | 54 | 55 | ..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll 56 | True 57 | 58 | 59 | ..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll 60 | True 61 | 62 | 63 | ..\packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll 64 | True 65 | 66 | 67 | ..\packages\Rx-XAML.2.2.5\lib\net45\System.Reactive.Windows.Threading.dll 68 | True 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | UserControl 85 | 86 | 87 | CustomControl.cs 88 | 89 | 90 | Form 91 | 92 | 93 | Form1.cs 94 | 95 | 96 | 97 | 98 | 99 | CustomControl.cs 100 | 101 | 102 | Form1.cs 103 | 104 | 105 | ResXFileCodeGenerator 106 | Resources.Designer.cs 107 | Designer 108 | 109 | 110 | True 111 | Resources.resx 112 | 113 | 114 | 115 | SettingsSingleFileGenerator 116 | Settings.Designer.cs 117 | 118 | 119 | True 120 | Settings.settings 121 | True 122 | 123 | 124 | 125 | 126 | 127 | 128 | 135 | -------------------------------------------------------------------------------- /WindowsFormsApplication1/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | --------------------------------------------------------------------------------