Linked Questions

0 votes
0 answers
835 views

Using MVVM Light, When binding my UserControl's DataContext to a ViewModel property within my main ViewModel, the UI won't reflect anything. Following many of the other answers I found on stack ...
Coffey's user avatar
  • 11
0 votes
1 answer
227 views

I have a ListBox in WPF Window and an image + text block as item. I am trying to set the foreground of the text block via a property (i.e. ItemForegroundColor). ItemForegroundColor is a property in ...
mmmrbm's user avatar
  • 5
0 votes
0 answers
25 views

I'm trying to learn WPF and I'm currently creating a grid and binding data to it. Currently text column data binds ok but when doing a combobox it displays no data in the list. public class ...
MDP77's user avatar
  • 99
672 votes
14 answers
541k views

How do I use RelativeSource with WPF bindings and what are the different use-cases?
David Schmitt's user avatar
11 votes
3 answers
19k views

iv'e got 2 panels in an app game they are both bound to different elements . GameDetailsPanel.DataContext = game ; GameBoardPanel.DataContext = gameBoard ; *Game has a Turn Property * . ...
eran otzap's user avatar
  • 12.6k
2 votes
1 answer
4k views

Say I have this ViewModel and xaml: class MyViewModel { public MyStringValue {get;set;} = "HelloWorld" public IList<CustomObject> ChildViewModels{get;set;} } <DataTemplate DataType=...
Cgt's user avatar
  • 23
0 votes
1 answer
6k views

I'm using Silverlight 4. I have an ItemsControl with a custom DataTemplate. From that DataTemplate, I would like to bind to something in the UserControl's DataContext - not the DataContext of a ...
Nick Heiner's user avatar
6 votes
1 answer
3k views

I've been playing around with WPF and MVVM and noticed a strange thing. When using {Binding ElementName=...} on a custom user control, the name of the root element within the user control seems to be ...
Sergei Tachenov's user avatar
2 votes
2 answers
2k views

I'm writing a program that dynamically creates Control based on the data type of the properties extracted using reflection. Here is the view in subject for examination. <ListView ItemsSource="{...
Xegara's user avatar
  • 131
0 votes
1 answer
2k views

I have a list bound as ItemSource that contains two strings: Option 1 and option 2, I have 2 text boxes where I bind and display these two options. I also have two radio buttons next to the two ...
sim's user avatar
  • 15
1 vote
1 answer
1k views

I am trying to bind a VM method as a command in MenuItem. Though menu is displays correctly the function never get called.I expecting the MenuCommand Method to be get called from the command binding. ...
Shiju Samuel's user avatar
  • 1,591
0 votes
2 answers
1k views

It's the code from YouIandReactiveUI Is there a more elegant way to achieve this? Or is there any way to bind in code with IViewFor? <ItemsControl.ItemTemplate> ...
ye4241's user avatar
  • 11
1 vote
1 answer
713 views

I've got a wpf view that has a telerik:RadListBox with a contextmenu associated on each item defined as <DataTemplate x:Key="ListBoxItemTemplate"> <Grid > <telerik:...
advapi's user avatar
  • 3,965
1 vote
4 answers
231 views

I have a datagrid with a column containing a ComboBox. I've set the Name for my combobox, but this name is not visible in code, why? <DataGrid ...> <DataGrid.Columns> <...
MexVl's user avatar
  • 19
0 votes
1 answer
289 views

I have the below situation: <DataTemplate DataType="{x:Type tra:Presenter}"> <DockPanel> <GroupBox> <ie:DifferentControl DataContext="{...
Chris's user avatar
  • 6,072

15 30 50 per page