Advanced Forum Search Results
-
Well this solution I proposed earlier didn't really work, so I endid up with this instead:
1 <ItemsControl ItemsSource="{Binding Variables}">
2 <ItemsControl.ItemTemplate>
3 ...
-
So, I have an interface named iVariable with the properties Name and Type. One implementation might represent a numeric variable, another a boolean variable and another an enum variable. Here is my first shot at databinding to a list of iVariable:
1 <ItemsControl ItemsSource="{Binding ...
-
Instead of using XAML reader in the codebehind you can create your create a datatemplate in regular XAML and simply put a ContentPresenter control in it. You can then put whatever you want into the ContentPresenter dynamically by binding it to an object via a converter.
This is more confusing than using XAML reader the first time you do it, but ...
-
How did you solve it?
please post your solution
-
I have a datagrid bound to a list.
One of the template columns contains a list of its own bound to a horizontal listview. The problem I run into is with that templatecolumn's HeaderStyle. I know that the datacontext should be the same as the datacontext of the parent, but I don't know if the TemplateColumn or the DataGrid is the parent. ...
-
So, what I've found out is you cannot Bind to a static property in XAML, you must bind dynamically.
http://silverlight.net/forums/t/69176.aspx
You also cannot implement INotifyPropertyChanged directly onto a static property.
The solution is to create a workaround class that contains the properties you want and implement ...
-
The easiest way I've found to bind in an itemtemplate like you're doing is to make the itemssource a class, and have anything you want to bind inside the itemssource be a member of that class.If I were doing this kind of thing, I would make a Toppings class something like: public class Sundae
{
public ...
-
The first thing I would try is meticulously checking the namespaces declarations and using statements in each of your files to make sure they're correct.
the second thing I would try is posting error messages and code :)
-
If the collection you want to bind the combobox to is a property of the collection your listbox is bound to, then it's bound the same way the listbox was.
If both collections are in the same class, then I would start by setting the itemssource at runtime in the code behind.
It would help if you posted code so we can see what you've ...
-
Unfortunately I haven't done this myself yet, I just know a little bit about it because I'm going to do it soon so I've been reading up.
I would recommend that you take a step back and write a simple class that implements INotifyPropertyChanged but is not in WCF. You can put it right in the project with your silverlight ...