binding

How do I translate a ® into Silverlight Text Represenation

I make calls to a webservice to get information that bind to the Text property of a TextBlock. Sometimes the information will contain encoded special characters for HTML - most notably the ® which I believe to the (r) symbol. The silverlight TextBlock just displays the raw text and not the (r). Of course, I can strip out the text, but...

MyContainer derived from FrameworkElement with binding support.

To understand how the binding works, I implemented MyContainer derived from FrameworkElement. This container allowes to set Children and adds them into the logical tree. But the binding by ElementName does not work. What can I do with MyContainer to make it work, leaving the parent as FrameworkElement? C#: public class MyContainer : Fr...

WPF Data Binding to a string property

Hi, I have a question about data binding which I am struggling with. I have the following property in my xaml.cs file: private string _stationIdInstruction; public event PropertyChangedEventHandler PropertyChanged; public string StationIdInstruction { get { return _stationIdInstruction; } set { ...

Binding and Layout relation in WPF

While investigating an issue with application I'm working on, I've came across one behavior I don't quite understand. It seems that when you have a TextBox (for example) with bound Text property the system takes one more layout pass than when you have a static Text. Could anyone, please, explain why this extra pass is happening? Does th...

Is there a way to bind To / From property of a DoubleAnimation inside a storyboard to an element inside the CotrolTemplate in XAML markup?

Hi friends, Is there a way to bind To / From property of a DoubleAnimation inside a storyboard to an element inside the CotrolTemplate in XAML markup? Something like this: <ControlTemplate TargetType="{x:Type Expander}"> <DockPanel> <ContentPresenter x:Name="ExpandSite" Height="140" DockPanel.Dock="Bottom"/> </DockPa...

DataGrid: Help accessing a control defined in a CellEditingTemplate

Hello, I am using the WPF DataGrid with a DataGridTemplateColumn. The DataGridTemplateColumn.CellEditingTemplate contains a ComboBox with IsEditable set to 'true'. In my RowEditEnding event handler, I'd like to read the Text property of that ComboBox - the only problem is that I don't know how to retrieve the ComboBox instance within ...

Createinstance() - Am I doing this right?

I'm trying to put together a plugins system with .NET, and I'm not sure if I'm doing it correctly. The basis of the system is that a specific directory ({apppath}/Plugins/) will have a bunch of precompiled DLLs, and I want to look through each one with reflection, and for every class available, if it inherits a specific base class (this...

WPF Image Source Binding

I have a ListBox with ItemTemplates and some data bindings, including an Image The ItemsSource is set in the codebehind. Everything works as expected until the app tries to change the image's source by updating the object's member, which is bound to the image source. What am I doing wrong? Here's the XAML: <ListBox x:Name="myList" Mou...

WPF Window MinWidth depending on size of toolbar

Hello, Before asking this question I have looked at all related questions, but have not found anything relevant. In my application I have toolbox style bar, which is basically stack panel with bunch of buttons. User may change which buttons are shown in toolbar. Window width may be changed, but it can not be smaller then width of tool...

How to modify ActiveXObject JS constructor?

I need to wrap an IE ajax request to notify me when it happens. ie i need to know when open is called on this: var xhr = new ActiveXObject("Microsoft.XMLHTTP"); The only way to do that(i think) is to implement the ActiveXObject constructor to proxy open calls to the real constructor/object. Can you help me do that? also: i dont need ...

WPF Listbox Image binding question (again)!

This is killing me, I can't get an image to display as a list box item: here is my code: WPF: // listbox called lstWidgets <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Name="txtTitle" Margin="2,5,5,2" Text="{Binding name}" /> <Image Name="imgDisp" Source="{Binding img}" Width="50" Height="50"/> ...

Linq to Entities Binding, Filtering and Editing in WinForms

1) Binding to The following populates a READ ONLY WinFrms grid: Dim query = (From profile _ In db.profile _ Where profile.employee.employeeId = employeeID _ Select profile.description) Me.DataGridView.DataSource = profileQueryList 2) Binding to the entity itself makes the WinForms gri...

XAML Binding Properties

Hi,Can someone point me to some sort of documentation that has a complete list of the properties and their value types that Binding class offers. <Image Source={Binding ......}/> Basically a list of all the properties that go after the Binding keyword. Many Thanks ...

jquery needs to rebind events on partial page postback

Hi, How can I rebind my events (jquery) when I perform a partial page postback? I am wiring everything up using: $(document).ready(function(){}; After a partial page postback, my events are not firing. ...

Bind multiple TextBoxes to one struct in WPF

How do i bind two TextBox objects to a System.Windows.Size struct? The binding only has to work in this direction: (textBox1.Text + textBox2.Text) => (Size) After a user inserts the width and height in the TextBoxes on the UI the Size object should be created. XAML: <TextBox Name="textBox_Width" Text="{Binding ???}" /> <TextBox Name=...

MVC Custom ViewModel and auto binding

I have a custom ViewModel defined as : public class SampleFormViewModel { public SampleFormViewModel(SelectList companies, Widget widget) { Companies = companies; Widget = widget; } public SelectList Companies { get; private set; } public Widget Widget { get; private set; } } In my Edit POST handle...

In WPF/Silverlight is it possible to bind to an HTML-like TableControl?

...

Silverlight 2 dynamic data binding Converter

In Silverlight 2.... I have a RadioButton in my xaml code as follows: <RadioButton GroupName="Gender" Content="Male" IsChecked="{Binding Path=Gender, ConverterParameter=1, Mode=TwoWay, Converter={StaticResource RadioStringConverter}}" Width="49" HorizontalAlignment="Left"/> This works great. My issue is in trying to duplicate this f...

Binding ObjectDataProvider to a property instead of a method.

Suppose you have following class: class ProcessController { public List<Process> Active { get { ... } } ... public List<Process> GetProcesses() { ... } } I can use the GetMethod to bind a ObjectDataProvider to the GetProcesses() method: <ObjectDataProvider x:Key="pList" MethodName="GetProcesses" ...

PHP array binding on Oracle PL/SQL call

I have a PL/SQL procedure that takes as input parameter a TABLE OF TYPE NUMBER(10). I'am trying to call it from php right now. The binding doesn't rise any error, everything is fine. But the content of my binding is not the one I expected! For example I bind an array: array(19465,19467) On the pl/sql side I get this kind of values: -2....