binding

Global Binding Style

I'm wondering how can I set default UpdateSourceTrigger to PropertyChanged for all TextBox'es on window? Is there any simpler way than using Find&Replace? ...

WPF Binding XML List

Hi I want to bind the following XML to a couple of controls in WPF. Each category name should bind to the items source of a combo box, then when a category is selected in the combo box I want to bind the list of Products from the selected category to a listview Here is the XML: <?xml version="1.0" encoding="utf-8" ?> <Categories> ...

How do i get custom post-processing after binding to a backing bean ? Java Server Faces

Hi, What the best way to get custom post-processing after binding to a backing bean, similar to onBind event when using a Spring MVC controller ? I suppose i need a PhaseListener (after phase Update Model Values) as follows new PhaseListener() { public void beforePhase(PhaseEvent event) {} public void afterPhase(PhaseEvent e...

How to bind to a data-context outside of WPF toolkit datagrid

Hi, OK So I have a combo box which selects an administrator from a list of administrators: <ComboBox x:Name="adminCombo" ItemsSource="{Binding AdminsList}" DisplayMemberPath="Name" SelectedValue="{Binding Administrator}" SelectedValuePath="Name"/> and below this I have a WPF Toolkit DataGrid. E...

wpf - templates - pass template item as ConverterParameter

I have a template for a ListBox. In the ListBox I have a template on the ListBoxItems. I want to disable some of these items (I am still working on what I want to use to make the "event" fire, so I have just put in IsSelected for now) My issue is that I need to get at some of the data for the ListBoxItem to know if it should be disabl...

binding declared in xaml does not work

I have a main window which contains a grid, during the window loaded event, I will dynamically create an instance of a user control and add it to grid. In order to let the user control to adapt itself when the main window is resized, I want to bind the user control's width and height to the grid's ActualWidth and ActualHeight. The firs...

Flex 3 Binding problem

I have a custom ActionScript class: package EntityClasses { import mx.collections.ArrayCollection; [RemoteClass(alias="tkatva.tt.entities.CompanyInfo")] [Bindable] public class CompanyInfo { public var companyInfoId:int; public var companyName:String; public var streetAddress:String; public var postNumber:String; pu...

How to store Flex 3 ColorPicker Value in a variable and bind the variable to a textInput

Hello Stackoverflowers, Can anybody help me out? I would like to store a hex colorPicker value in a variable and then cast the value of the var backout to a textInput. The textInput is just to see witch hexcolor i have choosen. thus meaning seeing 0x000000 in the textInput. what i've done now is pretty simple i have bound the flex col...

WPF DataTrigger - Setting ListBoxItem IsSelected

I have the following data trigger on the ListBoxItems in my Multi-selection ListBox <DataTrigger Value="True"> <DataTrigger.Binding> <MultiBinding Converter="{StaticResource DisableWorkItemConverter}"> <Binding ElementName="MainForm" Path="PickedWorkItemID"/> <Binding Path="Id"/> </MultiBindin...

Binding Data to a TextBlock using Domain Data Source

I have a map with hotspots for each state (done in Expression Blend). I capture each MouseEnter of the state (1 thru 50). I pass that into my Domain Data Source: Dim activebox As Path = TryCast(sender, Path) activebox.Fill = mouseOverColor Dim StateID As Integer = CInt(Right(activebox.Name, 2)) Dim _StateContext As N...

Set DataGridTemplateColumn.SortMemberPath to navigation property?

Hi. I want to set the sorting of a WPF DataGridTemlpateColumn to a property of one of the child members in the row. For instance, the DataGrid's ItemsSource is an Array of computers, each of them has a screen, each screen has a button. I want the sorting should be {Binding Screen.Button.Name}. How do I do that? ...

WPF - Bound treeview not updating root items

I'm using a WPF TreeView control, which I've bound to a simple tree structure based on ObservableCollections. Here's the XAML: <TreeView Name="tree" Grid.Row="0"> <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Path=Children}"> <TextBlock Text="{Binding Path=Text}"/> </Hierarc...

Binding sclar values in C# grid controls

Hi All, Recently I have been using both the ASP.Net GridView Control and the WinForms DataGridView to display data dynamically. In both cases I have been using various generic Lists as the datasource (List<T>). When this list in as a collection of types with properties defined, these controls have no problem binding to a named property,...

Silverlight - binding to control borderthickness

I'm trying to better understand Silverlights binding mechanism and so have created a simple program that will change the borderthickness of a listbox on the press of a button. However it doesn't work and I can't figure out what I am doing wrong. Any ideas? XAML: <Grid x:Name="LayoutRoot" Background="White"> <ListBox Height="100" H...

Bind a value to a control's absolute position in XAML

Is there a way to bind a value to the absolute position of a control using XAML? I have a Line element that I would like to be drawn between two Buttons in my application. I was thinking that binding the starting point of the Line to the position of the Button would be the easiest way to make this happen, using RelativeSource somehow. ...

bindkey with zsh on Mac

Hi, I've been trying to bind keys in zzh on a Mac but am having some trouble. I know I should be Googling this but couldn't find what I need... I've been trying to bind ctrl-backspace to be an equivalent of ctrl-w, ie delete one word. But I can't find the key code for it. Nothing shows up when I do it with 'read'. I can't find a chart ...

MVVM ListBox controlling a Content Control

I've been going round in circles with this for a couple of days, and I'm hoping a WPF guru can see where I'm going wrong. I'm setting CurrentViewModel in code. The Selected item of my ListBox and the Content of my ContentControl bind correctly. But when changing the selected item in the Listbox via the UI the CurrentViewModel is being ...

WPF Bind Textbox IsEnabled to Listbox SelectedItem

Hi everybody! Using MVVM style i succefully bound an ObservableCollection to a listbox, showing up the values as radiobuttons. The control behaves exactly as expected. Now i have an issue regarding some textboxes bound to this listbox: i want whenever the SelectedItem in the listbox is equal to a specific value (e.g. 'ValueForEnabled')...

WPF Bind to itself

Hi, I've got a WPF Window, and somewhere there is a ListView where I bing a List<string> to. Now somewhere in my listview there is a TextBox and the Content property is set to {Binding} But this is the shorthand. How do I write the full binding to bind to itself? {Binding Path=Self} doesn't work, neither does {Binding Self} (where ...

WPF - Assigning storyboard begintime from parent element

I've got a basic spinner type control I've whipped up, and it works reasonably well, but there's a massive amount of repeated code throughout it. It's essentially the same element over and over again except for two properties, and one of those properties is the BeginTime for the Storyboard - each line just endlessly repeats its animati...