mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 00:56:03 +02:00
* Update article and code projects * Further edits * Fix links * Relocate article & snippets to wpf/properties folder * add toc and redirects * Add acrolinx comment and make a minor edit. * minor Co-authored-by: Andy De George (adegeo) <[email protected]>
46 lines
1.3 KiB
VB.net
46 lines
1.3 KiB
VB.net
Namespace CodeSampleVb
|
|
Partial Public Class MainWindow
|
|
Inherits Window
|
|
|
|
Public Sub New()
|
|
InitializeComponent()
|
|
|
|
' <ProceduralPropertySet>
|
|
Dim myButton As New Button With {
|
|
.Width = 200.0
|
|
}
|
|
' </ProceduralPropertySet>
|
|
|
|
' <ProceduralPropertyGet>
|
|
Dim whatWidth As Double = myButton.Width
|
|
' </ProceduralPropertyGet>
|
|
|
|
End Sub
|
|
|
|
' <DefineDependencyProperty>
|
|
Public Shared ReadOnly IsSpinningProperty As DependencyProperty =
|
|
DependencyProperty.Register("IsSpinning", GetType(Boolean), GetType(MainWindow))
|
|
|
|
Public Property IsSpinning As Boolean
|
|
Get
|
|
Return GetValue(IsSpinningProperty)
|
|
End Get
|
|
Set(value As Boolean)
|
|
SetValue(IsSpinningProperty, value)
|
|
End Set
|
|
End Property
|
|
' </DefineDependencyProperty>
|
|
|
|
End Class
|
|
|
|
' <OverrideMetadata>
|
|
Public Class SpinnerControl
|
|
Inherits ItemsControl
|
|
Shared Sub New()
|
|
DefaultStyleKeyProperty.OverrideMetadata(GetType(SpinnerControl), New FrameworkPropertyMetadata(GetType(SpinnerControl)))
|
|
End Sub
|
|
End Class
|
|
' </OverrideMetadata>
|
|
|
|
End Namespace
|