MVVM learning essay notes three

1. Page code: <TextBox Text="{Binding SelectVIPVoEntity.txtMoney, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></ TextBox>

UpdateSourceTrigger property: Get or set a value that determines the execution time of the binding source update.

(1) When using Explicit, the source will not be updated unless you manually operate it;

(2) When LostFocus is used, it is actually a default value for Text binding;

(3) When using PropertyChanged, once the bound property value changes, the source will be updated immediately.

2. The phenomenon of repeated addition of data encountered by the teacher when talking about the project . Solution: Declare a bool value, and prevent the addition of database data by judging it as false. private bool blOne = true; // Declare attributes: add no for the first time

(1) The figure below is the method of querying database data (after modification)

Because the structure of the query data judgment method of the above figure (not blOne time ), when we will again call this method duplication additional phenomena, such as the following additional renderings shown.

(2) The following figure is the code diagram of the execution function added by clicking the button (when blOne in the figure is set to false, the data will not be added repeatedly):

(3) Additional renderings: the performance is repeated overlay of database data. (Sequence numbers 1 and 2 are the query effect, sequence numbers 3 and 4 are the effect of clicking the "cold dish" button, and numbers 5 and 6 are the effect of clicking the "all" button)

3. About the setting path of database table "Edit all rows": Tools->Options->SQL server Object Explorer->Commands->Table and view options, and finally set the value of the "<n> rows before editing" command Modify the corresponding value to the value you want, and then click the "OK" button.

4. About the steps of making a circled character "√" in a Word document: first click "Insert" in the navigation bar, then select the "√" symbol we need in the "Ω symbol", and then click "Start" in the navigation bar Then select the effect we need in the "word", as shown in the figure below:

In this way, our circled character "√" is finished.