开发者

Siliverlight: controls visibility changes alignment?

开发者 https://www.devze.com 2023-01-19 06:35 出处:网络
The following code <StackPanel Orientation=\"Horizontal\"> <Image Source=\"test.jpg\"/> <Image Source=\"test2.jpg\"/>

The following code

    <StackPanel Orientation="Horizontal">
        <Image Source="test.jpg"/>
        <Image Source="test2.jpg"/>
        <TextBlock Text="TeStBlock"/>
    </StackPanel>

If I am setting the visibility of the contents of the StackPanel in the codebehind and lets say I set the visibility of the Second image to collapsed. I notice that the TextBlock moves to where the Ima开发者_JS百科ge used to be.

How can I keep the alignment and turn the visibility on or off?


Use Opacity="0" instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消