Revision history [back]

click to hide/show revision 1
initial version

answered 2016-02-19 10:50:52 +0800

chillworld gravatar image chillworld flag of Belgium

https://github.com/chillw...

William,

A MVVM solution could be :

<window>
    <textbox id="myTextBox" value="@bind(vm.xxx)/>
</window>

As long your viewmodel have that getter/setter there is no problem.

I'll see for a solution with the id's but for MVVM I do think you need to avoid having id's.

William,

A MVVM solution could be :

<window>
    <textbox id="myTextBox" value="@bind(vm.xxx)/>
</window>

As long your viewmodel have that getter/setter there is no problem.

I'll see for a solution with the id's but for MVVM I do think you need to avoid having id's.

Edit:

In addition of the other answer :

Returns the first textbox under window (no id needed):

myInclude.query("window > textbox").value

Same but on id's : (is faster then previous)

myInclude.query("#win > #myTextBox").value
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More