public ApplicationCanvas() { r.Fill = Brushes.Red; r.AttachTo(this); r.MoveTo(8, 8); this.SizeChanged += (s, e) => r.SizeTo(this.Width - 16.0, this.Height - 16.0); var t = new TextBox { AcceptsReturn = true, IsReadOnly = true, }.AttachTo(this); t.AppendTextLine("hello world"); var foo = new MyDynamic { WriteLine = t.AppendTextLine }; dynamic bar = foo; bar.foo = "foo"; var goo = bar.goo; t.AppendTextLine(new { goo }.ToString()); }
/// <summary> /// This is a javascript application. /// </summary> /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param> public Application(IApp page) { var foo = new MyDynamic(); dynamic bar = foo; bar.foo = "foo"; var goo = bar.goo; Console.WriteLine("after foo: " + new { goo }); @"Hello world".ToDocumentTitle(); // Send data from JavaScript to the server tier service.WebMethod2( @"A string from JavaScript.", value => value.ToDocumentTitle() ); }
/// <summary> /// This is a javascript application. /// </summary> /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param> public Application(IApp page) { var foo = new MyDynamic(); dynamic bar = foo; bar.foo = "foo"; var goo = bar.goo; Console.WriteLine("after foo: " + new { goo }); @"Hello world".ToDocumentTitle(); // Send data from JavaScript to the server tier service.WebMethod2( @"A string from JavaScript.", value => value.ToDocumentTitle() ); }
public ApplicationCanvas() { r.Fill = Brushes.Red; r.AttachTo(this); r.MoveTo(8, 8); this.SizeChanged += (s, e) => r.SizeTo(this.Width - 16.0, this.Height - 16.0); var t = new TextBox { AcceptsReturn = true, IsReadOnly = true, }.AttachTo(this); t.AppendTextLine("hello world"); var foo = new MyDynamic { WriteLine = t.AppendTextLine }; dynamic bar = foo; bar.foo = "foo"; var goo = bar.goo; t.AppendTextLine(new { goo }.ToString()); }