Complex examples (or lack thereof)

May 24, 2009 at 8:04 AM

Hello everyone,

I really need some examples to work with, that are more comples than the simple hello world.

I'm trying to build a complex application and I keep getting stuck without any documentation.

Can someone upload or send a link to a multitouch application ?

Thanks !

Shachar Weis.

 

 

May 24, 2009 at 8:41 AM

To be more precise, I need a TouchablePanel that has buttons on it.

Can someone post an example ?

Thanks.

 

 

May 24, 2009 at 12:00 PM

did you try the app at \Main Source\Framework\TestApplication\ ? i think that's what you are looking for.

May 24, 2009 at 12:43 PM

Thanks, I will take a look.

What I have been trying to do is create a TouchablePanel that has buttons on it (which move with it, of course)

Any ideas how to do that ?

Thansk !

 

May 24, 2009 at 12:47 PM

that TestApplication has buttons on it, that's why i suggested you to look at it.

May 24, 2009 at 1:02 PM

It does, but I'm trying to connect buttons to a moving panel, and that doesnt work.

If I put them in a grid inside a TouchablePanel, they will not move at all.

If I put buttons inside a TouchablePanel without a grid, they move, but each one moves independently.

I want one panel with 3 buttons glued to it.

 

 

Coordinator
May 24, 2009 at 1:16 PM

 <mt:TouchablePanel>
  <UniformGrid Rows="2" Columns="2" Background="Yellow">
   <mt:Button Margin="10">hello</mt:Button>
   <mt:Button Margin="10">hello</mt:Button>
   <mt:Button Margin="10">hello</mt:Button>
   <mt:Button Margin="10">hello</mt:Button>
  </UniformGrid>
 </mt:TouchablePanel>

Make sure you give your panel a background, it can be transparent. You will be able to move the panel, and all buttons on top of it, by touching the panel. But you won't be able to move panel by touching one of the buttons. Make sure you give some space between buttons, so panel can be touched.

May 24, 2009 at 1:27 PM

Super,

thanks!

 

May 25, 2009 at 7:36 PM

I am stuck again,

I'm trying to make this TV looking device.

It has three buttons on the side, a frame and inside shows images or movies (depending on which button was pressed)
I tried adding an image to cover the TouchablePanel, but then it wont move.

How can I cover the touchablePanel with grapics and also habe it move ?

Thanks !

Shachar.

 

Coordinator
May 25, 2009 at 8:59 PM

What do you want to move image or touchablepanel?

May 25, 2009 at 9:20 PM

Basically I need a movable two layer image (image and a frame on top) with buttons on it.

If that is not possible, I can make due with a single moving image with buttons on it (i will render the frame on the images and videos)

thanks.

Coordinator
May 25, 2009 at 9:28 PM

Sorry I don't get it.

Basicaly you can move everything that is laying direct on TouchablePanel. Not something that is laying on something else and then on TouchablePanel. It's like with any Panel in WPF. There is nothing special to MTV. Maybe a WPF documentation will help you: http://msdn.microsoft.com/en-us/library/ms754152.aspx

May 26, 2009 at 6:01 AM

Here is an example:

        <mt:TouchablePanel EnableWalls="True" >
            <Grid Background="white" Height="131"  Width="199">
                <Image Name="image1" Stretch="Fill" Source="/MultitouchVistaHelloWorld;component/images/AdloungeFrame.png" />
                <mt:Button Margin="0,31,7,0" Height="15" VerticalAlignment="Top" HorizontalAlignment="Right" Width="20" >hello</mt:Button>
                <mt:Button Margin="0,0,7,12" Height="32" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="19">hello</mt:Button>
                <mt:Button Margin="0,0,6,50" HorizontalAlignment="Right" Width="22" Height="27" VerticalAlignment="Bottom">hello</mt:Button>
            </Grid>
        </mt:TouchablePanel>

an image with buttons on it,
so it doesnt move because the image is in a grid which is in the panel.

How can I rewrite this to enable it to move around with the buttons on it ?

Thanks !

 

May 26, 2009 at 9:34 AM

I got it working, here :

        <mt:TouchablePanel>
            <Canvas Width="320" Height="240" Name="ccc" >
                <Canvas.Background>
                    <ImageBrush ImageSource="images/AdloungeFrame.png" Stretch="Fill"/>
                </Canvas.Background>

                <Grid Width="320" Height="240" >
                <mt:Button Margin="0,31,7,0" Height="15" VerticalAlignment="Top" HorizontalAlignment="Right" Width="20" Click="bclick">hello</mt:Button>
                <mt:Button Margin="0,0,7,12" Height="32" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="19">hello</mt:Button>
                <mt:Button Margin="0,0,6,50" HorizontalAlignment="Right" Width="22" Height="27" VerticalAlignment="Bottom">hello</mt:Button>
            </Grid>
            </Canvas>
        </mt:TouchablePanel>

 

Now i'm trying to have two images as background, layered one on top of the other.