I have a ComboBox that has its ItemsSource bound to a static List<CustomSettings> of options. The ComboBox is part of a form which is bound to a CustomObject class, and one of the properties on that class is a CustomSettingProperty.
I would like to bind the SelectedItem of the ComboBox to the property specified in the CustomObject, how...
I set up ItemSource for the ListBox with converter:
<ListBox Name="FunctionsListBox"
ItemsSource="{Binding Path=Functions,
Converter={x:Static app:CreatorWindow.FunctionConverter}}"/>
However this looks for me ugly, because converter converts entire collection -- I would prefer more versatile converte...
I'm trying to create a Table inside a FlowDocument inside a FlowDocumentPageViewer, as seen in this tutorial. I've never created a table in WPF before, and I was expecting there to be an ItemsSourceproperty to which I could bind, like with a ListBox. I want to customize the template for each row, and I want each row's source to be an i...
It looks WFP DataGridComboBoxColumn is using a single ItemsSource for all cells in this column. I have a case where the ComboBox items are dependent on the other cell in the same row. I managed to populate the ItemsSource in PreparingCellForEdit event. However, it doesn't work as desired. Initially, all cells in this column is empty. Onc...
I have declared a DataGrid in UserControl.
Now I have included the UserControl in my main xaml file. I am trying to set the ItemsSource property of DataGrid from main.xaml; but I am getting an error "The property ItemsSource doesnot exist in the namespace".
I am able to set the other properties like Background,Foreground, etc.
My Us...
Hello, I have a DataSet bound to the Window.DataContext; I also have a DataGrid
<DataGrid ItemsSource={Binding Tables[Items]}>
<DataGrid.Columns>
<DataGridTextBoxColumn Header={Binding Path=DataContext.Tables[Names]/Test, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}} />
</DataGrid.Columns>
<...
So i have a combobox as the CellEditingTemplate of a datagrid and selected item is bound to the datacontext of that row as expected, but i need the combobox to be populated from a ObservableCollection outside of the context of the datagrid from the ViewModel.
How could i acheive this?
Thanks
...
I have a context menu and i want its menu items populated via a binding.
The following code works
<Button>
<controlsInputToolkit:ContextMenuService.ContextMenu>
<controlsInputToolkit:ContextMenu ItemsSource="{Binding MenuItems}">
<controlsInputToolkit:ContextMenu.ItemTemplate>
<DataTemplate>
...
I have a simple data structure (the properties are of course Dependency Properties):
class MenuData{
public string Header {get; protected set;}
public ObservableCollection<MenuData> Items { get; protected set; }
}
ObservableCollection<MenuData> Menus {get; protected set;}
I want to bind the Menus property as Menu element Item...
Hello, I am experimenting with WPF and I came across a problem I can't seem to figure out although I have done some work with Silverlight previously and used DataContexts, Data Bindings and INPC successfully. This time I am stuck...
I am using this code to create an instance of the application's main window:
protected override void OnS...