Example #1
0
        private void AttachToVisualTree()
        {
            _webBrowser = GetTemplateChild(AuthBrowserName) as WebControl;
            if (_webBrowser == null)
            {
                throw new InvalidOperationException("WebControl not found!");
            }

            _webBrowser.BeginNavigation += WebBrowserOnBeginNavigation;

            _authenticationManager = new AuthenticationManager(Properties.Resources.EngageHtml);
            _authenticationManager.TokenReceived    += AuthenticationManagerOnTokenReceived;
            _authenticationManager.BusyStateChanged += AuthenticationManagerOnBusyStateChanged;
            _authenticationManager.Initialize(this);

            SwitchAccounts = new SwitchAccountsCommand(_authenticationManager);
        }
		private void AttachToVisualTree()
		{
			_webBrowser = GetTemplateChild(AuthBrowserName) as WebControl;
			if (_webBrowser == null)
				throw new InvalidOperationException("WebControl not found!");

			_webBrowser.BeginNavigation += WebBrowserOnBeginNavigation;

			_authenticationManager = new AuthenticationManager(Properties.Resources.EngageHtml);
			_authenticationManager.TokenReceived += AuthenticationManagerOnTokenReceived;
			_authenticationManager.BusyStateChanged += AuthenticationManagerOnBusyStateChanged;
			_authenticationManager.Initialize(this);

			SwitchAccounts = new SwitchAccountsCommand(_authenticationManager);
		}