> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/flatredball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/flatredball/api/flatredball/graphics/ivisible/ignoresparentvisibility.md).

# IgnoresParentVisibility

### Introduction

The IgnoresParentVisibility property controls whether an IVisible instance's visibility is impacted by its parent's visibility. If an IVisible doesn't have a parent, then the IgnoresParentVisibility property has no impact. IgnoresParentVisibility defaults to false, meaning that parent visibility impacts a child's visibility. Setting this value to true makes an IVisible's Visible property ultimately determine whether it appears on screen.

### Code Example

The following example creates four Sprites. Two of the Sprites are parents, two are children of their respective parent. spriteChildB has its IgnoresParentVisibility set to true, meaning it will still be visible desipite its parent being invisible. Since spriteParentA is invisible, spriteChildA will also be invisible.

```
Sprite spriteParentA = SpriteManager.AddSprite("redball.bmp");
Sprite spriteChildA = SpriteManager.AddSprite("redball.bmp");
spriteParentA.TextureScale = 1;
spriteChildA.TextureScale = 1;

spriteChildA.AttachTo(spriteParentA, false);
spriteChildA.RelativeX = 30;

Sprite spriteParentB = SpriteManager.AddSprite("redball.bmp");
Sprite spriteChildB = SpriteManager.AddSprite("redball.bmp");
spriteParentB.Y = 30;
spriteParentB.TextureScale = 1;
spriteChildB.TextureScale = 1;

spriteChildB.AttachTo(spriteParentB, false);
spriteChildB.RelativeX = 30;
spriteChildB.IgnoresParentVisibility = true;

spriteParentA.Visible = false;
spriteParentB.Visible = false;
```

![IgnoreParentVisibilityPic.PNG](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-6e25bbb7bbff5581c2e23340450210955dfa8fb7%2Fmigrated_media-IgnoreParentVisibilityPic.PNG?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/flatredball/api/flatredball/graphics/ivisible/ignoresparentvisibility.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
