databinding

WPF tree data binding model & repository

Hi, I have a well defined tree repository. Where I can rename items, move them up, down, etc. Add new and delete. The data is stored in a table as follows: Index Parent Label Left Right 1 0 root 1 14 2 1 food 2 7 3 2 cake 3 4 4 2 pie ...

How to bind a control boolean property to contrary of boolean application setting?

How to bind a control Boolean property to contrary of Boolean application setting? For example I want to bind "Visible" property of a button to "!Flag", that "Flag" is a Boolean field in application settings. ...

Binding properties in code behind

I have WPF application and a window in it. Lets have something like this in my xml: <Label Name="TitleLabel" Content="Some title" \> <Label Name="BottomLabel" Content="{Binding ElementName=TitleLabel Path=Content"> Lets say I don't cannot use xml for creation of BottomLabel and TitleLabel. So I have to create the BottomLabel as a prop...

What is it about DataTable Column Names with dots that makes them unsuitable for WPF's DataGrid control?

Run this, and be confused: <Window x:Class="Fucking_Data_Grids.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <StackPanel> <DataGrid Name="r1" ItemsS...

Databinding and Lists in instances of classes

I have initialised an instance of a class i have called "Relation" this class also contains a list of "Bills". When i databind this information to a grid, the Relations are showing, tho the Bills ain't. The Relation information is returning in a List and the Bills are inside. Relation cRelation = new Relation(); List<tRelation> relation...

Custom progress bar label text via binding

I was playing with progress bar customization in Silverlight application. What I want to reach is to have progress bar label to show current its state in the following format: "Value / Maximum". So, user will see what is the current value, and what is the maximum possible value. Here is a style for progress bar I use: <Style x:Key="Prog...

WPF Databinding INofitfyPropertyChanged problem with nested types

We have a datasource that has a multiple nested classes. In general, there's a datastore which represetns a calendar year. It contains a collection of months, and each month contains a collection of days. Now, the problem is that we have a dozen or so properties that calculate total horus and what not for a month, half a year, and the en...

WPF Data Binding won't work

Hey, I have got an UserControll with a DependencyProperty called "Risikobewertung" whitch has the own Datatype "RisikoBewertung"(Datatype created by LINQ). So in my Controll I try to bind the Fields of RisikoBewertung to the TextBoxes on the Controll, but It won't work. I hope you can help me, and tell me why ;) Code: UserControl.xaml...

Is it me, or does databinding suck?

I could easily be wrong, but when I see databind I think of code that is quick to develop and inflexible and often ugly, e.g, embedding <% %> tags in html. O ...

bind the datasource to gridview in javascript

How to bind the datasource to gridview in javascript? ...

WPF - Dynamically access a specific item of a collection in XAML

Hi, I have a data source ('SampleAppearanceDefinitions'), which holds a single collection ('Definitions'). Each item in the collection has several properties, including Color, which is what I'm interested in here. I want, in XAML, to display the Color of a particular item in the collection as text. I can do this just fine using this co...

BindingSource1.current methot not working

i am using vb.net under .net compact framework for windows ce platform. i want to add a new record with bindingsource object. but when i used bindingsource1.current("field")="value", it says error and error description is "The targeted version of the .net compact framework does not support latebinding" how can i add a value to field usi...

XXXX does not have a naming container... asp.net

I am working with a 3rd party datagrid (Janus Grid for ASP.Net) and I have the following exception caused when trying to bind the control to my data source: The GridEXDropDown control 'grdLocationHistorydd0' does not have a naming container. Ensure that the control is added to the page before calling DataBind. The Janus gr...

How can I make a WPF TreeView data binding lazy and asynchronous?

I am learning how to use data binding in WPF for a TreeView. I am procedurally creating the Binding object, setting Source, Path, and Converter properties to point to my own classes. I can even go as far as setting IsAsync and I can see the GUI update asynchronously when I explore the tree. So far so good! My problem is that WPF eage...

WPF binding fails with custom add and remove accessors for INotifyPropertyChanged.PropertyChanged

I have a scenario which is causing strange behavior with WPF data binding and INotifyPropertyChanged. I want a private member of the data binding source to handle the INotifyPropertyChanged.PropertyChanged event. Here's the source code: XAML <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="htt...

What am I doing wrong with my ItemsControl & databinding?

I'm reworking my simple hex editor to practice using what I've recently learned about data binding in WPF. I'm not sure what I'm doing wrong here. As I understand it, for each byte in the collection "backend" (inherits from ObservableCollection), my ItemsControl should apply the DataTemplate under resources. This template is just a text...

WPF bind IsEnabled on other controls if a listbox has a select item

I have a grid with 2 columns, a listbox in column 0 and a number of other controls in the a secondary grid in the main grids column 1. I want this controls only to be enabled (or perhaps visible) if an items is selected in the listbox through binding. I tried on a combo box: IsEnabled="{Binding myList.SelectedIndex}" But that does n...

How come nobody wrote RadioMenuItems class for Winforms?

Or maybe google is just not so friendly to me? What I want is this simple thing: constructor that accepts an array of menu item objects Value get/set property that would set all the Checked properties right bind to all Clicked events of the supplied items and provide One event Working DataBind facilities If you encountered such a n...

set label value in vb.net

Hi-- I'm usually a PHP guy but got stuck doing a project in vb.net. I have a query (sqldatasource) that returns a single value (the last update date). I want to use a label to say something like "Last updated: " < Label = (returned value) > In PHP this would be simple. In vb.net, all I can find are endless badly written code behinds s...

Bind the value of a parameter in an ObjectDataProvider in WPF

I would like to be able to be doing this : <ObjectDataProvider x:Key="dataProvider" ObjectInstance="uiRoot:App.Current.Controller" MethodName="GetMyViewModel"> <ObjectDataProvider.MethodParameters> <system:Int32>{Binding Id}</system:Int32> </ObjectDataProvi...