Search Results

Search found 2 results on 1 pages for 'user562405'.

Page 1/1 | 1 

  • PhotoChooserTask + Navigation.

    - by user562405
    I taken two Images & added event (MouseButtonDown) for them. When first image handles event to open Gallery. Second image handles events for open camera. When user has choosed his image from the gallery, I want to navigate to next page. Its navigates. But before completing navigation process, it displays MainPage & then moves toward next page. I didnt want to display the MainPage once user chooses the image from the gallery. Plz help. Thanks in advance. public partial class MainPage : PhoneApplicationPage { PhotoChooserTask objPhotoChooser; CameraCaptureTask cameraCaptureTask; // Constructor public MainPage() { InitializeComponent(); objPhotoChooser = new PhotoChooserTask(); objPhotoChooser.Completed += new EventHandler<PhotoResult>(objPhotoChooser_Completed); cameraCaptureTask = new CameraCaptureTask(); cameraCaptureTask.Completed += new EventHandler<PhotoResult>(objCameraCapture_Completed); } void objPhotoChooser_Completed(object sender, PhotoResult e) { if (e != null && e.TaskResult == TaskResult.OK) { //Take JPEG stream and decode into a WriteableBitmap object App.CapturedImage = PictureDecoder.DecodeJpeg(e.ChosenPhoto); //Delay navigation until the first navigated event NavigationService.Navigated += new NavigatedEventHandler(navigateCompleted); } } void navigateCompleted(object sender, EventArgs e) { //Do the delayed navigation from the main page this.NavigationService.Navigate(new Uri("/ImageViewer.xaml", UriKind.RelativeOrAbsolute)); NavigationService.Navigated -= new NavigatedEventHandler(navigateCompleted); } void objCameraCapture_Completed(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { //Take JPEG stream and decode into a WriteableBitmap object App.CapturedImage = PictureDecoder.DecodeJpeg(e.ChosenPhoto); //Delay navigation until the first navigated event NavigationService.Navigated += new NavigatedEventHandler(navigateCompleted); } } protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) { e.Cancel = true; } private void image1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { objPhotoChooser.Show(); } private void image2_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { cameraCaptureTask.Show(); }

    Read the article

  • Changing wp7 webbrowser forecolor.

    - by user562405
    I written code like < phone:WebBrowser x:Name="wbLogin" LoadCompleted="wbLogin_LoadCompleted" IsScriptEnabled="True" Margin="0,0,0,34"/ I want to change this webbrowser forecolor / page color to be displayed in different color (Cyan in case). So I taken code like,< phone:WebBrowser x:Name="wbLogin" LoadCompleted="wbLogin_LoadCompleted" IsScriptEnabled="True" Margin="0,0,0,34" Foreground="Cyan"/. But its not working. Please help. Thanx in advance to all.

    Read the article

1