Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
AnswerRe: DaraReader problem ... Pin
PIEBALDconsult5-Jul-14 9:49
mvePIEBALDconsult5-Jul-14 9:49 
GeneralRe: DaraReader problem ... Pin
DamithSL5-Jul-14 18:57
professionalDamithSL5-Jul-14 18:57 
GeneralRe: DaraReader problem ... Pin
nassimnastaran6-Jul-14 2:08
nassimnastaran6-Jul-14 2:08 
GeneralRe: DaraReader problem ... Pin
PIEBALDconsult6-Jul-14 4:29
mvePIEBALDconsult6-Jul-14 4:29 
GeneralRe: DaraReader problem ... Pin
nassimnastaran6-Jul-14 7:51
nassimnastaran6-Jul-14 7:51 
QuestionMood(emotion) detection in real time Pin
JanaRMS5-Jul-14 6:29
JanaRMS5-Jul-14 6:29 
AnswerRe: Mood(emotion) detection in real time Pin
Pete O'Hanlon5-Jul-14 11:55
mvePete O'Hanlon5-Jul-14 11:55 
QuestionReactiveCommand CanExecute is not updating button Pin
J. Holzer5-Jul-14 1:22
J. Holzer5-Jul-14 1:22 
I´ve set up business logic handling a connection of a clientsoftware to a serversoftware.

That BL is encapsulated in this interface:

C#
   public interface IServerConnectionLogic
   {
          IObservable<bool> Connected { get; }
          Task Connect();
          ...
   }
Connect());


In my viewmodel (based on ReactiveObject) I create my commands, that should trigger the server-connection:

C#
CmdConnectToService = new ReactiveCommand(ServerConnectionLogic.Connected.Select(connected => !connected));
CmdConnectToService.Subscribe(_ => ServerConnectionLogic.Connect());


The command is bound to a button in my UI-XAML.

When pressing the button the subscribed lamda is hit and the "Connect" method is called.
Inside the Observable "Connected" is set to "true.
Also the lambda in the "CanExecute"-parameter of the constructor of the ReactiveCommand is hit.

But the UI is not updated. I would have expected the button to get disabled, sinde the observable "Connected" turns to "true" and the "Select" statement inverts my boolean value...

I´ve tried that with the "RibbonButton" from the WpfToolkit as well as with a "normal" Button. Both are not getting updated.

The same IObservable<bool> is also bound to a member field:

C#
m_ServerConnected = new ObservableAsPropertyHelper<bool>(ServerConnectionLogic.Connected, _ => raisePropertyChanged("ServerConnected"));


while "m_ServerConnected" is bound to a CheckBox (for testing) via a property. That one is working fine, so the observable must be working...

Does anyone have an idea what could be my issue?
Questionreferenced parameter Pin
Gilbert Consellado5-Jul-14 0:24
professionalGilbert Consellado5-Jul-14 0:24 
AnswerRe: referenced parameter Pin
OriginalGriff5-Jul-14 0:38
mveOriginalGriff5-Jul-14 0:38 
GeneralRe: referenced parameter Pin
Gilbert Consellado5-Jul-14 1:04
professionalGilbert Consellado5-Jul-14 1:04 
GeneralRe: referenced parameter Pin
harold aptroot5-Jul-14 0:56
harold aptroot5-Jul-14 0:56 
GeneralRe: referenced parameter Pin
Gilbert Consellado5-Jul-14 1:07
professionalGilbert Consellado5-Jul-14 1:07 
GeneralRe: referenced parameter Pin
sankarsan parida6-Jul-14 7:52
professionalsankarsan parida6-Jul-14 7:52 
GeneralRe: referenced parameter Pin
Gilbert Consellado9-Jul-14 23:32
professionalGilbert Consellado9-Jul-14 23:32 
QuestionMessage Closed Pin
4-Jul-14 20:18
Mehtech4-Jul-14 20:18 
QuestionMessage Closed Pin
4-Jul-14 20:16
Mehtech4-Jul-14 20:16 
Questionc#, VSTO, Template Project, opening Document without error messge? Pin
Kristian Holm4-Jul-14 8:19
Kristian Holm4-Jul-14 8:19 
QuestionHow to Connect Marquee with database Pin
Member 102260014-Jul-14 7:07
Member 102260014-Jul-14 7:07 
AnswerRe: How to Connect Marquee with database Pin
Richard MacCutchan4-Jul-14 7:23
mveRichard MacCutchan4-Jul-14 7:23 
GeneralRe: How to Connect Marquee with database Pin
Member 102260014-Jul-14 8:13
Member 102260014-Jul-14 8:13 
SuggestionRe: How to Connect Marquee with database Pin
Richard MacCutchan4-Jul-14 20:04
mveRichard MacCutchan4-Jul-14 20:04 
Questionresponsive GUI text change / database instant search Pin
Member 817404-Jul-14 5:17
Member 817404-Jul-14 5:17 
AnswerRe: responsive GUI text change / database instant search Pin
Dave Kreskowiak4-Jul-14 5:31
mveDave Kreskowiak4-Jul-14 5:31 
AnswerRe: responsive GUI text change / database instant search Pin
OriginalGriff4-Jul-14 5:31
mveOriginalGriff4-Jul-14 5:31 

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.