Click here to Skip to main content
15,892,298 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Silverlight development without Expression Blend Pin
DaveX8626-Nov-08 3:43
DaveX8626-Nov-08 3:43 
AnswerRe: Silverlight development without Expression Blend Pin
Paul Conrad13-Nov-08 12:14
professionalPaul Conrad13-Nov-08 12:14 
GeneralRe: Silverlight development without Expression Blend Pin
Kevin McFarlane13-Nov-08 23:01
Kevin McFarlane13-Nov-08 23:01 
QuestionBind ObservableCollection to a Grid Pin
ezazazel12-Nov-08 11:02
ezazazel12-Nov-08 11:02 
AnswerRe: Bind ObservableCollection to a Grid Pin
Mark Salsbery12-Nov-08 12:22
Mark Salsbery12-Nov-08 12:22 
GeneralRe: Bind ObservableCollection to a Grid Pin
ezazazel12-Nov-08 20:02
ezazazel12-Nov-08 20:02 
GeneralRe: Bind ObservableCollection to a Grid Pin
Mark Salsbery12-Nov-08 20:37
Mark Salsbery12-Nov-08 20:37 
GeneralRe: Bind ObservableCollection to a Grid Pin
ezazazel13-Nov-08 2:13
ezazazel13-Nov-08 2:13 
Ok, let's dive in deep:
I have a device where I can connect devices with other devices, a matrix.
The devices on each side send events, e.g OK and FAIL

I want to write a piece of software which has an observable collection with elements (buttons)
created by the information from the events.
This is: two devices connected (IN / OUT)
The Position inside the softwarematrix is generated from indeviceposition=>X and outdeviceposition=>Y

So in the beginning I ask all devices and generate the observablecollection.

A timer request when elapsed all devices for their status.

Let's pretend device1(IN) with device2(OUT) is connected.
This results in a button within the softwarematrix in Grid.SetRow(item, 1) and Grid.SerRow(item,2)
Now the timer requests again and this special IN/OUT combination failed, so the value ISFaulty of the observablecollectionitem is set to true and the softwarematrix displays the button now in red.

As you can see, I did it with grid.Children.Clear and grid.Children.Add when the observablecollection fires the event onCollectionChanged.

What I think is, that there should be a better way, maybe by binding the display directly to the observablecollection.
To get this to work, there need to be rules:
Rule1: PositionX and PositionY inside the softwarematrix are taken out of the properties from the class
Rule2: BackgroundColor is defined by the status of an enumeration

So that's it in short words.
GeneralRe: Bind ObservableCollection to a Grid Pin
Gideon Engelberth13-Nov-08 8:16
Gideon Engelberth13-Nov-08 8:16 
GeneralRe: Bind ObservableCollection to a Grid Pin
ezazazel13-Nov-08 9:55
ezazazel13-Nov-08 9:55 
GeneralRe: Bind ObservableCollection to a Grid Pin
Gideon Engelberth13-Nov-08 12:47
Gideon Engelberth13-Nov-08 12:47 
GeneralRe: Bind ObservableCollection to a Grid [modified] Pin
Mark Salsbery14-Nov-08 12:40
Mark Salsbery14-Nov-08 12:40 
GeneralRe: Bind ObservableCollection to a Grid Pin
ezazazel15-Nov-08 1:54
ezazazel15-Nov-08 1:54 
GeneralRe: Bind ObservableCollection to a Grid Pin
Mark Salsbery15-Nov-08 6:46
Mark Salsbery15-Nov-08 6:46 
GeneralRe: Bind ObservableCollection to a Grid Pin
Mark Salsbery15-Nov-08 7:15
Mark Salsbery15-Nov-08 7:15 
QuestionComboBox's SelectedValue set to null when changing templates PinPopular
James J. Foster12-Nov-08 4:56
James J. Foster12-Nov-08 4:56 
QuestionAdobe Illustrator exporter to XAML Pin
DaveX8611-Nov-08 16:50
DaveX8611-Nov-08 16:50 
Questionhow can i read files from my silverlight 2 web folder Pin
ahmedhassan9611-Nov-08 12:41
ahmedhassan9611-Nov-08 12:41 
AnswerRe: how can i read files from my silverlight 2 web folder Pin
lneir12-Nov-08 18:42
lneir12-Nov-08 18:42 
QuestionWPF-Callable Folder Browser Source Code [modified] Pin
Mark Salsbery11-Nov-08 11:40
Mark Salsbery11-Nov-08 11:40 
AnswerRe: WPF-Callable Folder Browser Source Code Pin
Pete O'Hanlon11-Nov-08 11:44
mvePete O'Hanlon11-Nov-08 11:44 
GeneralRe: WPF-Callable Folder Browser Source Code Pin
Mark Salsbery11-Nov-08 11:55
Mark Salsbery11-Nov-08 11:55 
AnswerRe: WPF-Callable Folder Browser Source Code Pin
Jammer12-Nov-08 0:52
Jammer12-Nov-08 0:52 
GeneralRe: WPF-Callable Folder Browser Source Code Pin
Mark Salsbery12-Nov-08 8:41
Mark Salsbery12-Nov-08 8:41 
QuestionAdding events to objects in application.resources Pin
Rferj11-Nov-08 10:22
Rferj11-Nov-08 10:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.