简体   繁体   English

同一页面上有许多template10大小调整器

[英]Many template10 resizer on same page

I use template10 library on my uwp application. 我在uwp应用程序上使用template10库。
I tried to put 4 resizer control on textbox on the same page. 我试图在同一页面的文本框上放置4调整大小控件。
But when i drag one, grabbers of others textboxes are also moving without the textbox. 但是,当我拖动一个时,其他文本框的抓取器也将在没有该文本框的情况下移动。

What i want is : 我想要的是:

  • if i grab one grabber, only this grabber is supposed to move 如果我抓住一个抓取器,那么只有这个抓取器应该移动
  • the others are not supposed to move together 其他人不应该一起搬家

Do you have any idea ? 你有什么主意吗 ?

在此处输入图片说明

Here is my code : 这是我的代码:

<StackPanel x:Name="MedicalInfoGroup" Margin="0,0,0,24">

    <controls:Resizer Margin="0,0,0,24">
        <TextBox    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MinWidth="500" MinHeight="100"
                    Text="{Binding MedicalInformationsItem.Treatment, Mode=TwoWay}"
                    HorizontalAlignment="Left"
                    InputScope="Default"
                    IsSpellCheckEnabled="True">
        </TextBox>
    </controls:Resizer>

    <controls:Resizer Margin="0,0,0,24">
        <TextBox    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MinWidth="500" MinHeight="100"
                    Text="{Binding MedicalInformationsItem.MedicalHistory, Mode=TwoWay}"
                    HorizontalAlignment="Left"
                    InputScope="Default"
                    IsSpellCheckEnabled="True">
        </TextBox>
    </controls:Resizer>

    <controls:Resizer Margin="0,0,0,24">
        <TextBox    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MinWidth="500" MinHeight="100"
                    Text="{Binding MedicalInformationsItem.SurgicalHistory, Mode=TwoWay}"
                    HorizontalAlignment="Left"
                    InputScope="Default"
                    IsSpellCheckEnabled="True">
        </TextBox>
    </controls:Resizer>

    <controls:Resizer Margin="0,0,0,24">
        <TextBox    TextWrapping="Wrap"
                    AcceptsReturn="True"
                    MinWidth="500" MinHeight="100"
                    Text="{Binding MedicalInformationsItem.Allergies, Mode=TwoWay}"
                    HorizontalAlignment="Left"
                    InputScope="Default"
                    IsSpellCheckEnabled="True">
        </TextBox>
    </controls:Resizer>

</StackPanel>

Try setting the HorizontalAlignment of the Resizer to Left instead of the TextBox 尝试将Resizer的Horizo​​ntalAlignment设置为Left而不是TextBox

<controls:Resizer Margin="0,0,0,24"
                  HorizontalAlignment="Left">
    <TextBox TextWrapping="Wrap"
             AcceptsReturn="True"
             MinWidth="500" MinHeight="100"
             Text="{Binding MedicalInformationsItem.Treatment, Mode=TwoWay}"
             InputScope="Default"
             IsSpellCheckEnabled="True">
    </TextBox>
</controls:Resizer>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM