binding

WPF: Activate Trigger when a MVVM bound property changes

Hi, somehow I am going in circles here. Please forgive me if the answer to this question is obvious. I want to react to changed properties in the ViewModel in the View. When the properties (bool) change the View should start an animation (BeginStoryBoard). Actually in my application there are 4 of these properties each with its own nam...

ASP.NET MVC 2 Dots Replaced With Underscore In Element Name

ASP.NET MVC 2 Dots Replaced With Underscore In Element Name (even though ASP.NET MVC will put dots in by default in the name attribute!) When you stick an element on a form in ASP.NET MVC, it usually does the following: <%= Html.TextBoxFor(model => model.Contact.FirstName)%> Becomes <input type="text" name="Contact.FirstName" id="Co...

Problem with bound combobox: text disapearing after sorting the source list of strings.

Hi, Ive got an ObservableCollection<string> list, which is bound to a combobox. This combobox is in a datatemplate which is inside a 'DataGridTemplateColumn'. When the datagrid is displayed (with all the rows), the column displaying this combobox works just fine. The user can select the items in the combobox, and when it's selected, t...

OCaml/F# pattern matching variable binding

I have a function of the form 'a -> ('a * int) list -> int let rec getValue identifier bindings = match bindings with | (identifier, value)::tail -> value | (_, _)::tail -> getValue identifier tail | [] -> -1 I can tell that identifier is not being bound the way I would like it to and is acting as a variable within the match...

(.NET) ServicePoint.IPEndPointDelegate doesn't callback with proxy?

I need to bind the local ip address for an HttpWebRequest (machine has multiple ips). I create the delegate method, and this is called and the ip is bound for requests without a proxy, but once i add proxy details to the request, the callback never occurs How can i bind the outgoing ip address for HttpWebRequests that use a proxy? ...

Silverlight programmatically binding from C# code

I have a Canvas and a custom control called BasicShape After I add two BasicShape controls on the Canvas, I want programatically to connect them with a Line and I want to do this using the Binding class. I want to connect the Bottom side of first shape with the Top side of the second one. Initially i tried to connect only the X1 proper...

I would like to reuse the ObjectDataSource. How can i?

I mean I have a gridview in aspx. Then I have the ObjectDataSource. It's binding, it looks all right. Got paging allow = true also. I don't want to go again to the database for the same datatable (ObjectDataSource's Selectmethod), so I'd like to do something like: DataTable dt = ObjectDataSource.GetOriginalDataTableLoadedFrom(); Atr...

TemplateBinding doesn't bind to effect's property?

Imagine a control named Testko like this: public class Testko: Control { public static readonly DependencyProperty TestValueProperty; static Testko() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Testko), new FrameworkPropertyMetadata(typeof(Testko))); TestValueProperty = Dependen...

Ninject 2.0 - binding to a object that uses the same interface more than once?

Consider the following: public Something(IInterface concreteObjectOne, IInterface concreteObjectTwo) { this.concreteObjectOne = concreteObjectOne; this.concreteObjectTwo = concreteObjectTwo; } How do I set set this type of binding up with Ninject? I'd try Googling the term, but as I'm not sure what this is...

CustomBinding +error while connecting to WCF service

Greetings I have to following error while connecting to my WCF Service using custom binding An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail web.config looks as follows: <system.serviceModel> <bindings> <customBinding> <binding name="BindingEn...

WPF CheckBox's IsChecked property doesn't match binding source's value

In my WPF application I have a CheckBox whose IsChecked value is bound to a property in my viewmodel. Notice that I have commented out the actual line which sets the value in my viewmodel. It's the standard pattern: View.xaml <CheckBox IsChecked="{Binding Path=SomeProperty}" /> ViewModel.cs public bool SomeProperty { get { retur...

Element Binding Silverlight 3

I trying to use Element Binding in Silverlight 3 to SelectedItem of ComboBox in ToolTipService.ToolTip. This code works: <ComboBox x:Name="cboSource" DisplayMemberPath="Name" ToolTipService.ToolTip="{Binding ElementName=cboSource, Path=SelectedItem.Name}" Width="180" /> but this code doesn't: <ComboBox x:Name="cboSource" DisplayMembe...

How do you make jQuery bind events to elements loaded via Ajax?

I'm using the .load() function to load a section of html that has some jQuery functionality that is bound to a certain class. =/ thoughts? ...

Disable existing Eclipse Commands, like Eclipse "F5" for Debug/Default Perspective

I have created a new Perspective with additional views pretty similar to the Eclipse "Debug" Perspective. I have created some commands and key bindings using the extension points extension point="org.eclipse.ui.handlers" extension point="org.eclipse.ui.commands" extension point="org.eclipse.ui.bindings" I have to use "F5" to bind th...

How do I bind an Image dynamically in XAML?

The following displays an image correctly in a silverlight usercontrol: Image image = pagingManager.BaseApp.DatasourceManager.GetImage("helloWorld1"); ContentArea.Content = image; ... <ContentControl x:Name="ContentArea"/> However, I want to dynamically bind the image to XAML, e.g. like this: #region ViewModelProperty: MainImage priv...

Is it possible to use multibinding in WF (with ActivityBind) ?

I would like to bind multiple dependency properties of other activites to a dependency property (of type object[]) in my custom activity. Is it possible to define this multibinding : In the workflow markup (probably somehow combining multiple ActivityBind's) Set up the property editor in such a way that I can even edit this binding in...

Binding DataGridView to a list of various obects? c#

Let say I'll create a DataGridView with four columns of types TextBox, Button, ComboBox, and Link. How would I populate something like this? ...

LINQ to Entites: How and where to use OnPropertyChanging or ReportPropertyChanging events?

I'm trying to determine when a certain field is updated, and perform an action when the field changes. I'm using a custom binder for the class, and the first call in the binder is to base.BindModel(), at which point the original value is gone. When do the OnPropertyChanging and ReportPropertyChanging events get called? Is there any wa...

set button datacontext to multiple elements

I've got a button that I need to be disabled when validation errors occur in my window. The items on which these errors can occur are all textboxes. I've bound my Button's datacontext as such: DataContext="{Binding ElementName=txtEmail}" Now with this, I can set the button style to disabled when validation errors occur in the email...

Implementing IDataErrorInfo & databinding

I'm trying to change the IsEnabled property of a button if the validation on some of the textboxes in my form return true. So if there is errors, the IsEnabled property should be set to false. For some reason I cannot get it to work. The IDataErrorInfo implementation is only called after my IsEmailValid property is called, so the Vali...