Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
关于缩放文本框的wpf问题_Wpf_Textbox - Fatal编程技术网

关于缩放文本框的wpf问题

关于缩放文本框的wpf问题,wpf,textbox,Wpf,Textbox,调整滑块,当我点击文本框时,文本框无法显示焦点,请,如何解决? 谢谢 我尝试了你提供的,经过一些小的调整,效果很好: <Slider Name="photoZoomSlider" Width="180" Minimum="100" Maximum="700" Value="300" /> <ScrollViewer > <Viewbox Width="{Binding ElementName=photoZoomSlide

调整滑块,当我点击文本框时,文本框无法显示焦点,请,如何解决?
谢谢

我尝试了你提供的,经过一些小的调整,效果很好:

<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>


您已经问了三次同样的问题:我不想得到答案,问题对我来说也是一样。谢谢您的回答。
<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>