UI Meta ekstenzija upravlja registrom komponenti i pruža IntelliSense podršku za PXAML datoteke.
Meta ekstenzija nudi:
Započnite s < i pritisnite Ctrl+Space:
Lista prikazuje sve dostupne kontrole s:
Unutar elementa Ctrl+Space prikazuje dostupne atribute:
<Button | > <!-- Kursor ovdje, pritisnite Ctrl+Space -->
Prikazuju se:
Kod atributa s definiranim vrijednostima:
<TextBox TextAlignment="|"/> <!-- Kursor ovdje -->
Prijedlozi: Left, Center, Right, Justify
| Naredba | Opis |
|---|---|
WVDS: Refresh Component Registry | Ponovno učitava metapodatke komponenti |
Registar organizira komponente po kategorijama:
| Kategorija | Sadržane kontrole |
|---|---|
| Layout | Grid, StackPanel, DockPanel, WrapPanel, Canvas |
| Input | TextBox, PasswordBox, ComboBox, CheckBox, RadioButton |
| Display | Label, TextBlock, Image, Border, Separator |
| Action | Button, ToggleButton, RepeatButton, MenuButton |
| Lists | ListBox, ListView, TreeView, DataGrid |
| Navigation | TabControl, TabItem, Menu, Toolbar |
| Containers | GroupBox, Expander, ScrollViewer, Popup |
Registar poznaje različite tipove svojstava:
| Tip | Primjer | IntelliSense ponašanje |
|---|---|---|
| String | Text=„Hello“ | Slobodan unos |
| Number | Width=„200“ | Numerički unos |
| Boolean | IsEnabled=„True“ | Odabir True/False |
| Enum | Visibility=„Visible“ | Prikaži enum vrijednosti |
| Brush | Background=„Red“ | Birač boja ili nazivi brusheva |
| Thickness | Margin=„10,5,10,5“ | Četiri vrijednosti (L,T,R,B) |
Vlastite komponente mogu se dodati u registar.
U Pascal komponenti:
type {$M+} [ComponentInfo('MyButton', 'Custom button with icon', 'Controls')] TMyButton = class(TWvdSButton) published [PropertyInfo('Icon path', 'Images')] property IconPath: string read FIconPath write SetIconPath; end;
Alternativno putem datoteke metapodataka:
{
"components": [
{
"name": "MyButton",
"description": "Custom button with icon",
"category": "Controls",
"properties": [
{
"name": "IconPath",
"type": "string",
"description": "Path to the icon image"
}
]
}
]
}
Meta ekstenzija nema direktnih postavki. Koristi konfiguraciju Core ekstenzije.
Metapodaci komponenti cachiraju se za brži pristup.
Kod promjena na komponentama:
WVDS: Refresh Component Registry%APPDATA%\Code\User\globalStorage\wvds.wvds-vscode-ui-meta~/.config/Code/User/globalStorage/wvds.wvds-vscode-ui-meta~/Library/Application Support/Code/User/globalStorage/wvds.wvds-vscode-ui-metaUzrok: Registar nije učitan ili datoteka nije prepoznata.
Rješenje:
WVDS: Refresh Component RegistryUzrok: Komponenta nije registrirana ili je cache zastario.
Rješenje:
Uzrok: Metapodaci su zastarjeli ili neispravni.
Rješenje:
| Svojstvo | Vrijednost |
|---|---|
| Extension ID | wvds.wvds-vscode-ui-meta |
| Aktivacija | onLanguage:pxaml, onLanguage:pascal |
| Ovisnosti | wvds-vscode-core |
| Min. VS Code | 1.85.0 |