Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i choose more then one value for an attribute in XAML?

I am experimenting with ManipulationMode in XAML for an Windows store app. I want to have as many settings directly in my xaml so I don't have to use the code behind so much. When I found a solution to get my swipe recognition working I found something to do in code behind like the following:

myGrid.ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY;

Now I tried to get this working by using some xaml code. I then used this

<Grid Style="{StaticResource LayoutRootStyle}" ManipulationMode="TranslateY" ManipulationCompleted="manipulationCompleted">

This works fine but I didn't find a way to use ManipulationMode TranslateX AND TranslateY at the same time.

I tried to add some boolean operators in the attribute and the following snippet inside my grid.

<Grid.ManipulationMode>
   <ManipulationModes>TranslateX</ManipulationModes>
   <ManipulationModes>TranslateY</ManipulationModes>
</Grid.ManipulationMode>

What do I get wrong or is it not possible to make this in pure XAML?

Thanks Hermann

like image 266
Hermann Joens Avatar asked Dec 27 '12 16:12

Hermann Joens


1 Answers

You need to use comma separated values.

like image 152
Szymon Rozga Avatar answered Oct 03 '22 15:10

Szymon Rozga