I work for an Architecture firm and I am creating a plug-in for a 3D modeling program to assist design. I have a Building class, and a Floor class. The building contains a reference to a FloorList collection of floors. I'm trying to figure out what to base the FloorList collection off of so that I can minimize the amount of work I need t...
Hi,
i have problem to correctly bind data to WPF Chart. When i'm setting ItemsSource i get error:
Assigned dependent axis cannot be used. The data may not be able to be rendered on the provided axis or the series may require that they axis has an origin.
oc = new ObservableCollection<Pair>();
heartBeats.ItemsSource = oc;
to P...
In my XAML Code I have bound the Height property of an control to the ActualHeight for it's parent control. Because I have to calculate an offset from the original value I use and IValueConverter.
Height="{Binding ElementName=MainCanvas, Path=ActualHeight, Converter={StaticResource adjustVerteilung} , ConverterParameter= 12}"
This wor...
I have a usercontrol (ItemsView) that I use in one of my other view. Since I need to access its ViewModel, the ItemsViewViewModel is contained by the ViewModel of the view that contained the control. I use this control at many times and I find it useful to bind a collection on the ItemsSource of my ItemsView control (differently, dependi...
hi All,
when I bind a property in the child viewmodel to a textbox, the source won't get updated no matter what mode i set on the binding.
the xaml code is like this:
<TextBox Text="{Binding Path=OrderDetail.CashPaid, Mode=TwoWay}"/>
when the view loaded, the binding system query the CashPaid property once. but whenever the text is...
Yesterday while looking for a totally unrelated topic I came across the "PropertyPath XAML Syntax" MSDN page (http://msdn.microsoft.com/en-us/library/ms742451.aspx) and saw the "Single Property, out of XAML Loading Namescope, Run-Time Reflection" header (near to the middle of the page). Even though I have been programming WPF for years n...
I would like to add some methods to a class definition at runtime. However, when running the following code, I get some surprising (to me) results.
test.py
class klass(object):
pass
for i in [1,2]:
def f(self):
print(i)
setattr(klass, 'f' + str(i), f)
I get the following when testing on the command line:
>>> impor...
I have a DataTemplate that I'm using as the CellTemplate for a GridViewColumn.
I want to write something like this for the DataTemplate:
<DataTemplate
x:Key="_myTemplate">
<TextBlock
Text="{Binding Path={Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type GridViewColumn}}, Path=Header}}" />
</DataT...
hi,
I created a custom control that internally is using BindingList to keep track of Account objects that are displayed in some custom grid. I want to add a DependencyProperty to my control that will expose set/get for List that will allow me TwoWay binding between my control and data model. I want to be able to set that list to initial...
I started to investigate beans binding and my head is starting to spin. There are so many options, but it's a central design decision that sounds hard to change. I have a set of interrelated POJOs that I want to edit with a GUI. What is my best option for a stable, simple deployment? If there's not one good solution, do these options...
Hi guys,
I just ran into a strange binding problem. In the mini app below, the Flex Label component is updated when 'someText' changes, but my boundSetter won't be called after the first, initial call.
In short: Why is the boundSetterForSomeText() function not called, while the label does update?
Could anybody please shed some light o...
I'm using MVVM in my WPF application.
I have a Window that has a view inside it. In that view a value can be changed and I will bind it to a TextBox in my main Window:
<TextBox
Text="{Binding Path=myViewModel.MyValue">
</TextBox>
Now I would need to bind this myViewModel.MyValue to a property inside my main window view model, so t...
Hi,
I'm databinding a listbox to an object that contains two array of strings. Each listbox item is set to a data template made up of a textbox and a combo box. The first string array is bound to the list, and the second string array is bound to the combo box. Well, at least that's I'm trying to achieve. The problem is that I can't figu...
Hello.
I use this:
<TextBox x:Name="Test"/>
<TextBlock Text="{Binding SelectionStart, ElementName=Test}"/>
but it always shows 0.
How can I treat it?
Thank you.
...
Hi ,
I am reading data from an excel sheet and displaying it in a data gridview.There are some date columns in the excel.So when i read the data from the excel and bind it to the dataGridView.The date is displayed in the format "02/02/2009 12:00:00 AM" but the actual data in the excel column is in the format "2/2/2009".So how to ...
Hi,
I have a piece of WPF/C# code that uses several Bindings:
A combobox is used to select an Account
The itemssource property of a second combobox is bound to the selected Account. This second combobox is used to select a Contact
The itemssource property of a grid is bound to the selected Account. This grid contains the selected Acco...
If I have a list object I know that I can bind class property fields to form using the code below.
<c:forEach items="${items}" var="i" varStatus="itemsRow">
<input name="items[${itemsRow.index}].fieldName" type="text"/>
</c:forEach> <form:errors path="items" />
What do I do if the property is a Set object. I have read about initBin...
Hi everyone,
I have nested groupboxes, which logically represent nested data structures in my application. Let's say i have a structure like this:
Dev1
- CDev1
- CDev2
- ICDev1
- ICDev2
I have checkboxes to enable/disable each of these Devs. I want to bind the CheckState of the child checkboxes to the parent checkbox'...
Hey atAll!
Often found answers here, but now it`s my first time ;)
We use the MVVM pattern in conjunction with DelegateCommands. So normally I bind a command to the button like this:
<Button Command="{Binding SetXYZActivatedCommand}" />
I need to execute different commands when the button is pressed and when the button is released a...
I've got two combo's 'Make' and 'Model', they've got their SelectedValue properties bound to an Vehicle object with a ModelID and a MakeID.
Heres Model ...
<ComboBox DisplayMemberPath="Description" ItemsSource="{Binding Path=ModelSpecs}" SelectedValue="{Binding Path=Vehicle.ModelID}" SelectedValuePath="ID" />
A user can search for Ve...