I have a code in WindowAfterLogin.xaml:
<TextBlock x:Name="In_Time" Foreground="#FF55534F" FontSize="71.312" FontFamily="HelveticaNeueCyr" Height="79.45" LineStackingStrategy="BlockLineHeight" Canvas.Left="2.724" LineHeight="71.312" TextAlignment="Center" TextWrapping="Wrap" Canvas.Top="69.985" Width="231.581" Text="09:00" /> And then I want to change the value of that TextBlock in WindowAfterLogin.xaml.cs, so I've done this :
MainWindow objMainWindow = new MainWindow(); WindowAfterLogin objAfterLogin = new WindowAfterLogin(); objMainWindow.Show(); objAfterLogin.In_Time.Text = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString(); this.Close(); But, when I press F5 button (Compile), it didn't change. Where is the problem here?
this.In_time.Textinstead