This repository was archived by the owner on Jun 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathSet-UDElement.txt
More file actions
113 lines (73 loc) · 3.11 KB
/
Copy pathSet-UDElement.txt
File metadata and controls
113 lines (73 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
NAME
Set-UDElement
SYNOPSIS
Set properties of an element.
SYNTAX
Set-UDElement [-Id] <String> [[-Properties] <Hashtable>] [-Broadcast] [[-Content] <ScriptBlock>] [<CommonParameters>]
DESCRIPTION
Set the properties of an element.
PARAMETERS
-Id <String>
The element to set properites on.
Required? true
Position? 1
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Properties <Hashtable>
The properties to set in the form of a hashtable.
Required? false
Position? 2
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Broadcast [<SwitchParameter>]
Whether to update this element on all connected clients.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Content <ScriptBlock>
Content to set within the element.
Required? false
Position? 3
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS >New-UDButton -Id 'setElement1' -Text 'Disable Me' -OnClick {
PS > Set-UDElement -Id 'setElement1' -Properties @{
PS > 'disabled' = $true
PS > }
PS > }
Properties|Disables a button.
-------------------------- EXAMPLE 2 --------------------------
PS >New-UDButton -Id 'setElement2' -Text 'Disable Me' -OnClick {
PS > Set-UDElement -Id 'setElement2' -Properties @{
PS > 'disabled' = $true
PS > } -Broadcast
PS > }
Broadcast|Disables a button and broadcasts it to all connected dashboards.
-------------------------- EXAMPLE 3 --------------------------
PS >New-UDElement -Tag 'div' -Id 'setElement3' -Content {
PS > New-UDTypography -Text 'Hello World'
PS > }
PS > New-UDButton -Text 'Click Me' -OnClick {
PS > Set-UDElement -Id 'setElement3' -Content {
PS > New-UDTypography -Text 'Goodbye World'
PS > }
PS > }
Content|Sets the content of an element.
RELATED LINKS