Click here to Skip to main content
15,920,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: What are your preferences for work with databases ADO.net 2.0 LINQ TO SQL or Entity Framework Pin
PIEBALDconsult28-May-09 8:22
mvePIEBALDconsult28-May-09 8:22 
AnswerRe: What are your preferences for work with databases ADO.net 2.0 LINQ TO SQL or Entity Framework Pin
Henry Minute28-May-09 8:43
Henry Minute28-May-09 8:43 
GeneralRe: What are your preferences for work with databases ADO.net 2.0 LINQ TO SQL or Entity Framework Pin
ScottM128-May-09 20:21
ScottM128-May-09 20:21 
QuestionDraggable WinForm w/ Docked Control Problem Pin
baehoo28-May-09 7:42
baehoo28-May-09 7:42 
QuestionUsing sortedlist or sorteddictionary Pin
michaelgr128-May-09 7:10
michaelgr128-May-09 7:10 
AnswerRe: Using sortedlist or sorteddictionary Pin
Ennis Ray Lynch, Jr.28-May-09 7:23
Ennis Ray Lynch, Jr.28-May-09 7:23 
GeneralRe: Using sortedlist or sorteddictionary Pin
michaelgr128-May-09 7:24
michaelgr128-May-09 7:24 
GeneralRe: Using sortedlist or sorteddictionary Pin
Ennis Ray Lynch, Jr.28-May-09 7:29
Ennis Ray Lynch, Jr.28-May-09 7:29 
GeneralRe: Using sortedlist or sorteddictionary Pin
DaveyM6928-May-09 7:31
professionalDaveyM6928-May-09 7:31 
AnswerRe: Using sortedlist or sorteddictionary Pin
Luc Pattyn28-May-09 7:29
sitebuilderLuc Pattyn28-May-09 7:29 
GeneralRe: Using sortedlist or sorteddictionary Pin
michaelgr128-May-09 7:35
michaelgr128-May-09 7:35 
GeneralRe: Using sortedlist or sorteddictionary [modified] Pin
Luc Pattyn28-May-09 7:39
sitebuilderLuc Pattyn28-May-09 7:39 
AnswerRe: Using sortedlist or sorteddictionary Pin
dan!sh 28-May-09 7:30
professional dan!sh 28-May-09 7:30 
GeneralRe: Using sortedlist or sorteddictionary Pin
michaelgr128-May-09 7:42
michaelgr128-May-09 7:42 
GeneralRe: Using sortedlist or sorteddictionary Pin
michaelgr128-May-09 8:21
michaelgr128-May-09 8:21 
GeneralRe: Using sortedlist or sorteddictionary Pin
Henry Minute28-May-09 8:26
Henry Minute28-May-09 8:26 
GeneralRe: Using sortedlist or sorteddictionary Pin
michaelgr128-May-09 8:34
michaelgr128-May-09 8:34 
QuestionFile System C# Pin
sonya_rbi28-May-09 7:08
sonya_rbi28-May-09 7:08 
AnswerRe: File System C# Pin
DaveyM6928-May-09 7:28
professionalDaveyM6928-May-09 7:28 
AnswerRe: File System C# Pin
Luc Pattyn28-May-09 7:51
sitebuilderLuc Pattyn28-May-09 7:51 
QuestionAn elegant binding solution to getting the user to choose a COM port Pin
edwaugh28-May-09 7:02
edwaugh28-May-09 7:02 
AnswerRe: An elegant binding solution to getting the user to choose a COM port Pin
Ennis Ray Lynch, Jr.28-May-09 7:27
Ennis Ray Lynch, Jr.28-May-09 7:27 
AnswerRe: An elegant binding solution to getting the user to choose a COM port Pin
edwaugh28-May-09 9:30
edwaugh28-May-09 9:30 
QuestionA read only CheckBox in WPF Pin
edwaugh28-May-09 6:46
edwaugh28-May-09 6:46 
Hi everyone,

I am having a tricky problem, I want some slightly unusual behaviour from a checkbox and can't seem to figure it out. Any suggestions would be most welcome. The behaviour I want is:

1. The CheckBox is enabled and ready for the user to click, IsChecked represents a bound boolean value stored in a data structure
2. The user clicks the CheckBox causing the click event to fire but the bound value in the data structure is NOT updated and the visual representation of the CheckBox is NOT updated but it is disabled to stop further clicking
3. The click event triggers a message to be sent to a remote device which takes some time to respond
4. The remote device responds causing the data structure to be updated with the new value, the binding then updates the isChecked status and the CheckBox gets reenabled for further clicking

The problem I have is that although a OneWay data binding works at not updating the data structure when the CheckBox is clicked, the visual representation does change (which I think is odd, shouldn't IsChecked now act like a pointer to the value in the data structure).

I can reverse the change in the Click() event and do the disable there as well but this is pretty messy. I can also have the set property of the data structure value to set an isEnabled value which is also bound to reenable the CheckBox but that seems messy too.

Is there a clean way to do this? Perhaps with a derived CheckBox class? How can I stop the visual representation getting updated?

Thanks

Ed
Questioncreating a calendar Pin
benjamin yap28-May-09 6:23
benjamin yap28-May-09 6:23 

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.