I have a TabControl that is data bound to a list. (Two data items in the list)
The TabControl has a DataTemplate which contains two TextBox controls bound to two string properties on my data class.
If I type some text on Textbox1 on the first tab and then click onto Tab2, no update is made to the data source and the change is lost.
Thi...
Hi,
I am using Silverlight 3 to develop an application. In my app, I have a layout Grid (named "LayoutGrid") in which I have a DataGrid (named "PART_datagrid") with DataGridTemplateColumns. The LayoutGrid is set a DataContext in which there is a Ladders list as a property. This Ladders list is set as the ItemsSource for the PART_datagri...
I have an ASP.Net MVC Controller with a 'MapColumns' action along with a corresponding ViewModel and View.
I'm using the defaultModelBinder to bind a number of drop down lists to a Dictionary in the ViewModel. The view model also contains an IList field for both source and destination columns which are used to render the view.
My quest...
How is data binding in C# WinForms supposed to work when you have a Save button? I don't want the data updated until I press Save!
I have two forms (list and detail) backed by a BindingList<T> collection and my custom object from that collection, respectively. I can bind each form to the list or object appropriately. However, any change...
I want to load key/values configuration pairs stored in XML file. To bind a collection of data i know i need to use the ArrayList class, but the problem is that i want to be able to bind the loaded values using their corresponding keys and not by their indexes in the ArrayList object.
For example i want to be able to do this :
<mx:Tex...
I am coming from Flex where you can do just about anything inside of curly braces. I am trying to get a TextBlock to display today's Date and Time without just coding it in C#. I have tried many different variations of the following with no luck.
TextBlock Text="{Source=Date, Path=Now, StringFormat='dd/MM/yyyy'}"
I know I could probab...
I have a listbox and its bound. and i have tooltip on listbox item sometihng like this
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<!--<EventSetter Event="MouseEnter" Handler="ListBox_MouseEnter" />-->
<!--<EventSetter Event="MouseEnter" Handler="ListBox_MouseLeave" />-->
<Setter Property...
Why this works
<myToolTip:UserControl1>
<TextBlock Text="{Binding Path=TestString, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type myToolTip:UserControl1}}}"/>
</myToolTip:UserControl1>
BUT this does not
<myToolTip:UserControl1 x:Name="userControl">
<TextBlock Text="{Binding Path=TestString, ElementName=userCo...
Is it possible to set a connection parameter on a connection to SQL Server and have that variable persist throughout the life of the connection? The parameter must be usable by subsequent queries.
We have some old Access reports that use a handful of VBScript functions in the SQL queries (let's call them GetStartDate and GetEndDate) tha...
I have a group of borders that make up a small map. Ideally I'd like to be able to bind the border's background property to a property in a custom list and when that property changes it changes the background. The tricky thing is, I have to do this in code behind. Could someone point me in the right direction?
Thanks.
...
I have a list of objects in a model. I wish to show elements of the DTO's in the list in my AccordianItem panels. The model is like this:
public class MyModel
{
public List<AnimalDTO> Items { get; set; }
public MyModel()
{
Items = new List<AnimalDTO>
{
new AnimalDTO...
I wonder, how to create this binding, since Line.X2 IS NOT dependency property! :(
<Line Y1="0" X1="0" Y2="0" Stroke="Blue" StrokeThickness="3" Margin="0 -2 0 -2" X2="{Binding Path=RenderSize.Width, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel}}}"/>
...
Hi!
I'm trying to resolve a name clash in a wsdl2java mapping with CXF 2.2.6 The relevant wsdl snippets are:
<types>...
<xs:schema...
<xs:element name="GetBPK">
<xs:complexType>
<xs:sequence>
<xs:element name="PersonInfo" type="szr:PersonInfoType" />
<xs:element na...
Hi ,
I am currently using jquery chain to bind html controls with JSON output.
I have a few elements in my that I have to bind events on. Since these elements come within the scope of the the JQuery's root I observer that none of these bindings were working , then I figured out the builder in the hash that jquery chain takes in as a pa...
Hi,
I am trying to migrate a Java application built by Ant to Maven2. among other the build perform the following operations:
1) Running a javadoc doclet to find annotated Java files to be externalize later as web services
2) compile a small part of the code for step 3
3) run Axis java2wsdl on the compiled code from step 2
4) produce j...
Probably a simple question but:
How do I programmatically change the color of an ellipse that is defined in XAML based on a variable?
Everything I've read on binding is based on collections and lists -can't I set it simply (and literally) based on the value of a string variable? string color = "red" color = "#FF0000"
...
Where can I find some good documentation on data/element binding? My Google searches haven't turned much up. I had a custom class with two properties named Text and Value. When I tried binding a list to a listbox it wouldn't work. By chance I modifed my datatemplate from this
<TextBox Text="{Binding Text}"></TextBox>
to this
<TextBox...
Hello,
I have a strange "problem". Could someone explain me why :
If I have in an ObservableCollection, twice (or more time) an item with the same value, then the selections of those values in the ListBox won't work properly ?
In fact, what the ListBox is doing when I click on an item(Even in single item selection) : It selects the fi...
Below is the code to recreate the problem I'm having, the ComboBoxItems with TextBlock content, do not render correctly when bound to. Mousing over the ComboBox corrects the issue. So I have 2 questions. Why does the mouse over fix it? How do i have it correctly work with out the mouse over being required?
MainWindow.xaml
<Window x...
Hello,
I develop an application in WPF using the MVVM pattern.
I am displaying an oriented graph, with nodes and links (see following picture).
http://free0.hiboox.com/images/1110/diapo1c36a4b95802846b8553d2fe9b9e6639.png?26
The user can drag and drop the nodes from one "cell" to another. When the user drops a node, its position is ch...