JumpyNET Posted December 28, 2013 Posted December 28, 2013 (edited) What would be the best way to do the following in XAML? <StackPanel Grid.Row=IIF(Orientation="Portrait","2","1") Grid.Column=IIF(Orientation="Portrait","0","2") > ------------------------------------------------------------------------ At first I was thinking of using a ValueConverter but they do not seem to support multiple parameters. I guess passing both of the parameters in a single string such as "2|1" (which I would them split in my ValueConverter) would be bad practice, I was wondering could it be possible to do something like the following? <StackPanel Grid.Row="{Binding Orientation, ConverterParameter=[[new CustomClass(2,0)]], Converter={StaticResource OrientationToIntegerConverter}, ElementName=phoneApplicationPage}" Grid.Column="{Binding Orientation, ConverterParameter=[[new CustomClass(1,2)]], Converter={StaticResource OrientationToIntegerConverter}, ElementName=phoneApplicationPage}" > Edited December 29, 2013 by JumpyNET Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.