If I have something like this:
<asp:Repeater DataSource='<%# new List<string>() { 'Tom', 'Dick', 'Harry' } %>' Visible='<%# DataTime.Now.Days == 1 %>' runat="server">
How does .Net determine the order of binding? In that example, it needs to bind twice -- it has to bind the List and the boolean from the expression to a Repeater...whic...
when do i use each of the following?
{Binding ElementName=...}
{Binding Source=...}
{Binding ... Path=...}
<TextBox DisplayMemberPath=...}
// and i think i saw something like ...
{Binding xxx}
i also wonder if there are any other ways of data binding i need to be aware of? i am new to C#/WPF
...
I have a main mxml file (flex4) and want to pass a parameter (user_name) to a component in a directory called components.
When I run the program, the user_name is NOT being sent from the main to the component file.
(Interestingly, if you make the component visible, you can see the parameter has been passed)
New to flex/actionscript and...
I am working on WPF project. I create a usercontrol containing a combobox; which represent boolean value(True or false). And I register a DependencyProperty 'Value' for my usercontrol.
Whenever combobox selection was changed, I will update the 'Value' property and also when 'Value' property is update I will update combobox.
But I found t...
Ok, so I've got this Visual Studio 2008 Project I was working with about a year ago perhaps.
And this project had a datagrid that was linked to an external database running on a server off the internet. Now, this databinding was all done using Visual Studio 2008's built in features. But how can I now change the binding to a different se...
I have a list of object and want to bind for display purposes to a list of custom controls.
XAML code:
<Pages:MyItemsControl ItemsSource="{Binding SquadFieldPlayers}">
<Pages:MyItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas Height="180" Width...
Flex 4:
I have an issue with dual binding 1067: Implicit Coercion of value of type String to an unrelated type int
I have a custom component "Experience":
Experience {
var years:int;
var months:int;
}
Please help :)
...
Let's say I have a datagrid with itemsource binded to property Collection, which is for example IEnumerable. Of course I wrote appropriate getter and setter for it.
Now, when I assign to this property (Collection) just IEnumerable (as the result of some method), like:
Collection = FooMethod(); // FooMethod returns IEnumerable<MyClass>
...
Hi,
I want to bind datagridview in windows application with dynamically changed datatable.
I have windows form with two textboxes, one for connection string with sql server and the other for sql query string. I just want to display data in datagridview in order to see data. I don't need anything fancy, just to read result of sql query....
So I am using ViewModels to pass data from/to the web forms in my MVC application, as seems to be recommended practice from what I have read.
My question is what is the normal approach to then map the ViewModel into an actual domain entity?
I'm guessing I should probably add a 'GetObject' method to my ViewModels so I have something lik...
What would be the best practice to save information for about 30 TextBoxes in a in-memory database such as a dataset. I want it to be easy to modify in case we need to add or remove information parsed. And make sure that it's easy to update this information from my Parser class to the actual Forms or User Controls.
I also want to make ...
I would like to make a (very lightweight) 2-way binding datastore. Values must be accessed via names. I was thinking of using 2 arrays:
public class MyBindingDatastore{
public string[] _names = new string[]{"Field1", "Field2", "Field3"}
public object[] _values = new object[]{ DateTime.Now, "MyValue", 1}
}
First array is used t...
Using SilverLight, one can bind the value of a control to a property from a datacontext. That's fine.
It is possible to use StringFormat along with the binding declaration to format the value. Again, that's cool!
However, I can't find a way to have the binding with some operation done to it before it gets displayed. I know I can code a...
Hi,
I'm working on an application that has a large domain - i.e. Customers, SalesOrder, Suppliers, Products, Stocks etc. - and have discovered that the WinForms data binding is a little too restrictive for what I need.
Is there a useful design pattern for setting up the populating of forms and updating of the underlying data?
Thanks
...
Hi!
I have observable collection with some items.
/// <summary>
/// The <see cref="Items" /> property's name.
/// </summary>
public const string ItemsPropertyName = "Items";
private ObservableCollection<SomeItem> _items = new ObservableCollection<BrandItem>();
/// <summary>
/// Gets the Items property.
///...
I have a List<ColumnList> ColumnListLists which has a binding source (bsLists) attached to it. ColumnList has a List<Column> inside of it. I have a binding source attached to the current of bsLists pointing at that inner list.
Confused yet? here is some code that may help.
public class ColumnList
{
...
public string Name { ge...
I've some simple code below that uses a ToggleButton.IsChecked property to set the Visibility of a TextBlock. It works fine. Since this doesn't quite fit in with my program's structure, I'm trying to bind the visibility of another TextBlock to a DependencyProperty of "this". It compiles fine, but it produces no effect. I'm doing some...
I have a ComboBox like this:
<ComboBox IsEditable="True"
ItemsSource="{Binding SelectableValues}"
SelectedValue="{Binding SelectedValue}" />
SelectableValues is a list of double and SelectedValue is a double. If the user chooses a value from the list or manually enters one of those values, my SelectedValue propert...
Hi, I'm binding an Image control to a value set at runtime, but I want to set the FallbackValue to a resource named "checkerboard.png".
As Converters aren't applied to FallbackValues I need to use the Pack notation, which leaves me with the following XAML:
<Image x:Name="imgButton"
Height="{Binding Path=Height}"
Width="{Bindi...
i have a listview that is bound to a datatable(not using any custom object to represent the fetched data). How do i create a view so that i can filter,sort the collection. (i tried google and the samples i found were using objects(eg:product) to create views)
sample code:
Private Sub ShowOnlyBargainsFilter(ByVal sender As Object, ByVa...