databinding

Best way to implement SQLite data storage in AIR

What would be the best way to commit data to an SQLite database in AIR? I currently have an NamesCollection class which extends ArrayCollection. The addItem method takes the name as a parameter and passes it on to the addItem method of the base class, then writes it to the database using the flash.data.* API. I would also like to use da...

2-level filtering in WinForms DataBinding

Hi, I'm currently struggling with a problem in Winforms databinding, and I'm wondering if somebody has a good idea how to solve this. My problem is, that I'm using a 3rd-Party WinForms grid to display some data. I'm using a BindingList with objects that implement INotifyPropertyChanged. This grid doesn't support paging, but I really ne...

binding generic list to dropdown

I have public class ListA { private string code; private string name; public string Code { get { return code; } set { code = value; } } public string Name { get { return name; } set { name = value; } } } List<ListA> lst = new List<ListA>(); public List<ListA> getList() { lst.Add(new ListA { Code = "ABC"...

Put a function in an XML field

Is it possible to put a function in an XML field? For example i have the following xml file: <?xml version="1.0" encoding="utf-8" ?> <prova> <prova> <continente>Europa</continente> <stato>Italia</stato> <societa>SSC Napoli</societa> <actual>1.09769</actual> <estimate>0.447969</estimate> </prova> <prova> .... </prova> </prova> I...

WPF - Attach Binding Debugging when Binding is not in a string

Debugging a binding when it is like this IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Mode=TwoWay, Path=IsSelected}" is easy. You add the following: xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase" IsChecked="{Binding RelativeSource={Relat...

WPF - Setting DataContext for a Trigger's setter

I have a DataTrigger that I recently refactored. It used to have the "DataContext" set to be a ListBoxItem. Now it is a ContentPresenter. Here is the code: <DataTemplate.Triggers> <DataTrigger Value="True"> <DataTrigger.Binding> <MultiBinding Converter="{StaticResource DisableWorkItemConverter}"> ...

WPF - Converter hides dependency on a DependencyProperty

I have a TextBlock (acutally a whole bunch of TextBlocks) where I set the Text to "" if a DependencyProperty in my ViewModel is set to Visiblity.Hidden. I do this via a converter as follows: <TextBlock Margin="0,0,5,0"> <TextBlock.Text> <Binding Converter="{StaticResource GetVisibilityOfColumnTitles}" Path="Name" /> ...

Binding R G B properties of color in wpf

I have a custom class, "FavoriteColor" that has three properties, R, G and B. Now I want to draw a rectangle and fill it with these R, G and B values (using databinding). I tried the following snippet in my xaml, but gives me a compile time error. <Rectangle Width="10" Height="10" Grid.Column="4"> ...

How does a Silverlight DataForm auto-generate a binding from a ComboBox to an enum?

I'm trying to understand DataForm as implemented in the November 2009 toolkit and I can't work out how to bind a ComboBox to an enum. Does anyone know how the DataForm does this automatically? Background First I created a class and an Enum, following this article and allowed the DataForm to generate the fields. The DataForm generated...

Checkbox in Datagridview cannot be changed.

I've created a Datagridview bound to a Datatable. This Datatable is updated by a event to reflect statistical information as it changes (sub second resolution). I have a checkbox to determine if a row is available for other functions and can be toggled on and off normally if my eventhandler is not receiving my updates. If my bound Datat...

WPF Setting style based on datatype?

Here's the problem. I'm binding a TreeView with a few different types of objects. Each object is a node, and SOME objects have a property called IsNodeExpanded, and of course, some others don't. Here's my style: <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsExpanded" Value="{Binding IsNodeExpanded, Mode=TwoWay}" /> ...

Resources for creating a Interface Builder

I want to create a web based interface/GUI builder that used a specific set of components to design the layout and workflow across screens. In addition to the layout, I want to do some data bindings with XML data sources. A lot of the IDE's already do that so all I am looking for is resources, articles, or books that could guide me forwa...

How does the Sharpdevelop databindings dialog work?

Here's what I am trying to do: Select TextBox in designer mode. Open advanced databinding dialog via properties panel. What opens up is a dialog where I cannot select anything - there is a list of (TextBox) properties on the left side, each having a little "no parking" icon. The rest of the dialog is disabled. Nothing I can do but hi...

Having .NET control databinding update dataSource fired onChange (as opposed to onUnfocus)?

Hi there, By default, a property bound to a NumericUpDown is updated only when the NumericUpDown loses focus. Is there any way I can make it being updated right away with the displayed value, e.g. when the user clicks the up or down arrow? Thanks a lot for any hints! ...

ASP.NET databinding: how to delete the item

<asp:ObjectDataSource ID="sourceGroups" runat="server" TypeName="Kurs4.Code.GroupDB" SelectMethod="GetGroups"> </asp:ObjectDataSource> <asp:ListBox ID="lstGroups" runat="server" DataSourceID="sourceGroups" DataTextField="GroupName"></asp:ListBox> <asp:Button ID="btnDeleteGroup" runat="server" Text="Delete" ...

DateTime region specific formatting in WPF ListView

In WPF app I have a ListView: <ListView Height="100" Width="434" Margin="0,2,0,0" x:Name="lvItems" ItemsSource="{Binding ElementName=MainWindow, Path=ShowQuCollection}" > <ListView.View> <GridView> <GridViewColumn Header="Date" Width="100" DisplayMemberBinding="{Binding Date}"/> <GridViewColumn Header="Time" Width="100" ...

Binding a combobox's selected item and items list to different properties in wpf

Question: How do you set the binding for a ComboBox's Selected items to one property and the items list to a different property? Info: I have an inventory program I'm working on for my company which is aimed mostly at the people who receive shipments as they come in. I have things set up so that there is a list of shipments on one si...

WPF ListView databinding to ObservableCollection

In WPF app I have a ListView: <ListView Height="100" Width="434" x:Name="lvItems" ItemsSource="{Binding ElementName=MainWindow, Path=ShowQuCollection}" > <ListView.View> <GridView> <GridViewColumn Header="Date" Width="100" DisplayMemberBinding="{Binding Date}"/> <GridViewColumn Header="Time" Width="100" DisplayMemberBinding="{B...

How can I two-way bind a TextBox to a code-behind property in ASP.NET?

I cannot get any new entries in the textbox:txtMyString to set to the property MyString. What am I missing here? <asp:TextBox ID="txtMyString" Text='<%# MyString %>' runat="server" /> private string myString; protected string MyString { get { return myString; } set { myString = value; } } protected void Page_Load(object sender, EventA...

WPF custom control objects databinding to List(T) based on query

In a window of my WPF application I have several hundreds of objects, they based on a custom control. They differ from each other only by name: ... <MyNamespace:MyCustControl x:Name="x4y3" /> <MyNamespace:MyCustControl x:Name="x4y4" /> <MyNamespace:MyCustControl x:Name="x4y5" /> <MyNamespace:MyCustControl x:Name="x4y6" /> <MyNamespace:M...