Click here to Skip to main content
15,919,245 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to make groupbox invisble on select of a radiobutton Pin
Krishna Aditya19-Jul-09 20:34
Krishna Aditya19-Jul-09 20:34 
AnswerRe: How to make groupbox invisble on select of a radiobutton Pin
Kunal Chowdhury «IN»19-Jul-09 21:00
professionalKunal Chowdhury «IN»19-Jul-09 21:00 
AnswerRe: How to make groupbox invisble on select of a radiobutton Pin
#realJSOP20-Jul-09 0:23
professional#realJSOP20-Jul-09 0:23 
QuestionWPF: Is there any Flip Book Control available? Pin
Kunal Chowdhury «IN»19-Jul-09 20:08
professionalKunal Chowdhury «IN»19-Jul-09 20:08 
AnswerRe: WPF: Is there any Flip Book Control available? Pin
Pete O'Hanlon19-Jul-09 22:18
mvePete O'Hanlon19-Jul-09 22:18 
QuestionDeriving new class [modified] Pin
#realJSOP18-Jul-09 2:08
professional#realJSOP18-Jul-09 2:08 
QuestionWPF Call to WCF Service - Sessions? Pin
jeremyadell17-Jul-09 14:47
jeremyadell17-Jul-09 14:47 
AnswerRe: WPF Call to WCF Service - Sessions? Pin
Mark Salsbery18-Jul-09 7:09
Mark Salsbery18-Jul-09 7:09 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
jeremyadell18-Jul-09 9:57
jeremyadell18-Jul-09 9:57 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
Mark Salsbery18-Jul-09 16:59
Mark Salsbery18-Jul-09 16:59 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
jeremyadell18-Jul-09 17:28
jeremyadell18-Jul-09 17:28 
QuestionHow to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII17-Jul-09 13:43
fjparisIII17-Jul-09 13:43 
AnswerRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
Christian Graus17-Jul-09 16:17
protectorChristian Graus17-Jul-09 16:17 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII17-Jul-09 16:34
fjparisIII17-Jul-09 16:34 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
Christian Graus17-Jul-09 16:45
protectorChristian Graus17-Jul-09 16:45 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII17-Jul-09 16:56
fjparisIII17-Jul-09 16:56 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (SOLVED) Pin
fjparisIII18-Jul-09 10:49
fjparisIII18-Jul-09 10:49 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (NOT SOLVED after all, sigh...) Pin
fjparisIII18-Jul-09 12:26
fjparisIII18-Jul-09 12:26 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (SOLVED) Pin
samip shrestha29-Nov-09 18:59
samip shrestha29-Nov-09 18:59 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (SOLVED) Pin
fjparisIII30-Nov-09 12:49
fjparisIII30-Nov-09 12:49 
AnswerRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
Mark Salsbery19-Jul-09 8:31
Mark Salsbery19-Jul-09 8:31 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII19-Jul-09 13:25
fjparisIII19-Jul-09 13:25 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII19-Jul-09 13:29
fjparisIII19-Jul-09 13:29 
QuestionTwo-way binding problem Pin
Ravadre17-Jul-09 9:42
Ravadre17-Jul-09 9:42 
Hi,
Recently I'm trying to learn WPF, and I've stumbled across a problem, I can solve it, but I'm not happy with the result code, so maybe someone could help me to polish it a bit.

Let's say, I have class XManager, that manages classes X, also, it has reference to currently active X instance, each class X has it's own Text property, I want to do a two way binding between textbox and this text property.

It looks like this:
class XManager
{
  private X activeX;

  public X ActiveX
  {
    get { return activeX; }
  }
}

class X : INotifyPropertyChanged
{
  public string Text { get; set; }

  public void PutSomeTextProgramatically(string someText)
  {
    Text += someText;
    if (PropertyChanged != null)
      PropertyChanged(this, new PropertyChangedEventArgs("Text"));
  }
}


Now, I do have a manager accessible from XAML:
<Windows.Resources>
  <local:XManager x:Key="xManager"/>
</Windows.Resources>


My binding to it looks like this:
<TextBox Name="someBox">
  <TextBox.Text>
    <Binding Mode="TwoWay" Source="{StaticResource xManager}" Path="ActiveX.Text" />
  </TextBox.Text>
</TextBox>


Such code won't work properly, because we've binded to XManager's "ActiveX.Text", but we never change it, so workaroun I did was to add do my manager such code:
//This one is invoked when activeSession signals PropChange
void XSession_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
  if (e.PropertyName == "Text")
  {
    if (PropertyChanged != null)
      PropertyChanged(this, new PropertyChangedEventArgs("ActiveSession.Text"));
  }
}


Now it will work, but I find such code a bit ugly, I'd like to bind "directly" to PropertyChange event inside XSession, not to some sort of a wrapper. Is this possible, or maybe I don't see something obvious?
AnswerRe: Two-way binding problem Pin
User 27100918-Jul-09 5:21
User 27100918-Jul-09 5:21 

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.