Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am facing a problem.

i writing a xaml code

XML
<Grid>
    <TabControl>
      <TabItem  Header="Details" Height="26" VerticalAlignment="Bottom">
        <Grid>
         <TextBox x:name = "txtname" text = {Binding name}/>
         <TextBox x:name = "txtage" text = {Binding age}/>
        </Grid>
      </TabItem>
      < <TabItem  Header="Summary" Height="26" VerticalAlignment="Bottom">
          <Grid>
           <label x:name = "lblname" content= {Binding Text, ElementName = txtname} />
           <label x:name = "lblage" Content = {Binding age, ElementName = txtage}/>
          </Grid>
      </TabItem>
    </TabControl>
</Grid>



Hi i wrote this code i have an 2 text boxes in 1st panel and label in 2nd panel.

whatever i am writing into text box it should display in label of another tab. but it is writing parallel i want to write only when i will write in both text box and click on tab2 on the click of tab i want to display label content.

please help me its urgent.
Posted

You can set updatesourcetrigger for your Label as explisit and manually decide when to Show changes on the second tab. By default it is set to OnPropertyChange, that's why it is changing after your property was changed.
 
Share this answer
 
v2
<label x:name = "lblname" content= {Binding Text, ElementName = txtname, UpdateSourceTrigger=PropertyChanged} />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900