ESRI.ArcGIS.Client.Toolkit.SignInDialog.OnApplyTemplate C# (CSharp) Method

OnApplyTemplate() public method

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call M:System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application.
public OnApplyTemplate ( ) : void
return void
		public override void OnApplyTemplate()
		{
			base.OnApplyTemplate();
			_rtbMessage = GetTemplateChild("RichTextBoxMessage") as RichTextBox;
			_rtbErrorMessage = GetTemplateChild("RichTextBoxErrorMessage") as RichTextBox;
#if SILVERLIGHT
			if (_rtbMessage != null)
				_rtbMessageInitialXaml = _rtbMessage.Xaml;
			if (_rtbErrorMessage != null)
				_rtbErrorMessageInitialXaml = _rtbErrorMessage.Xaml;
#else
			if (_rtbMessage != null)
				_rtbMessageInitialXaml = XamlWriter.Save(_rtbMessage.Document);
			if (_rtbErrorMessage != null)
				_rtbErrorMessageInitialXaml = XamlWriter.Save(_rtbErrorMessage.Document);
#endif
			SetRichTextBoxMessage();
			SetRichTextBoxErrorMessage();
		}