protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (e.NavigationMode != System.Windows.Navigation.NavigationMode.Back)
            {
                Current = bitmapGetter == null ? new PictureInfo() : bitmapGetter();
                ImageViewModel.SelectedPicture = Current.Content;
               
                //HeightTextbox.Text = bitMap.PixelHeight.ToString();
                //WidthTextbox.Text = bitMap.PixelWidth.ToString();
                PageTitle.Text = Current.Comments;
            }
        }
 private void AddPictureInPhone(System.IO.Stream stream)
 {
     PictureInfo info2 = new PictureInfo {
         AttachedId = this.CurrentAttachedObjectId
     };
     PictureInfo item = info2;
     BitmapImage image = new BitmapImage();
     item.Tag = this.TagName;
     image.SetSource(stream);
     item.PictureId = System.Guid.NewGuid();
     item.Content = image;
     item.SetFileName();
     item.ContentSource = stream;
     this.Pictures.Add(item);
     PictureHandler.OnAfterAdd(item);
 }
        /// <summary>
        /// Adds the picture in phone.
        /// </summary>
        /// <param name="stream">The stream.</param>
        private void AddPictureInPhone(System.IO.Stream stream)
        {
            if (stream == null)
            {
            }
            else
            {
                var picInfo = new PictureInfo()
                {
                    AttachedId = CurrentAttachedObjectId,
                };

                BitmapImage bi = new BitmapImage();
                picInfo.Tag = TagName;
                bi.SetSource(stream);
                picInfo.PictureId = Guid.NewGuid();
                picInfo.Content = bi;
                picInfo.SetFileName();
                //picInfo.FullPath = pictureViewModel.GetFullPath(picInfo);
                picInfo.ContentSource = stream;
                Pictures.Add(picInfo);
                PictureHandler.OnAfterAdd(picInfo);
            }
        }
        /// <summary>
        /// Adds the picture.
        /// </summary>
        /// <param name="pic">The pic.</param>
        public void AddPicture(PictureInfo pic)
        {
            if (this.PicturesOutOfDatabase == null)
            {
                this.PicturesOutOfDatabase = new List<PictureInfo>();
            }

            if (this.PicturesOutOfDatabase != null)
            {
                this.PicturesOutOfDatabase.Add(pic);
                OnNotifyPropertyChanged(PictureTotalInfoForEditProperty);
            }
        }
 public void RemovePicture(PictureInfo pic)
 {
     if (this.PicturesOutOfDatabase != null)
     {
         this.PicturesOutOfDatabase.Remove(pic);
         OnNotifyPropertyChanged(PictureTotalInfoForEditProperty);
     }
 }
 private void attach_ToDo(PictureInfo toDo)
 {
     this.OnNotifyPropertyChanging("AccountItem");
     toDo.AccountItem = this;
 }