Click here to Skip to main content
15,920,217 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Multiselect mode not working for listview control containing a Gridview Pin
Mark Salsbery15-May-09 7:04
Mark Salsbery15-May-09 7:04 
AnswerRe: Multiselect mode not working for listview control containing a Gridview Pin
Niladri_Biswas13-Jun-09 3:43
Niladri_Biswas13-Jun-09 3:43 
QuestionPrism with DockManager Pin
Michael Sync14-May-09 15:51
Michael Sync14-May-09 15:51 
QuestionHow to get event of button inside stackpanel?very urgent.... Pin
salon14-May-09 4:23
salon14-May-09 4:23 
AnswerRe: How to get event of button inside stackpanel?very urgent.... Pin
Mark Salsbery14-May-09 7:07
Mark Salsbery14-May-09 7:07 
GeneralRe: How to get event of button inside stackpanel?very urgent.... Pin
salon17-May-09 20:09
salon17-May-09 20:09 
GeneralRe: How to get event of button inside stackpanel?very urgent.... Pin
VbGuru61326-Aug-10 7:58
VbGuru61326-Aug-10 7:58 
QuestionSorting ObservableCollection Pin
Kunal Chowdhury «IN»14-May-09 0:21
professionalKunal Chowdhury «IN»14-May-09 0:21 
AnswerRe: Sorting ObservableCollection Pin
Pete O'Hanlon14-May-09 1:39
mvePete O'Hanlon14-May-09 1:39 
AnswerRe: Sorting ObservableCollection Pin
Kunal Chowdhury «IN»14-May-09 2:21
professionalKunal Chowdhury «IN»14-May-09 2:21 
GeneralRe: Sorting ObservableCollection Pin
BlitzPackage14-May-09 9:41
BlitzPackage14-May-09 9:41 
GeneralRe: Sorting ObservableCollection Pin
Pete O'Hanlon14-May-09 10:25
mvePete O'Hanlon14-May-09 10:25 
GeneralRe: Sorting ObservableCollection Pin
Kunal Chowdhury «IN»14-May-09 20:54
professionalKunal Chowdhury «IN»14-May-09 20:54 
GeneralRe: Sorting ObservableCollection Pin
Pete O'Hanlon14-May-09 22:29
mvePete O'Hanlon14-May-09 22:29 
GeneralRe: Sorting ObservableCollection Pin
Kunal Chowdhury «IN»14-May-09 23:15
professionalKunal Chowdhury «IN»14-May-09 23:15 
GeneralRe: Sorting ObservableCollection Pin
Pete O'Hanlon15-May-09 0:40
mvePete O'Hanlon15-May-09 0:40 
AnswerRe: Sorting ObservableCollection Pin
Michael Sync14-May-09 15:58
Michael Sync14-May-09 15:58 
GeneralRe: Sorting ObservableCollection Pin
BlitzPackage15-May-09 15:32
BlitzPackage15-May-09 15:32 
GeneralRe: Sorting ObservableCollection Pin
Michael Sync15-May-09 22:19
Michael Sync15-May-09 22:19 
GeneralRe: Sorting ObservableCollection Pin
Kevin McFarlane16-May-09 6:37
Kevin McFarlane16-May-09 6:37 
AnswerRe: Sorting ObservableCollection Pin
Sebastian Solnica22-Nov-09 22:43
Sebastian Solnica22-Nov-09 22:43 
QuestionHelp: Binding huge data making application slower with 95% CPU usage Pin
Kunal Chowdhury «IN»13-May-09 19:37
professionalKunal Chowdhury «IN»13-May-09 19:37 
QuestionRe: Help: Binding huge data making application slower with 95% CPU usage Pin
Mark Salsbery14-May-09 7:18
Mark Salsbery14-May-09 7:18 
AnswerRe: Help: Binding huge data making application slower with 95% CPU usage [modified] Pin
Kunal Chowdhury «IN»14-May-09 18:38
professionalKunal Chowdhury «IN»14-May-09 18:38 
QuestionGot some problem with wpf multibinding Pin
Eric Vonjacson13-May-09 1:56
Eric Vonjacson13-May-09 1:56 
Hi,

I have some problem withe multi binding in wpf:
1) In the widnow cs file, I define a property like this:
private ObservableCollection<string> colltest = new ObservableCollection<string>();
public ObservableCollection<string> Coll
{
  get
  {
    return this.colltest;
  }
}

2) In the xaml file define a multi binding to the "togglebutton".
<ToggleButton Tag="dd" Content="TT" Width="50" Height="50">
  <ToggleButton.IsChecked>
    <MultiBinding Mode="OneWay" Converter="{x:Static app:SimpleConverter.Instance}">
      <Binding Mode="OneWay" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type app:Window1}}"
                     Path="Coll" />
      <Binding Mode="OneWay" RelativeSource="{RelativeSource Mode=Self}" Path="Tag" />
    </MultiBinding>
  </ToggleButton.IsChecked>
</ToggleButton>


3) and the covnert function of the converter is like this:
public object Convert(object[] value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
  bool bflag = false;

  if (value[0] == DependencyProperty.UnsetValue || value[0] == null||
   value[1] == DependencyProperty.UnsetValue ||
       value[1] == null)
    return bflag;

  ObservableCollection<string> v1 = value[0] as ObservableCollection<string>;
  string v2 = (string)value[1];

  if (v1 != null)
  {
    bflag = v1.Contains(v2);
  }

  return bflag;
}


It's working after the window is loadded. But however, after I add some new string to the collection "colltest", the togglebutton's "IsChecked" is not updated automatically.

I want it working in this way: If any changes are made to the collection "colltest". The togglebutton's "IsChecked" could update accordingly.

So how to resolve this problem?

thanks.

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.