我尝试编写这段代码:
public MainPage()
{
InitializeComponent();
PlaySw1Element.LoadedBehavior = MediaState.Manual;
PlaySw1Element.Source = new Uri("/Media/Film/starwars1.wma", UriKind.Relative);
DataContext = App.ViewModel;
this.Loaded += new RoutedEventHandler(MainPage_Loaded);
}
和 visualstudio 2012 用红色的 LoadedBehavior 和 MediaState 下划线。有人可以帮助我吗?