예제 #1
0
        private void AudioCallBlockLoaded(object sender, RoutedEventArgs e)
        {
            _audioCallViewModel = ((CallViewModel) DataContext).Audio;
            _audioCallViewModel.MicrophoneIsNotAvailable += MicrophoneIsNotAvailableHandler;
            _audioCallViewModel.StartRinging += StartRingingHandler;
            _audioCallViewModel.StopRinging += StopRingingHandler;
            _audioCallViewModel.PropertyChanged += PropertyChangedHandler;

            var state =
                (string)
                    new CallStateToStringConverter().Convert(_audioCallViewModel.State, typeof (string), null, null);
            VisualStateManager.GoToState(this, state, false);
        }
예제 #2
0
 public void DeregisterEventHandlers(AudioCallViewModel audioCallViewModel)
 {
     audioCallViewModel.StartRinging -= StartRingingHandler;
     audioCallViewModel.StopRinging -= StopRingingHandler;
 }