Control IsActive Property Delta Engine Documentation

Namespace: DeltaEngine.Scenes.Controls
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public override bool IsActive { get; set; }

Property Value

Type: Boolean

Implements

HierarchyObject2D IsActive
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.PictureTests
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.LabelTests
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.DropdownListTests
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.ScrollbarTests
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.SelectBoxTests
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.RadioDialogTests
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.SliderTests
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.TextBoxTests
Examples

1 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void DrawLoadedPicture()
{
    picture.IsActive = false;
    picture = new Picture(new Theme(), material, Rectangle.HalfCentered);
    var stream = BinaryDataExtensions.SaveToMemoryStream(picture);
    picture.IsActive = false;
    stream.CreateFromMemoryStream();
}
Examples

1 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void InactiveLabelDoesNotRender()
{
    label.IsActive = false;
}
Examples

1 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void DrawLoadedSelectBox()
{
    SetToTenValues();
    var stream = BinaryDataExtensions.SaveToMemoryStream(dropdownList);
    dropdownList.IsActive = false;
    stream.CreateFromMemoryStream();
}
Examples

1 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void DrawLoadedScrollbar()
{
    scrollbar.CenterValue = 50;
    var stream = BinaryDataExtensions.SaveToMemoryStream(scrollbar);
    scrollbar.IsActive = false;
    stream.CreateFromMemoryStream();
}
Examples

1 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void DrawLoadedSelectBox()
{
    SetToTenValues();
    var stream = BinaryDataExtensions.SaveToMemoryStream(selectBox);
    selectBox.IsActive = false;
    var loadedSelectBox = (SelectBox)stream.CreateFromMemoryStream(); 
    var text = new FontText(Font.Default, "", new Rectangle(0.4f, 0.7f, 0.2f, 0.1f));
    loadedSelectBox.LineClicked +=
        lineNo => text.Text = loadedSelectBox.Values[lineNo] + " clicked"; //ncrunch: no coverage
}
Examples

2 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void DrawLoadedRadioDialog()
{
    var stream = BinaryDataExtensions.SaveToMemoryStream(dialog);
    dialog.IsActive = false;
    stream.CreateFromMemoryStream();
}
[Test]
public void DrawLoadedRadioDialogAttachedToMouse()
{
    var stream = BinaryDataExtensions.SaveToMemoryStream(dialog);
    dialog.IsActive = false;
    var loadedDialog = (RadioDialog)stream.CreateFromMemoryStream();
    new Command(point => loadedDialog.DrawArea = Rectangle.FromCenter(point,
        loadedDialog.DrawArea.Size)).Add(new MouseMovementTrigger());
}
Examples

1 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void DrawLoadedSlider()
{
    slider.Value = 70;
    var stream = BinaryDataExtensions.SaveToMemoryStream(slider);
    slider.IsActive = false;
    stream.CreateFromMemoryStream();
}
Examples

1 unit tests call DeltaEngine.Scenes.Controls.Control.IsActive
[Test]
public void DrawLoadedTextBox()
{
    topTextBox.Text = "Original";
    bottomTextBox.IsActive = false;
    var stream = BinaryDataExtensions.SaveToMemoryStream(topTextBox);
    var loadedTextBox = (TextBox)stream.CreateFromMemoryStream();
    loadedTextBox.Text = "Loaded";
    loadedTextBox.DrawArea = loadedTextBox.DrawArea.Move(0.0f, 0.15f);
}
See Also