i know it must something simple that i missed. I use data services to get data into my silverlight application. When i bind the data to my datagrid it works like a charm
LessonGrid.ItemsSource = context.Lessons
however as soon as i try to wrap my objects into more complex data structure it stops working
LessonGrid.ItemsSource = conte...
Hi, I'm having some trouble with a databound TreeView in WPF, basically I want a context menu to be databound to an IEnumerable property on my TreeViewItem ViewModel, this is what I'm trying to do in the of each TreeViewItem:
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu ItemsSource="{Binding ContextMenu}" />
</Setter.Va...
Hi all,
I have some problem on databinding to Image's Source Property.
I have a listview Template
<Style x:Key="ListViewStyle" TargetType="{x:Type ListView}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Va...
I'm trying to bind a Textbox.Text to Form.Text (which sets the title of the form).
The binding itself works. But, the title isn't updated until I move the entire form.
How can I achieve Form.Text being updated without moving the form? I'd like Form.Text being updated directly when I type something in the Textbox.
Edit; I set the title ...
Hi,
I have a class with the following properties:
Message(string), Added(DateTime) and LogLevel(string)
In my App.xaml i have the following:
<Application.Resources>
<ImageSource x:Key="Critical">Gfx/Log/Critical.png</ImageSource>
<ImageSource x:Key="Info">Gfx/Log/Information.png</ImageSource>
<ImageSource x:Key="Error">Gfx...
I have a GridView that has a DataSourceID pointing to an ObjectDataSource. The ObjectDataSource points to a method that returns a LINQ IQueryable by using the TypeName, SelectMethod, and SelectCountMethod properties of the ObjectDataSource control. What happens is that the data loads properly upfront. However, on postback, if I remove th...
I have a List<> of objects that I have bound to a ListBox. I then want to bind properties of the SelectedValue to various TextBoxes. The behavior is very screwy though.
When binding the Name (a string) that is used as the DisplayMember for the ListBox, it doesn't update the ListBox and if I try to refresh the binding on the TextChanged ...
Hi,
I posted a similar post to this before but since then i have done some research and thought i'd put this one out again to see if anyone maybe has any thoughts on my problem.
I am running a WPF application with C# as the code beind. The datbase i am using is SQL Server 2005.
Now i am currently binding to the database using ADO.Ne...
Morning folks,
I'm still trying to get my head around databinding in WPF and so I'm having a bit of a problem working out how to solve this issue: I have a datatemplate for a button that I use to display information from a class I have set up, and I've been using a ListView Itemsource to pass in the list of these class objects which is ...
Hi,
I have the following Menu witch works to some point ... then I added the two MenuItems under the Binding Item ... so each binded item would get a Delete and Edit MenuItem.
<MenuItem x:Name="miUserList" Header="User" Click="miUserList_Click" >
<MenuItem Header="Add new user"></MenuItem>
<MenuItem.ItemTemplate>
<DataT...
We have a simple animation that runs when a ToggleButton is checked and unchecked (expands a ListView's height and then collapses a ListView's height). How do you fire the EventTrigger (or Animation) for the <Storyboard x:Key="CommentsCollapse"> when the DataContext Binding changes in the x:Name="DetailsGrid" Grid in the following XAML?...
Hi all, I'm a newbie to Silverlight and I'm having some trouble finding a solution to an issue.
I have a silverlight datagrid with 3 columns. One of the columns is bound to an integer. I want to be able to bind my column to a function that would translate my integer into it's status code. The function accepts an integer, and using a sw...
I'm using a TreeView inside a Combobox control (from here). I have a ViewModel object that is the DataContext of my window.
What I would like to have happen is when the selected item in the treeview/combobox changes I want a property on my ViewModel to be updated with that selected item. Ideally I'd like to be able to do this completely...
How to skip updating some of the sub-bindings of a MultiBinding? I have defined in code-behind (I had some troubles making it in XAML and I don't think it matters - after all code-behind is not less expressive then XAML) a MultiBinding which takes two read-only properties and one normal property to produce a single value. In case of Conv...
What is the best method to display repeating data with slightly different controls or sub data? For example displaying an expanded list of questions and answers. Some questions will have answers, some will not. Some button controls would show for some items while not for others.
In classic ASP I've used XML/XSL quite effectively fo...
I created a new c# project and follwed the steps from this tutorial to create a LocalDataCache:
http://www.codeproject.com/KB/database/AdoSyncServicesArticalPKg.aspx?fid=1526739&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2794305&fr=1#xx0xx
I next added the following code:
using System;
using Syste...
I'm having a very annoying problem with my datatemplates, the mouseOver template won't show any of the databound controls, so only the label and textbox are shown on mouseover. Theres no errors so I think I'm just missing something. The code - first one is used as a the Content Template when on MouseOver:
<!-- Data Template used whe...
Question: What would be the most effective way of doing a nested list which allows for data binding in the view and awareness of what shipment is selected so that command bindings from the view can function in the viewmodel on the appropriate item in any of the nested lists?
Info:
I've got a program that I've been working a lot on to...
Hi,
My Grails application has a large number of enums that look like this:
public enum Rating {
BEST("be"), GOOD("go"), AVERAGE("av"), BAD("ba"), WORST("wo")
final String id
private RateType(String id) {
this.id = id
}
static public RateType getEnumFromId(String value) {
values().find {it.id == val...
Hello,
I'm creating a Loading Adorner that has a swirling icon over it. I tried binding the visibility property directly in the XAML but that actually hides everything inside its hierarchy.
I have this in my XAML:
<AdornerDecorator Visibility="{Binding Path=RootGroup.Loading, Converter={StaticResource VisibilityConverter}}">
<TreeV...