private void SearchImage()
        {
            PictureSearchPopup pictureSearchPopup = new PictureSearchPopup();

            pictureSearchPopup.PopupAnimation = System.Windows.Controls.Primitives.PopupAnimation.Fade;
            pictureSearchPopup.IsOpen         = true;
            pictureSearchPopup.Placement      = System.Windows.Controls.Primitives.PlacementMode.Bottom;

            Button searchPictureButton = VisualTreeExtensions.FindVisualChildByName <Button>(this, "SearchPictureButton");

            if (searchPictureButton != null)
            {
                pictureSearchPopup.PlacementTarget = searchPictureButton;
            }
            else
            {
                pictureSearchPopup.PlacementTarget = this;
            }
            pictureSearchPopup.Width            = 640;
            pictureSearchPopup.Height           = 200;
            pictureSearchPopup.StaysOpen        = false;
            pictureSearchPopup.PictureSelected += new EventHandler(pictureSearchPopup_PictureSelected);

            string searchText = GetSearchText();

            pictureSearchPopup.Search(searchText);
        }
        private void SearchImage()
        {
            PictureSearchPopup pictureSearchPopup = new PictureSearchPopup();

            pictureSearchPopup.PopupAnimation   = System.Windows.Controls.Primitives.PopupAnimation.Fade;
            pictureSearchPopup.IsOpen           = true;
            pictureSearchPopup.Placement        = System.Windows.Controls.Primitives.PlacementMode.Bottom;
            pictureSearchPopup.PlacementTarget  = this;
            pictureSearchPopup.Width            = 640;
            pictureSearchPopup.Height           = 200;
            pictureSearchPopup.StaysOpen        = false;
            pictureSearchPopup.PictureSelected += new EventHandler(pictureSearchPopup_PictureSelected);

            string searchText = GetSearchText();

            pictureSearchPopup.Search(searchText);
        }