Posts Tagged ‘XAML’

My new DJ Name

Monday, April 28th, 2008

mc:Ignorable=”d”

replacing the private variable of public members with dependancy properties

Thursday, April 24th, 2008

Public StatusProperty As DependencyProperty = _
DependencyProperty.RegisterAttached(”Status”, GetType(String), GetType(Window))

Property Status() As String
Get
Return GetValue(StatusProperty)
End Get
Set(ByVal value As String)
SetValue(StatusProperty, value)
End Set
End Property

WPF XAML Status Display - Push vs Pull

Wednesday, April 23rd, 2008

OLD WAY - PUSH

Coder directly touches the ui element requiring intimate immediate knowlege of the ui that must preexist before coding.

txtStatus.Text = “Foo Bar”

NEW WAY - PULL

Coder make the status available through a public property that is set thusly before ui is created.

Status = “Foo Bar”

Designer binds to the programmers object pulling the data into the ui

<TextBlock Text=”{Binding Status}” />

Note: The text block does not have or need a Control Name as it is never referenced by the code.

Having names on your TextBlocks may be an indication that you are not yet really operating in the XAML WPF pardigm.