Hi,
i'm new in WPF so it's possible, that i make some mistakes. I'm trying to bind two ListBoxes
<ListBox Margin="8,12.07,0,8" SelectionChanged="lbApplications_SelectionChanged"
Grid.Row="1" x:Name="lbApplications" Width="267.914" HorizontalAlignment="Left"
ItemsSource="{Binding Path=Applications, Upd...
Hello all,
My question is, would you implement the Observer pattern, or use databinding to do the following:
At the moment, i'm initializing a list of GuiDataObj. When an event is triggered, I look up the GuiDataObjById and then modify the object, which is databound to a GuiElement; which updates the GUI.
There are several GuiElement...
I have been trying to use declarative data bound ASP.NET, and struggling with the "magic" that goes on behind the scenes.
How do I do get this to work in ASP.Net 2.0. This is inside a data bound FormView control.
<asp:Label ID="RecipientsLabel" runat="server"
Text='<%# String.Join("; ", Eval("HtmlEncodedRecipients")) %>'>
</asp:L...
I have a list (see below) contained in a window. The window's data context has two properties, Items & AllowItemCommand.
How do I get the binding for the Hyperlink's Command property needs to resolve against the window's DataContext?
<ListView ItemsSource="{Binding Items}">
<ListView.View>
<GridView>
<GridViewCol...
I continue my understanding of MVVC with the code of MSDN and I have a question.
In the .xaml they have a list of commands displayed to the screen.
<Border
Grid.Column="0"
Style="{StaticResource MainBorderStyle}"
Width="170"
>
<HeaderedContentControl
Content="{Binding Path=Commands}"
ContentTemplate...
public class Meh : DependencyObject
{
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty", typeof(string), typeof(Meh));
public string MyProperty
{
get { return (string)GetValue(MyPropertyProperty); }
set { SetValue(MyPropertyProperty, value); }
}
}
Now...
Hi SO,
I have this code-behind that checks each item in a repeater when it is databound to see if the author/date are empty (either no author/date, or the system is set to not display them) so that way I can clear out their respective labels. This is so I dont get something like "Posted By on" when there is not author and/or date specif...
I realize this is kind of a long question, but I saw no other way here than to post my code, that I tried to keep as short and simple as possible for the sake of clarity. Of course tons of best practices are violated to do so, the example is long enough as it is..
I made a very simple wpf app that
shows a list of Persons on the left ...
How do i stop the header template of a repeater from displaying when there are no items in the datasource
<asp:Repeater ID="TabsRepeater" runat="server" DataSource='<%#Eval("OrderedChildNodes") %>'>
<HeaderTemplate>
<ul class="child">
</HeaderTemplate>
<Item...
I have a Repeater that is databound to a SQL database. To access the information I do the following:
string Author = (string)DataBinder.Eval(e.Item.DataItem, "Author");
There are other properties (expressions? as intellisense puts it) that I need to access, but I am unsure of what their names are. Can I loop through the e.Item.DataIte...
I have observed some unexpected or at least not-perfectly-matching-my-needs behaviour of textboxes bound to textproperties when I can't use using UpdateTrigger=PropertyChanged for my binding. Probably it is not an issue with the textbox but will occur with other editors as well.
In my example (source code attached), I have a WPF TabCont...
We've got a Silverlight application with several listboxes and comboboxes that display data sorted incorrectly, which I need to fix. Most of their ItemSource properties are set through XAML. Their DataContext may not be set directly on the control, and instead were set on a parent. So I can't easily slap an "OrderBy" on the ItemSource or...
I am attempting to bind a ListView control to a DataTable, but the WPF binding system seems to be complaining about the binding path I specify.
As an example, a GridViewColumn is defined as follows:
<GridViewColumn Header="ColumnTitle" DisplayMemberBinding="{Binding Path=/, Converter={StaticResource myConverter}}"/>
As far as I under...
It appears that I have been using asp.net databinding for so long I have forgotten some of the basics.
I am dynamically creating a table in an ASPX page without databinding.
foreach (XXX x in TTTT){ %>
<tr>
<td><%=x.val %></td>
<asp:ImageButton runat="server" CommandName="uiImgResolve_Click"
...
I am trying to databind my entity object to a WinForms treeview control but not really having much luck. I have an entity "Person" and I have bound the treeview to the surname of the person which has automatically created a "personBindingSource". In the load event of the form I am calling:
ObjectQuery<Person> orderQuery = context.People...
Possible Duplicate:
Using ASP.NET Controls without databinding
My previous question yielded few results so I thought I would reword the question and try again.
foreach (XXX x in TTTT){ %>
<tr>
<td><%=x.val %></td>
<asp:ImageButton runat="server" CommandName="uiImgResolve_Click"
Co...
Hi,
I want to implement a view which contains a datagrid. When entering oder editing data a cell should provide a dropdownlist (or autocompletebox not sure yet).
But I want to do it MVVM style...
From the MVVM perspective I have a ListViewModel and a RowViewModel.
And the ListViewModel contains a ObservableCollection Rows.
My RowViewMod...
What I need to accomplish is a ComboBox that shows People. When you expand the drop-down it shows FirstName and LastName, but when you select a person, the value shown at the combobox should be just the person's first name.
I have the following ItemTemplate:
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Ho...
Hey Guys,
I have a function that returns a 2 dimensional array. Due to the nature of the program I MUST declare it as an object.
Like this
object o1 = function(x); //note the function returns something similar to this {string[x,y]};
ultimately I want to bind this data to a GridView.
If the array is one dimensional...the followi...
I'd like to display a linq-to-sql on a datagridview as such:
Dim myQ = From b In _dcBooks.Books Select New With {Key b.ID, b.Title, b.Genre, b.ISBN, b.Format, b.Series, _
.Author =b.BooksAuthors.Count()}
the formula for the authors column is simplified as it would normally display nothing, the only author or "multiple".
...