|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using PitchContour.ViewModels;
namespace PitchContour
{
public partial class MainPage : UserControl
{
#region fields
MainViewModel viewModel;
#endregion
#region ctor
public MainPage()
{
InitializeComponent();
viewModel = (MainViewModel)this.DataContext;
viewModel.SampleVoiceMediaElement = this.sampleVoiceMediaElement;
viewModel.UserVoiceMediaElement = this.userVoiceMediaElement;
}
#endregion ctor
#region events
private void sampleVoiceMediaElement_MediaOpened(object sender, RoutedEventArgs e)
{
viewModel.SampleVoiceDuration = this.sampleVoiceMediaElement.NaturalDuration;
}
private void userVoiceMediaElement_MediaOpened(object sender, RoutedEventArgs e)
{
viewModel.UserVoiceDuration = this.userVoiceMediaElement.NaturalDuration;
}
#endregion events
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.