I have a listbox to which I have bound the data context to an object. This object has a number of properties some of which will have a particular attribute.
What I want to do from this is to have the items source set to the properties of the object but to only display those properties that have a particular attribute set.
Can anyone he...
As far as I know, INotifyPropertyChanges was "invented" before WPF. Could someone please explain what is new in WPF that allowed to do different kinds of binding properties of the control to the properties of objects.
Either this was also available in the WinForms but wasn't so popular due to some reasons? (if yes, what is that reasons)...
I have a really weird situation with dependent comboboxes and I am about to pull my hair out!!
I have 3 Comboboxes that display data from the selected item in a listview for editing. The DataContext for the UserControl is the Same as the Listbox.
When I go select different items on the listbox the data in the 2nd and 3rd combo gets r...
If I set a StackPanel or what ever bound area I have as 'Collapsed', does the data load?
Will it trigger its Loaded event?
...
Pretty simple task, but the source code doesn't do required job... Please advise.
There is Products collection in the class (approach is based on the MVVm pattern, but that is not influe on the current issue):
public class ProductWindowViewModel : WorkspaceViewModel // implements INotifyPropertyChanged
{
public ProductWindowViewMod...
Hi , i have the following piece of code, that for some reason that i'm unaware of, doesn't populate the LINQ resultset to the listbox (and there are many results in this list), however, i bind it to the original datatable, it works well. any ideas:
DataTable t = _partitionsDataSet.Tables[0];
var customizedPartitions = ...
I have a domain object with a setter method that takes in a map of id, value pairs. This is not just a plain association, and this setter method has some login in it. For example:
class DomainObj{
def setTheMap(map){
//do stuff with the map
}
}
I have a form where the user can type in a value for each id. My goal is that when ...
I am building a plugin which matches an element, finds a link within it and makes the parent element go to that location upon a click.
I have a loop in the main body:
return this.each(function(options)
{
$to_link = $(this); //matched object
link_href = $('a', $to_link).attr('href'); //link location
$($to_link,$parent)...
Hi Guys,
It's hard for me to clearly describe my problem but I'll try. I have a UserControl1 which contains UserControl2 which contains several WinForms controls (most of them DevExpress). I do simple binding to these controls to my datatable fields. So far everything works fine. When I move the focus to a record in the table (by naviga...
Hi
I have the following listbox template within a WPF Page
I want the search button to only be enabled when a checkbox in the listbox has been checked.
I am using the MVVM and have a seperate commands class
Unfortunately the Canexecute method for my Search button is not being fired
Mycommand is defined as
public static readonly Rou...
Hi everyone,
I am having an issue with the xaml parser not liking my binding statement but i cannot see anything wrong with the statement.
Invalid attribute value {Binding VehicleSpeed, ConverterParameter={Binding InMiles}, Converter={StaticResource SpeedConverter}, Mode=TwoWay} for property DataMemberBinding
VehicleSpeed and InMi...
I'm trying to write some wrapper class or function that allows me to execute some code before and after the wrapped function.
float foo(int x, float y)
{
return x * y;
}
BOOST_PYTHON_MODULE(test)
{
boost::python::def("foo", <somehow wrap "&foo">);
}
Ideally, the wrapper should be generic, working for functions and member fun...
Sorry - my question is almost identical to this one but since it didn't receive a viable answer, I am hoping that someone else has some fresh ideas.
I have a WPF TreeView that is bound to a hierarchy of a single type:
public class Entity
{
public string Title { get; set; }
public ObservableCollection<Entity> Children { get; set...
I'm getting to the point in a WPF application where all of the bindings on my controls are getting quite repetitive and also a little too verbose. Also if I want to change this binding I would have to change it in various places instead of just one.
Is there any way to write the source part of the binding once such as in a resource and...
I created a custom ComboBox as follows: (note, code is not correct but you should get the general idea.) The ComboBox contains 2 dependency properties which matter: TitleText and DescriptionText.
<Grid>
<TextBlock x:Name="Title"/>
<Grid x:Name="CBG">
<ToggleButton/>
<ContentPresenter/>
<Popup/>
</Grid>
</Grid>
I want...
I am binding a checkbox to a property on a control. Everything is fine, but I need to bind the checkbox to another property, and the value needs to be the opposite of chkbox.checked.
BindingUtils.bindProperty(obj, "propertyBool", checkBox, "selected");
I need something like this...
BindingUtils.bindProperty(obj, "propertyBool", chec...
Hi,
I'm something of a WPF noob so please take it easy on me ;-)
I am trying to create a grouped DataGrid (WPF toolkit version).
I have successfully created the data source, the DataGrid itself, the required CollectionViewSource and the Style for the group header (which uses an expander).
I want to group by a property called 'Assign...
I have been playing with bindings in silverlight, and have figured out how to bind in code, but would prefer to keep the binding in the XAML.
This is the code that works in my .cs file:
System.Windows.Data.Binding IDBinding = new System.Windows.Data.Binding("ID");
IDBinding.Source = MyTrans;
IDBinding.Mode = S...
I have a question about data binding DataGrid in WPF. I am using the VS 2010 Beta 2 which has its own DataGrid, not the Toolkit one, although I think it is pretty much the same.
I want to bind to a dataset which has 52 columns, one for every week of the year. For this reason I want to bind the data dynamically rather than specifying eac...
Hi there,
I want to bind some properties from my code-behind .xaml.cs to some xaml-code, just like this:
<TextBlock [someProperties] ... Text="{Binding ElementName=awesome, Path=value}" />
<TextBlock [someProperties] ... Text="{Binding Path=legendary}" />
In the associated .xaml.cs file I have the property:
public String legendary =...