Hi,
I have a SwitchPanel with two different panels in it. On one panel I want to apply a ScaleTransform. If I add this directly to the panel, nothing happens, but if I add it to the outer SwtichPanel it works. However, I only want the transform to be applied to one panel, not to both. How do I get this to work?
For clarfication, this works:
<ItemsPanelTemplate>
<views:SwitchPanel
ActiveIndex="{Binding Settings.AutoScale, Converter={StaticResource BooleanToIntegerConverter}}">
<views:SwitchPanel.LayoutTransform>
<ScaleTransform
ScaleX="{Binding Path=Settings.ZoomLevel}"
ScaleY="{Binding Path=Settings.ZoomLevel}" />
</views:SwitchPanel.LayoutTransform>
<views:SwitchPanel.Panels>
<views:AnimatedWrapPanel
Orientation="Horizontal">
</views:AnimatedWrapPanel>
<views:AnimatedWrapPanel
Orientation="Vertical">
</views:AnimatedWrapPanel>
</views:SwitchPanel.Panels>
</views:SwitchPanel>
</ItemsPanelTemplate>
While this doesn't:
<ItemsPanelTemplate>
<views:SwitchPanel
ActiveIndex="{Binding Settings.AutoScale, Converter={StaticResource BooleanToIntegerConverter}}">
<views:SwitchPanel.Panels>
<views:AnimatedWrapPanel
Orientation="Horizontal">
<views:AnimatedWrapPanel.LayoutTransform>
<ScaleTransform
ScaleX="{Binding Path=Settings.ZoomLevel}"
ScaleY="{Binding Path=Settings.ZoomLevel}" />
</views:AnimatedWrapPanel.LayoutTransform>
</views:AnimatedWrapPanel>
<views:AnimatedWrapPanel
Orientation="Vertical">
</views:AnimatedWrapPanel>
</views:SwitchPanel.Panels>
</views:SwitchPanel>
</ItemsPanelTemplate>
Regards,
Robert
I have a SwitchPanel with two different panels in it. On one panel I want to apply a ScaleTransform. If I add this directly to the panel, nothing happens, but if I add it to the outer SwtichPanel it works. However, I only want the transform to be applied to one panel, not to both. How do I get this to work?
For clarfication, this works:
<ItemsPanelTemplate>
<views:SwitchPanel
ActiveIndex="{Binding Settings.AutoScale, Converter={StaticResource BooleanToIntegerConverter}}">
<views:SwitchPanel.LayoutTransform>
<ScaleTransform
ScaleX="{Binding Path=Settings.ZoomLevel}"
ScaleY="{Binding Path=Settings.ZoomLevel}" />
</views:SwitchPanel.LayoutTransform>
<views:SwitchPanel.Panels>
<views:AnimatedWrapPanel
Orientation="Horizontal">
</views:AnimatedWrapPanel>
<views:AnimatedWrapPanel
Orientation="Vertical">
</views:AnimatedWrapPanel>
</views:SwitchPanel.Panels>
</views:SwitchPanel>
</ItemsPanelTemplate>
While this doesn't:
<ItemsPanelTemplate>
<views:SwitchPanel
ActiveIndex="{Binding Settings.AutoScale, Converter={StaticResource BooleanToIntegerConverter}}">
<views:SwitchPanel.Panels>
<views:AnimatedWrapPanel
Orientation="Horizontal">
<views:AnimatedWrapPanel.LayoutTransform>
<ScaleTransform
ScaleX="{Binding Path=Settings.ZoomLevel}"
ScaleY="{Binding Path=Settings.ZoomLevel}" />
</views:AnimatedWrapPanel.LayoutTransform>
</views:AnimatedWrapPanel>
<views:AnimatedWrapPanel
Orientation="Vertical">
</views:AnimatedWrapPanel>
</views:SwitchPanel.Panels>
</views:SwitchPanel>
</ItemsPanelTemplate>
Regards,
Robert