<Slider Name="photoZoomSlider" Width="180" Minimum="100" Maximum="700" Value="300" />
<ScrollViewer >
<Viewbox Width="{Binding ElementName=photoZoomSlider, Path=Value}" Height="{Binding ElementName=photoZoomSlider, Path=Value}">
<StackPanel>
<Image Name="Photo" Source="C:\dic.bmp" Width="100" Height="100"/>
<TextBox Width="100"></TextBox>
<TextBo开发者_运维问答x Width="200" Padding="5"></TextBox>
<TextBox Width="10"></TextBox>
<TextBox Width="500"></TextBox>
</StackPanel>
<!--<Viewbox.LayoutTransform>
<ScaleTransform x:Name="uiZoomTransform"
ScaleX="{Binding ElementName=photoZoomSlider, Path=Value}"
ScaleY="{Binding ElementName=photoZoomSlider, Path=Value}"/>
</Viewbox.LayoutTransform>-->
</Viewbox>
</ScrollViewer>
</StackPanel>
Adjust Slider,TextBox can't to show focus when i click textBox,Please,How to solution? Thanks!
I tried what you gave, and with some minor adjustments it works fine:
<StackPanel>
<Slider Name="photoZoomSlider" Width="200" Height="50" Value="50" />
<ScrollViewer>
<Viewbox Width="{Binding ElementName=photoZoomSlider, Path=Value}" Height="{Binding ElementName=photoZoomSlider, Path=Value}">
<StackPanel>
<TextBox Text="ff" />
<TextBox Text="ss" />
<TextBox Text="zz" />
<TextBox Text="cc" />
</StackPanel>
<Viewbox.LayoutTransform>
<ScaleTransform x:Name="uiZoomTransform" ScaleX="{Binding ElementName=photoZoomSlider, Path=Value}"
ScaleY="{Binding ElementName=photoZoomSlider, Path=Value}"/>
</Viewbox.LayoutTransform>
</Viewbox>
</ScrollViewer>
</StackPanel>
精彩评论