gum-tool-viewmodels

Implement Gum ViewModel conventions for data binding and visibility.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers using the Gum UI tool often lack clear guidance on how to structure ViewModel classes, define derived properties, and manage visibility, leading to stale UI updates and difficult maintenance.

Core Features & Use Cases

  • Base classes: ViewModel and DialogViewModel provide property storage, change notification, and dialog support.
  • Property patterns: Use Get and Set methods for stored properties and apply the DependsOn attribute for derived properties to ensure automatic UI refresh.
  • Visibility handling: Expose Visibility properties directly on the ViewModel instead of using value converters, simplifying XAML binding and improving testability.

Quick Start

Load the gum-tool-viewmodels skill and ask for guidance on defining a DependsOn visibility property.

Frequently Asked Questions about gum-tool-viewmodels

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

FAQPage Schema
How do I handle visibility binding in Gum ViewModels without value converters?

Expose visibility properties directly on your Gum ViewModel instead of using value converters. This simplifies XAML binding and improves testability by managing UI element visibility through native ViewModel property patterns.

What is the DependsOn attribute used for in Gum ViewModel derived properties?

The DependsOn attribute links derived properties to their dependencies in a Gum ViewModel. Applying it ensures automatic UI refresh whenever underlying data changes, preventing stale UI updates during data binding.

How do I create a Gum ViewModel class for reliable data binding?

Inherit from the ViewModel or DialogViewModel base class to get property storage and change notification. Use Get and Set methods for stored properties to establish reliable data binding in the Gum UI tool.

Why are my Gum UI updates stale when derived properties change?

Stale UI updates occur when derived properties lack the DependsOn attribute. Applying DependsOn to your Gum ViewModel properties ensures the binding system tracks dependencies and triggers automatic UI refreshes correctly.

Can I use Gum Viewmodels for dialog support in my UI application?

Yes, Gum provides the DialogViewModel base class for dialog support. Inheriting from DialogViewModel gives your UI components property storage, change notification, and specialized dialog management features.