IsEnabled for a container?

Is it possible to disable all controls inside the container grid? Thank!

UPD: Although the Silverlight Grid has an IsEnabled property, there is definitely no IsEnabled property for a Windows 7 Grid phone.

+3
source share
4 answers

After several days of trying to disable all child controls inside the Grid, I found the following:

  • No IsEnabled property for WP7 Grid
  • We can still iterate over all the child controls and set their IsEnabled property.
  • We can also use the Visibility property for the Grid.

, , , , .

, , , .:)

+2

Silverlight ScrollViewer Grid. ScrollViewer Control, IsEnabled false .

+5

Grid StackPanel ContentControl. ContentControls IsEnabled.

+5

, StoryBoard. , IsEnabled . . - "ReorderEnabled". listboxitem, .

                            <VisualState
                                x:Name="ReorderEnabled">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="ContentContainer">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <System:Boolean>False</System:Boolean>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <DoubleAnimation
                                            Storyboard.TargetName="ContentContainer"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0.5"
                                            Duration="0"/>
                                </Storyboard>
                            </VisualState>

. Expression Blend!

0

Source: https://habr.com/ru/post/1772057/


All Articles