When I run this snippet of code:
string[] words = new string[] { "foo", "bar" };
var results = from row in Assets select row;
foreach (string word in words)
{
results = results.Where(row => row.Name.Contains(word));
}
I get this SQL:
-- Region Parameters
DECLARE @p0 VarChar(5) = '%bar%'
DECLARE @p1 VarChar(5) = '%bar%'
-- EndRegi...
Using a DataView one can specify the binding for controls in XAML for example as follows:
<Image Source="{Binding Thumbnail}" />
I have a control that displays a number of images. I can get this to work with a DataView as the data source for the control, but I want to use a List collection of DataRow objects, which is not not working ...
How do I bind MouseDoubleClick event of wpfdatagrid in the view as I'm using mvvm and Prism 2.
...
Based on the MVVM example by Josh Smith, I have implemented the multi tab option which binds to a different tab to a different view model
using a simple datatemplate that binds a viewmodel to a view.
<DataTemplate DataType="{x:Type fixtureVM:SearchViewModel}">
<SearchVw:SearchView/>
</DataTemplate>
The issue that I'm having, is...
I'll start off and say I am not using the MVVM pattern for my WPF app. Please forgive me.
Right now I have a data template with two buttons, each binds to a different command on the CLR object this data template represents. Both use the same command parameter. Here's an example of the buttons.
<Button x:Name="Button1"
Command="...
My company is stuck on .Net 3.0. The task I am trying to tackle is simple, I need to bind the IsChecked property of the CheckBoxResolvesCEDAR to the CompletesCEDARWork in my Audio class. The more I read about this it appears that I have to declare CompletesCEDARWork as dependancy propert, but I can not find a good example of how this i...
I need to create a ContextMenu where I want to pass a currently selected index of the datagrid to a ViewModel using CommandParameter. The following Xaml code doesn't work. What might be the problem?
<dg:DataGrid ItemsSource="{Binding MarketsRows}"
<dg:DataGrid.ContextMenu >
<ContextMenu >
<MenuItem Header="Add Di...
Hello,
I am trying to set up security within a web.config file for a WCF service hosted in IIS but keep getting the error message:
Security settings for this service
require 'Anonymous' Authentication but
it is not enabled for the IIS
application that hosts this service.
I have read Nicholas Allen’s blog (link text) and it ...
I just noticed a strange behavior which looks like a bug. Consider the following XAML :
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Page.Resources>
<x:Array x:Key="data" Type="{x:Type sys:St...
Hello!
I have two UserControls ("UserControlParentView" and "UserControlChildView") with MVVM pattern implemented in both controls. Parent control is a container for Child control and child control's property should be updated by data binding from Parent control in order to show/hide some check box inside Child control.
Parent Control ...
I have a window named ParameterEditorView with a ParameterEditorViewModel as DataContext. In the ParameterEditorViewModel I have a list of ParameterViewModel. In the ParameterEditorView I have an ItemsControl whose ItemsSource is binded to the list of ParameterViewModel in the ParameterEditorViewModel. I need the ParameterViewModel to ha...
Hi,
I'm writing an application in WPF, using the MVVm toolkit and have problems with hooking up the viewmodel and view.
The model is created with ado.net entity framework.
The viewmodel:
public class CustomerViewModel
{
private Models.Customer customer;
//constructor
private ObservableCollection<Models.Cust...
I'm having an annoying issue with the RadioButton helper and Data Annotation used for validation:
I'm actually replacing a dropdown list with radio buttons (because the list is small). I'm not using MVC 2 or MVC Futures (though, I think I'd run into the same problem if I were using the RadioButtonList).
That particular field is require...
I am developing a simple application which hava a file Constants.py containing all configuration, it is like this
x = y
during execution of program , the value of y changes , I want value of x o get updated too , automatically, this can be reffered as binding, how can I achieve this
...
Hi I want to bind a lists position to its own height in XAML. So its lower left corner always will be at 0.0 of the canvas. I'm using elementBinding to get the ActualHeight and a converter to invert the property. But the height sent to the converter is 0. How do I solve this or am I going at this the wrong way?
<Canvas x:Name="DisplayS...
Hello,
I have a user control called HomePage.xaml. I'm creating a model instance (using MVVM pattern) in the code behind file in the constructor of page as
MainViewModel model = new MainViewModel();
I have a button in HomePage.xaml which I want to bind to the command inside MainViewModel called GetData() and want to populate the data...
In jquery an event hadler's binding is the event generating DOM element (this points to the dom element).
In prototype to change the binding of an event handler one can use the bindAsEventListener function;
How can I access both the instance and the DOM element from a event handler?
Similar to http://stackoverflow.com/questions/117361/ho...
I am using MVVM pattern. I have a
Text box whose Text property is bound to ViewModel's(VM supports INotifyProperyChange) Text property
Button whose command is bound to VM's ICommand property type
You may think of this as a SearchTextBox and SearchButton
The problem I am facing is that when I enter the text in SearchTextBox and cli...
I got a List<List<X>> object and I want to bind it to a datagrid in the following way:
Each entry in the outer list represents a single column
Each list inner list represents the rows for each column
I need to do it in code because the size of each of the list depends on user input at runtime. Is this somehow possible? Changeing/wrap...
Hello,
Please recommend best approach (bindings, encoding, transport, etc) based on the following WCF scenario and requirements:
Both client and service are WCF 3.5 based. Client and service will communicate thru Internet over SSL port 443.
WCF Client (a Windows Service) is on w2kx server behind firewall/NAT. Client will initiate ...