I have a rather complicated Binding situation. I have a solution that I created in windows forms for this back in VS2005, but now I am recreating the control using wpf, but I am not doing it in exactly the same way I had done it before.
I have a listbox control that has the following DataTemplate:
<DataTemplate>
<Border CornerRadius=...
I have an asp:RadioButtonList and want to declaratively bind the value to an enumeration. I tried using this type syntax:
value = <%# ((int)MyEnum.Value).ToString() %>"
I get an error list item does not support databinding. Any ideas?
...
I really don't know how to title this question, but I need some help with binding to a ListBox.
I have an object, that contains (among other information) 2 properties that need to be bound in one ListBox. One of these is an ObservableCollection of objects, called Layers, and the other property holds an enum value of either Point, Line o...
I have a tricky problem where I am binding a ContextMenu to a set of ICommand-derived objects, and setting the Command and CommandParameter properties on each MenuItem via a style:
<ContextMenu
ItemsSource="{Binding Source={x:Static OrangeNote:Note.MultiCommands}}">
<ContextMenu.Resources>
<Style
TargetType="...
I'm selecting table data of the current user:
SELECT [ConfidenceLevel], [LoveLevel], [HappinessLevel] FROM [UserData] WHERE ([UserProfileID] = @UserProfileID)
I have set a control to the unique user ID and it is getting the correct value:
HTML: <asp:Label ID="userID" runat="server" Text="Labeluser"></asp:Label>
C#: userID.Text = M...
I have a WPF Menu and a Tab control. I would like the list of menu items to be generated from the collection of TabItems on my tab control. I am binding my tab control to a collection to generate the TabItems. I have a TabItem style that uses a ContentPresenter to display the TabItem text in a TextBlock. When I bind the tab items to m...
I've never personally used any of the Data controls within Visual Studio. I need to view and edit a two-dimensional byte array, 16x15 objects. Is there any control capable of editing this information?
I've tried to access data with the DataViewGrid, but am not sure how to use it.
It would be great to edit this information via rows and...
Hi,
I have a ListView and ObservableCollection in my wpf application.
I want to bind linq expression to ListView:
lv_Results.DataContext = store.Where(x => x.PR > 5).ToList();
tempStore = new M1Store()
{
SiteName = siteName,
Date = date,
...
Hello,
I'm reading the source code from the latest Prism 4 drop and am interested in solving this problem. There is a base class for the ViewModels that implements INotifyPropertyChanged and INotifyDataErrorInfo and provides some refactoring friendly change notification.
protected void RaisePropertyChanged<T>(Expression<Func<T>> prope...
I have a wpf tabitem whose data context is set to my object 'Product'. All the controls on this form get their data from 'Product' object. I have a listview whose ItemsSource property is set to a list in my object 'Product.DetailsList'. Listview columns are bound to object properties in 'Product.DetailsList'
Up till here everything work...
Hi all,
I'm having some troubles trying to dynamically generate content in WPF and after it bind data.
I have the following scenario:
TabControl
- Dynamically generated TabItems through DataTemplate
- inside TabItems, I have dynamic content generated by DataTemplate that I wish to bind (ListBox).
The code follows:
::TabControl
<Ta...
I have a user control which datacontext is set to a view model. The user control contains some textblocks and textboxes which are bind to view model's properties. I would like to do a small animation when a view model's property's value changes but I can't seem to find a way to do this in Silverlight.
In WPF we can use properties like ...
With a view model containing the field:
public bool? IsDefault { get; set; }
I get an error when trying to map in the view:
<%= Html.CheckBoxFor(model => model.IsDefault) %>
Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?)
I've tried casting, and using .Value and neither wor...
I have an OrderForm domain class, which has property subclasses, something like:
interface IOrderForm
{
int OrderId { get; }
ICustomerDetails CustomerDetails { get; set; }
IDeliveryDetails DeliveryDetails{ get; set; }
IPaymentsDetails PaymentsDetails { get; set; }
IOrderDetails OrderDetails { get; set; }
}
My "De...
UPDATE: See the bottom of this question for what I did to solve the problem.
I'm trying to understand how the ItemsSource and DataContext properties work in a Silverlight Toolkit DataGrid. I'm currently working with dummy data and trying to get the data in the DataGrid to update when the value of a combo box changes.
My MainPage.xaml....
I'm learning WPF and would like to have a collection similar to a LinkedList, to where I can add and remove strings. And I want to have a ListView that listen to that collection with databinding. How can I do bind a simple list collection to a ListView in XAML?
My idea (not working) is something like this:
<Window x:Class="TestApp.Main...
I'm trying to set the ItemsSource property of a DataGrid named dgIssueSummary to be an ObservableCollection named IssueSummaryList. Currently, everything is working when I set the ItemsSource property in my code-behind:
public partial class MainPage : UserControl
{
private ObservableCollection<IssueSummary> IssueSummaryList = new O...
I have a WPF UI Bound to a collection of AwesomeClass
Now, AwesomeClass has a collection of AwesomeParts objects.
How can I make my UI In such a way that (as an example)
for each AwesomeClass instance, there is a Tab on a tab panel
and then for each awesome part in that, there is an object on a listbox, on that tab.
Basically: Awesome...
I am looking for an IDL-like (or whatever) translator which turns a DOM- or JSON-like document definition into classes which
are accessible from both C++ and Python, within the same application
expose document properties as ints, floats, strings, binary blobs and compounds: array, string dict (both nestable) (basically the JSON type fe...
I have a WinForms app with some elements that are hosted WPF user controls (using ElementHost).
I want to be able to bind my WinForm's control property (Button.Enabled) to a custom DependencyProperty of the hosted WPF user control (SearchResults.IsAccountSelected).
Is it possible to bind a System.Windows.Forms.Binding to a property man...