0
<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>
                     <TextBox 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!

doull
  • 121
  • 1
  • 4
  • 10
  • You've asked the same question three times: http://stackoverflow.com/questions/4567910/wpf-scale-to-textbox-textbox-can-not-display-cursor-when-i-click-textbox – Rick Sladkey Jan 13 '11 at 03:31

1 Answers1

0

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>
Notter
  • 588
  • 4
  • 16
  • It is not answer that i want to get,and problem is the same to me.Thank you about answer. – doull Jan 13 '11 at 04:49