binding

What is the value-binding syntax in xaml?

I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? : <Border Name="TrackBackground" Margin="0" CornerRadius="2" ...

What are Early and Late Binding?

In the spirit of asking the questions that need to be asked . . . what is the difference between early and late binding? ...

Get the DefaultView DataRowView from a DataRow

Here's the situation: I need to bind a WPF FixedPage against a DataRow. Bindings don't work against DataRows; they work against DataRowViews. I need to do this in the most generic way possible, as I know nothing about and have no control over what is in the DataRow. What I need is to be able to get a DataRowView for a given DataRow...

How can you clone a WPF object?

Anybody have a good example how to deep clone a WPF object, preserving databindings? The marked answer is the first part. The second part is that you have to create an ExpressionConverter and inject it into the serialization process. Details for this are here: http://www.codeproject.com/KB/WPF/xamlwriterandbinding.aspx?fid=1428301&a...

binding variables to parameters in ADOdb for PHP

does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way? I thought ADOdb also did data sanitation or escaping within the same functionality by default. Or am I just confusing it with Code Igniter's built-in processes? ...

What is the best way to generate XML Binding Code from a DTD?

Most Java-XML binding frameworks and code generators need XML Schema Defintions. Can you suggest the best way to generate binding code from DTD. I know that the XJC in JAXB 2 supports DTD but it is considered experimental. In the spirit of Stack Overflow, one suggestion per answer please - to be voted up or down instead of duplicated ...

How to bind from a ContentTemplate to the surrounding custom Control?

I've got the following user control: <TabItem x:Name="Self" x:Class="App.MyTabItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:app="clr-namespace:App" > <TabItem.Header> <!-- This works --> <TextBlock Text="{B...

WCF is not binding to the correct IP address

We have a WCF service deployed on a Windows 2003 server that is exhibiting some problems. The configuration is using wsHttpBinding and we are specifying the IP address. The services is being hosted by a Windows Service. When we start the service up, most of the time it grabs the wrong IP address. A few times it bound to the correct a...

What is "lambda binding" in Python?

I understand what are lambda functions in Python, but I can't find what is the meaning of "lambda binding" by searching the Python docs. A link to read about it would be great. A trivial explained example would be even better. Thank you. ...

What are the differences between using the New keyword and calling CreateObject in Excel VBA?

What criteria should I use to decide whether I write VBA code like this: Set xmlDocument = New MSXML2.DOMDocument or like this: Set xmlDocument = CreateObject("MSXML2.DOMDocument") ? ...

JavaScript Callback Scope

I'm having some trouble with plain old JavaScript (no frameworks) in referencing my object in a callback function. function foo(id) { this.dom = document.getElementById(id); this.bar = 5; var self = this; this.dom.addEventListener("click", self.onclick, false); } foo.prototype = { onclick : function() { this...

What libs can I use to bind POJOs to external files for TDD without much overhead?

I need a way to bind POJO objects to an external entity, that could be XML, YAML, structured text or anything easy to write and maintain in order to create Mock data for unit testing and TDD. Below are some libraries I tried, but the main problems with them were that I am stuck (for at least more 3 months) to Java 1.4. I'd like any insig...

WPF binding with StringFormat doesn't work on ToolTips

The following code has a simple binding which binds the Text of the TextBlock named MyTextBlock to TextBox's Text and ToolTip property using the exact same Binding notation: <StackPanel> <TextBlock x:Name="MyTextBlock">Foo Bar</TextBlock> <TextBox Text="{Binding ElementName=MyTextBlock, Path=Text, StringFormat='It is: \{0\}'}...

WPF Binding My.Settings collection to Combobox items

I'm VERY new to WPF, and still trying to wrap my head around binding in XAML. I'd like to populate a combobox with the values of a string collection in my.settings. I can do it in code like this: Me.ComboBox1.ItemsSource = My.Settings.MyCollectionOfStrings ...and it works. How can I do this in my XAML? is it possible? Thanks ...

WPF Databinding and cascading Converters?

hi there, i wonder if it is possible to cascade converters when using wpf databinding. e.g. something like <SomeControl Visibility="{Binding Path=SomeProperty, Converter={StaticResource firstConverter}, Converter={StaticResource secondConverter}}"/> is it possible at all or do i have to create a custom converter that combines the fu...

IIS 7.0 Multiple Domain Site Bindings

I've got three web sites each with its own domain going to my one Windows Server 2008 IIS 7.0 web server. example1.com example2.com example3.com The site bindings for each: When I navigate to example1.com, then I see my example1 web site. When I navigate to example2.com, then I see my example2 web site. But, when I navigate ...

ElementName Binding Broken in a ControlTemplate

Hi All, I have ListView with Grouping Items. Grouping uses custom GroupStyle (Expander). I would like to have check box which will Expand and collapse all groups when. It works fine untill I click manually on the group header and expand or collapse that group. After clicking that particular group stops to respond on check box select...

Complex model binding to a list

I have been trying out the NameValueDeserializer from MVCContrib, which will take a IList as a parameter to a controller and bind a form and its elements to it, but I was just wondering if MVC Beta had any way of doing this?? I know you can bind a strongly typed Object but I want to bind a List of these Objects for some bulk editing sit...

XAML : Binding textbox maxlength to Class constant

I am attempting to bind a WPF textbox's Maxlength property to a known constant deep within a class. I am using c#. The class has a structure not too dissimilar to the following: namespace Blah { public partial class One { public partial class Two { public string MyBindingValue { get; set; } ...

How do you access the DisplayMemberPath from a ListBox when trying to bind it to the content of the ListBoxItem?

I have overridden the windows ListBox in order to display an image and a piece of text in each ListBoxItem, but I need to filter the contents of the text displayed I was hoping to do this by accessing the DisplayMemberPath of the actual ListBox however I can't get it working. <Setter Property="ItemContainerStyle"> <Setter.Value>...