One of my data sources produces a collection of values which are typed to the following interface
public interface IData
{
string Name { get; }
FrameworkElement VisualElement { get; }
}
I'd like to use data binding in WPF to display a collection of IData instances in a TabControl where the Name value becomes the header of the ...
Hi,
I have a menu where I bind data through:
XmlDataSource xmlData = new XmlDataSource();
xmlData.DataFile = String.Format(@"{0}{1}\Navigation.xml", getXmlPath(), getLanguage());
xmlData.XPath = @"/Items/Item";
TopNavigation.DataSource = xmlData;
TopNavigation.DataBind();
The problem is when my xml has...
My main application form (WinForms) has a DataGridView, that uses DataBinding and Fluent NHibernate to display data from a SQLite database. This form is open for the entire time the application is running.
For performance reasons, I set the convention DefaultLazy.Always() for all DB access.
So far, the only way I've found to make this...
I've got a winform with a BindingSource that has an int property named Opacity in its DataSource. I also have a TrackBar on the winform that I want to use to control the Opacity of the winform.
I've bound the Value property on the TrackBar to the Opacity and that functions just fine, sliding the TrackBar will change the variable from ...
Hello,
I have a grid (DevExpress XtraGrid, if that matters) which is bound to a LINQ to SQL Entity property.
gridItems.DataSource = purchaseOrder.PendingItemsGrouped;
Well, the grid is being displayed properly,and I can see the purchase items that are pending.
The problem arises when purchaseOrder.PendingItemsGrouped gets changed ......
I have below XAML code :
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
WindowStartupLocation="CenterScreen"
Title="Window1" Height="300" Wid...
I have the following XAML, that does all that it is supposed to, except that the MultiBinding on the FontSize fails on retrieving the Users (I see DependencyProperty.UnsetData when I set a breakpoint in the converter). As you can see Users is an IEnumerable<UserData> that is part of the HierarchicalDataTemplate's DataContext.
How do I re...
Hi,
I have a class
public class Foo
{
public List<string> list1 { get; set;}
public List<string> list2 { get; set; }
public string url;
}
and a ListView with two columns
<ListView Name="listview" ItemsSource="{Binding}">
<ListView.View>
<GridView>
<GridViewColumn...
I have this TreeView:
Main Node Header="Main"
Sub Node Header="Sub1"
Final Node Header="Item1"
Final Node Header="Item2"
Sub Node Header="Sub 2"
Final Node Header="Item1"
Final Node Header="Item2"
I have two textboxes that are bound to this TreeView. One has its Text property bound to the TreeView's Selec...
Background
I've got a collection of objects which I want to draw on a canvas. Each of these object has a DateTime property, which determines the position of that object along the x-axis on the canvas. Each object also has some other properties which determine the image that need to be drawn on the canvas. The most important feature t...
I have a combobox where the SelectedValue on the combo is bound to a property on a business object.
Everything works fine, but the property that's bound to the SelectedValue on the combo only gets updated when the focus leaves the control. I understand that the property doesn't get updated until the control is validated (loses focus), b...
I have found this question http://stackoverflow.com/questions/2245928/mvvm-and-the-textboxs-selectedtext-property. However, I am having trouble getting the solution given to work. This is my non-working code, in which I am trying to display the first textbox's selected text in the second textbox.
View:
SelectedText and Text are just st...
Hello all,
I develop the part of app functionality. I have the databinding object 'A' and another object 'B'.
public class SomeProxy
{
public SomeProxy(BindingSource A)
{
var b = new B(A.SomeProperty);
}
}
public class B
{
public B(List<T> somePropertyFromA)
{
SomePropert...
I am new to the MVVM design pattern, and I am working on a project to automate shipping processes.
The particular problem that I am having is I have a UserControl (my EditShipmentView) which when it loads, assigns it's ViewModel to its DataContext. The ViewModel is passed a recordID which it uses to pull the entity that represents a sh...
PLEASE NOTE: I've answered my own question with a link to an answer to a similar question. I'll accept that answer once I'm allowed to (unless anyone comes up with a better answer meantime).
I have a database column defined as NVARCHAR(1000) NOT NULL DEFAULT(N'') - in other words, a non-nullable text column with a default value of blank...
I have a TreeView with a few objects bound to it, let's say something like this:
public class House
{
public List<Room> Rooms { get; set; }
public List<Person> People { get; set; }
public House()
{
this.Rooms = new List<Room>();
this.People = new List<Person>();
}
...
when we bind to heterogeneous collection of objects, not all objects have the same set of properties. in the output window we get a message like:
System.Windows.Data Error: 39 :
BindingExpression path error:
'RoundingFactor' property not found on
'object' ''MultiLineTextMarkingScheme'
(HashCode=7262386)'.
BindingExpression:...
Using Grails 1.2.2, I'm working on binding a structured property (CC expiration Date) to a java.util.Date but only for specific Domain and Commands objects.
I've found the StructuredPropertyEditor interface, but the only way that I've found to register it is to use the PropertyEditorRegistrar and register the editor for the java.util.Da...
Hi stackoverflow,
I'm looking for some kind of workaround for binding a Value in a Storyboard. Thing is, that I need to bind the value in a tag, like this:
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="testelement" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
...
I've been fighting this problem for many hours now and could really use some help :-)
This is the grid
<asp:GridView ID="annonceView" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="dataSourceAnnoncer">
<Columns>
<asp:BoundField DataField="Productname" HeaderText="Productname" />
...