bevy_pf
A XAML / WPF-like UI framework for Bevy. Write UI in
XAML — inline via xaml!{} or in .xaml files — and instantiate it as
bevy_ui entities.
= "0.1"
use *;
use *;
What is here
WPF's panels (Grid with star/auto/pixel tracks, StackPanel, WrapPanel,
Canvas, DockPanel, Border, ScrollViewer), 40+ controls from Button
to DataGrid, TreeView, ComboBox, Menu/ContextMenu and DatePicker,
plus ecosystem equivalents (ToggleSwitch, NumericUpDown, RatingBar,
NavigationView, toasts, dialogs, and vector-drawn icons that need no icon
font).
Around them: resources and styles (StaticResource, DynamicResource,
implicit styles, BasedOn, merged dictionaries), ControlTemplate
re-templating with {TemplateBinding} and triggers, data binding against any
#[derive(Reflect)] view-model, storyboard animation, and WPF's verbatim
dependency-property precedence tiers.
Element identity survives the trip: x:Name becomes a queryable ECS
component, so ordinary Bevy systems and observers work on XAML-declared UI.
Conformance
WPF is treated as the specification. docs/wpf-conformance-notes.md in the
repository audits behavior against
the dotnet/wpf reference source and records every accepted deviation with
its reason — including hit testing, where a null Background on a panel is
transparent to input exactly as in WPF.
Features
clipboard(default) — system clipboard for text inputs. Android consumers should takedefault-features = false; the underlying crate has no Android backend and fails to compile there.native_shapes(default) — draw solid<Rectangle>and square<Ellipse>elements in Bevy's existing UI pass, with no raster texture or extra camera. Unsupported shapes fall through to tiny-skia.hot_reload— watch.xamlassets and re-instantiate on change.vector_gpu— route shape rendering throughbevy_pf_vector(tessellate once, draw instanced) after native shapes claim their supported subset, with the CPU path kept as fallback.
License
MIT OR Apache-2.0, at your option.