In the following example I bind the XAML to a static object via ObjectDataProvider.
When the user changes information, I want it to automatically reflect in the XAML.
What I don't understand is:
how do I perpetuate the object? do I have to create a singleton? in the click event, how do I access the "object that is being edited"
eventu...
Trying to determine if it is possible to bind the SelectedValue of a ComboBox to the inputs of multiple ObjectDataProviders with XAMAL Bindings.
I looked at MultiBinding but that appears to be grouping multiple controls together, not exactly what I'm looking to day.
I'd like to be able to have the ComboBox (locations) change the TextBl...
I am trying to bind a list box to a collection. The problem is that the collection can change, but the collection doesn't implement IObservableCollection. What is the best way to force the binding to refresh?
...
Hi,
I have two observeable collection both set to a class of properties. I am needing to combine both of those collections into one listbox. I have looked up at the Compositecollection class but it is not what I need. Ideally, I want the listbox to look like this...
Think of this as a listbox control and each listbox item contains obj...
I want to simulate data changing in the model and having that data be reflected in XAML. As I understand I need to implement INotifyPropertyChanged.
However, in the following code example, XAML displays the data from the customer only once but the date and time never changes.
What do I have to change in the following example to make X...
This should be simple enough, and I blame this primarily on my inexperience working with DataLists, Repeaters, etc.
I have a DataList control which I am using to display the items in a shopping cart. Everything is going along fine with my binding of the different controls using Eval("ColumnName") until I get to the price column.
My goa...
This one is driving me crazy. Here's the XAML:
<UserControl x:Class="SilverlightApplication1.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel HorizontalAlignment="Left" VerticalAl...
I have a TextBox that is bound to a Text-property on an Entity-object.
I'd like to be able to re-format the text the user enters in some circumstances - e.g. if the user enters "2/4" (a fraction) - I'd like to change that to "1/2".
Via the “set-part” of the Text-property, I can change the value on the Entity-object, but that doesn't app...
I am binding an Image's Source property to a URI string property on the model:
<Image Validation.ErrorTemplate="{StaticResource validationTemplate}">
<Image.Source>
<Binding Path="LargeImage.ImageUri">
<Binding.ValidationRules>
<ExceptionValidationRule/>
</Binding.ValidationRules>
</Binding>
</Image.Sourc...
The exception is throwed by database caused a conflicting by FOREIGN KEY.
...
I have a simple static class with a few methods in it. Each of those methods open a SqlConnection, query the database and close the connection. This way, I am sure that I always close the connection to the database, but on the other hand, I don't like to always open and close connection. Below is an example of what my methods look like.
...
There seem to be two main ways to define DataContext in WPF:
either in code like this:
App.xaml.cs (taken from the WPF MVVM Toolkit template):
public partial class App : Application
{
private void OnStartup(object sender, StartupEventArgs e)
{
// Create the ViewModel and expose it using the View's DataContext
...
If I have a List < Person > where person is defined by the class
class Person
{
string Forename
{
get;set;
}
string Surname
{
get; set;
}
}
And I bind it to an asp repeater control that looks like this:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<asp:Label ID="lblForename" ru...
Related to my previous question: http://stackoverflow.com/questions/855519/binding-combobox-selecteditem-in-silverlight
I have a ComboBox bound like so:
<ComboBox x:Name="PART_CommentaryList"
HorizontalAlignment="Left"
Margin="3"
ItemsSource="{Binding Path=CurrentVideo.Commentaries}"
SelectedItem="{Binding Path=Curr...
I am looking for a datepicker like what microsoft provides, but it doesn't support null values, and since this is tied to a nullable field on a database that isn't acceptable.
I found this one, but according to the comments at the bottom of the page it has issues with binding to a database. I also have one in my project that I inherited...
I have a binding source and it has a column called Description and I want to exclude all rows that have their description set to 'x'.
I have tried:
bindingSource.Filter = "Description != ' + x;
That doesn't work. Does anyone know how to do a is not comparison for the binding source's filter? I couldn't find any help on MSDN.
...
Hello,
While it is trivial to store a checkbox's checked state in a variable using the checkbox's Click event, how would I do it via databinding? All the examples I have found have the UI updated from some datasource, or bind one control to another; I want to update a member variable when the checkbox is clicked.
TIA for any pointers....
I have a series of TextBlock and TextBox controls. Is there a way to apply a Style to the TextBlocks such that they can databind to the control immediately after them?
I'd like to be able to do something like this:
<Resources..>
<Style x:Key="BindToFollowingTextBoxSibling">
<Setter Property="TextBlock.Text" Value="{Bindi...
I have a winforms application that i added a DataGridView bound to a subsonic collection via a BindingSource to it.
The grid works fine for adding/editing (except for the display of the ComboBox column) but i can't get it to delete rows correctly from the database.
If i delete a row from the DataGridView, i can't problematically determ...
What types can I bind to the ItemsSource property of the DataForm control in the Silverlight 3 Beta and automatically get the Add and Delete buttons to show on the control?
I am making an application with RIA Services. I do have working add and delete methods in my domain service.
I bound an EntityList of Contacts from the DomainContex...