/// <summary> /// Raised when the user open the Share UI from the Charms bar /// </summary> /// <param name="sender">Programmatically initiates an exchange of content with other apps.</param> /// <param name="args">Share event arguments</param> private void ConferencesDetailsPage_DataRequested(DataTransferManager sender, DataRequestedEventArgs args) { if (_shareContractFactory == null) { IDetailsViewModel <Conference> viewModel = (IDetailsViewModel <Conference>)DataContext; if (viewModel.Element != null) { IValueConverter converter = new ToShareableConverter(); ShareableWin8Object conference = (ShareableWin8Object)converter.Convert(viewModel.Element, null, null, string.Empty); _shareContractFactory = new ShareContractFactory(conference); } } if (_shareContractFactory != null) { _shareContractFactory.DisplayShareUI(args); } }
/// <summary> /// Raised when the user wants to share the conference /// </summary> /// <param name="sender">Programmatically initiates an exchange of content with other apps.</param> /// <param name="args">Share event arguments</param> private void ConferencesPage_DataRequested(DataTransferManager sender, DataRequestedEventArgs args) { _shareContractFactory.DisplayShareUI(args); }