gum-forms-controls

Document Gum Forms controls and Visual-FrameworkElement relationships for developers.

597|79|Updated Mar 11, 2015
One-click install
npx skills add https://github.com/vchelaru/Gum --skill gum-forms-controls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gum-forms-controls
Source: https://github.com/vchelaru/Gum/tree/main/.claude/skills/gum-forms-controls
Command: npx skills add https://github.com/vchelaru/Gum --skill gum-forms-controls

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a concise developer reference to understand and work with Forms controls that inherit from FrameworkElement in Gum, resolving confusion caused by WPF conventions that do not apply and explaining how visuals, layout, and state interact in the Gum runtime.

Core Features & Use Cases

  • Explains the Visual versus FrameworkElement separation and how the Visual owns layout and rendering while the FrameworkElement provides logical behavior.
  • Describes the two construction paths (Forms-first and Visual-first), when each is used, and how visuals may create or link to Forms objects.
  • Details ReactToVisualChanged patterns for locating named child elements, how state machines drive appearance, and how to customize visuals via DefaultVisuals or state edits.
  • Lists common non-obvious behaviors such as Gum layout semantics, IsVisible differences, and parent discovery across the visual hierarchy.
  • Points to key file locations and classes to inspect when implementing or debugging controls and generated screens.

Quick Start

Load the gum-forms-controls reference when implementing or debugging a Button, ListBox, TextBox, FrameworkElement subclass, or any visual-to-forms interaction to check construction paths, ReactToVisualChanged patterns, and state-driven styling.

Frequently Asked Questions about gum-forms-controls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do Gum Forms controls relate to their underlying Visual in MonoGame?

Gum Forms controls separate Visual from FrameworkElement, where the Visual owns layout and rendering while the FrameworkElement provides logical behavior for interactive controls.

How do I locate named child elements when constructing Gum Forms controls?

Use ReactToVisualChanged patterns to locate named child elements during Gum Forms control construction, enabling proper Visual-FrameworkElement linkage and state-driven appearance customization.

What is the difference between Forms-first and Visual-first construction in Gum?

Forms-first and Visual-first are two Gum construction paths determining whether a Forms object creates its Visual or a Visual links to an existing FrameworkElement, affecting initialization order.

Why do my WPF layout conventions not work with Gum FrameworkElement controls?

Gum layout semantics differ from WPF conventions, featuring non-obvious IsVisible differences and parent discovery behaviors across the visual hierarchy that require referencing Gum runtime rules.

How do state machines drive appearance for Gum Forms controls like Button and CheckBox?

State machines drive appearance for Gum Forms controls by managing visual states for elements like Button and CheckBox, customizable via DefaultVisuals or direct state edits in the Gum runtime.

Can I customize DefaultVisuals for FlatRedBall.Forms.Controls like ListBox and ComboBox?

Customize DefaultVisuals for FlatRedBall.Forms.Controls like ListBox and ComboBox by editing state machines and visual properties, modifying their appearance without altering FrameworkElement logic.