Hi,
I've got a button strip usercontrol that I want to have on most of my forms.
I've added the commands as follows ...
public ICommand Create
{
get
{
return buttonCreate.Command;
}
set
{
buttonCreate.Command = value;
}
}
I've set these as dependency...
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...
I have a usercontrol (ItemsView) that I use in one of my other view. Since I need to access its ViewModel, the ItemsViewViewModel is contained by the ViewModel of the view that contained the control. I use this control at many times and I find it useful to bind a collection on the ItemsSource of my ItemsView control (differently, dependi...
I am currently working on a SilverLight 3 Application. I am using MVVM Pattern and Prism. I have everything working except the following item. On one of my views I have to use an OpenFileDialog. I attempted to do this in the ViewModel only to find out the security model of SilverLight prohibits it because it is only allowed to be use...
Hi there,
I have successfully created a asp mvc app which basically has interface, service and dataacces - AKA the repository pattern..
What would be the best way to call my service (my repository pattern) from an MVVM structured WPF app..
From what i see.. in the MODEL in wpf i presume i call my service (repository pattern) from the ...
Hi there,
I recently downloaded the MVVM toolkit on codeplex from WPF futures which basically has templates (although i can't seem to find many docs for it) for creating standard MVVM apps for WPF.
I also came across the Powertoys for XAML which allows you to create ViewModels from classes etc..
Is this the best way to go? There seems...
Hi, I guess this is sort of a philosophical question, but I have some code that dynamically adds templated columns to a GridView by generating the XAML at runtime from Model data and loading it using XamlReader. My question is, In an MVVM world, where should I put the code that accomplishes this? At the moment, I have it in the codebehin...
This is somewhat of a followup to my previous question, where people pointed me in the direction of MVVM.
I'm trying to understand exactly where the work is supposed to go in this framework. My view contains a textbox into which the user is meant to input a URI.
As far as I see, I have two choices:
Bind to a Uri object in my ViewMode...
I heard its the next best thing in building WPF UIs, but all existing
examples have dozens of lines of code - can I get a Hello World
for MVVM that explains in no uncertain terms what its all about?
I'm fairly new to C#/.net as well, so maybe point me to some
resources that could help too?
Much appreciated!
...
I am trying to use the MVVM pattern to write a WPF application. I am using WPF data grid (from the toolkit) which lacks the autofiltering feature. So I want to implement it. I've added a context menu to the column header template, it has MenuItem called "Filter" which should actually call the filtering method.
So I've set a MenuItem's ...
I have two ViewModels that present the same Model to different Views. One presents the model as an item in a ListBox, the other presents it as a tab in a TabControl. The TabControl is to display tabs for the items that are selected in the ListBox, so that the tabs come and go as the selection changes.
I can easily synchronise the two co...
Hi,
I'm writing an application (Silverlight and WPF) using the MVVM pattern and the Prism framework. In my application I have a grid that contains a list of customers. Under that, I various views that present customer details. All of the information is fed from a WCF service that provides data from queries as well as callbacks which fir...
Hi there,
How do i extend an existing control (ComboBox in my case) to include a new property which i can bind to a property on my view model??
I have a Dependancy Property on the control's class as follows:
public class MyComboBox : ComboBox
{
public static readonly DependencyProperty MyTextProperty =
DependencyProperty.R...
How can I add WPF DelegateCommands to the items in a TreeView bound to an XmlDataProvider? I'm using the MVVM pattern and Composite WPF and I want the command to be called when the user double-clicks on an item in the TreeView.
I have a TreeView defined in XAML whose DataContext is set to the XmlDataProvider:
<TreeView
xmlns="htt...
Ok I'm having a crisis of conscience right now.
I am having no luck in trying to abstract out RIA Services from our Silverlight application so we can do proper unit testing.
At this point we have a views and view models, and DomainContext is the Model. No matter how much we tried we cannot find anyway to abstract the DomainContext or t...
Hi,
I want to load my WPF UserControl with dynamic rows. My scenario is as follows.
1. When the UserControl gets loaded, I will populate my List<string> object with some values which I will get from a database.
2. I need to create equal number of rows in my UserControl which matches the number of items in the List<string> object. The d...
I am trying to develop a filtering functionality for WPF DataGrid (from the WPF Toolkit). I want a user to right-click any cell and select "Filter" from its context menu, and then the grid should be filtered by the cell's value.
I am trying the M-V-VM pattern. My windows's datacontext is MainWindowViewModel which has a property "Transac...
Hi
I have a textbox in XAML file, On Changing the text in the textbox the prop setter is not getting called. I am able to get the value in ProjectOfficer textbox and not able to update it. I am using MVVM pattern
Below is my code XAML
TextBox Text="{Binding Path=Officer,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
...
I am looking for a way to expose a property in my ViewModel and have it influenced by two separate controls in my View.
In code view, I am trying to do something like this:
propdp object MyObject...
<MySelector SelectedItem="{Binding MyObject, Mode=TwoWay}" />
<MyEditor DataContext="{Binding MyObject, Mode=TwoWay}" />
The purpose of...
Hi,
When writing a MVVM WPF app, there's always a point where the view model has to be set to as the data context of the view. For me, usually that's in code. But I realized that if I declare the view model as a static resource inside the xaml and set the binding there, I don't need to do it in code anymore. This means I don't have to c...