Professional, Software

Part 6: 3dStack View in Search Application

Finally I got around to adding 3d stack control to search application. I don’t think it is really useful from real application perspective but I wanted to add something that would be hard to do with just html.

showstack searchview

 I added a button called Show stack to grid view. When you click on this button, same results are shown using 3dstack control. In this view, new button (movenext) is added that can be used to go through pictures in 3D view.

Creating 3D Stack control instance

First part was to create the 3D view control when the search is completed. It stays invisible till user clicks on show stack button.

void SearchCompleted(IAsyncResult asyncResult)
    progressui = null;
    gridview.SetValue(Canvas.TopProperty, 50);
    gridview.SetValue(Canvas.LeftProperty, 0);

    showstack = new Button();
    showstack.Text = "Show Stack";
    showstack.Click += new EventHandler(showstack_Click);
    if (stack != null)
        stack = null;
        movenext = null;
    stack = new StackThreeD();
    stack.NumberOfFrames = 5;
    stack.Frames = frames;
    stack.Height = 600;
    stack.Width = 600;

    movenext = new Button();
    movenext.Text = "Move Next";
    movenext.Click += new EventHandler(movenext_Click);
    movenext.SetValue(Canvas.LeftProperty, 150);

    stack.Visibility = Visibility.Hidden;
    movenext.Visibility = Visibility.Hidden;



ShowStack Button Behavior

When user clicks on showstack button, that is when move next becomes visible.

void showstack_Click(object sender, EventArgs e)
    if (stackstate == false)
        movenext.Visibility = Visibility.Visible;
        gridview.Visibility = Visibility.Hidden;
        stack.Visibility = Visibility.Visible;
        showstack.Text = "Hide Stack";
        stackstate = true;
        stackstate = false;
        showstack.Text = "Show Stack";
        gridview.Visibility = Visibility.Visible;
        stack.Visibility = Visibility.Hidden;
        movenext.Visibility = Visibility.Hidden;


MoveNext Behavior

void movenext_Click(object sender, EventArgs e)


Source code for updated application is here.


2 thoughts on “Part 6: 3dStack View in Search Application

  1. Pingback: Recursive Reflection : 3dStack View in Search Application

  2. Pingback: Part6: 3dStack View in Search Application - Noticias externas

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s