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
Tags: vb, WPF, XAML
Posted in Programming | No Comments »
April 24th, 2008
result = _
From master In dc.Masters _
Where (master.name.Contains(txtSearch.Text) _
Group Join detail In dc.details On master Equals detail.Master Into both = Group _
From b In both.DefaultIfEmpty _
Select New With {.master = master, .detail = If(master.Details.Count = 0, New Detail, b)}
Tags: linq, linqtosql, vb
Posted in Programming | No Comments »
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.
Tags: WPF, XAML
Posted in XAML | No Comments »