I am familar with MVVM. Actually been doing most of my learning in SL4. However, with a recent need, I have to use SL3. I am attempting to use MVVM Light v3 with SL3 and utilize commanding. The problem is that in SL3 there is no Command attribute for buttons. I managed to find an old article (http://blog.galasoft.ch/archive/2009/09/26/us...
I am trying to do something similar to what the person in this question wanted to do.
Is there any, more elegant, way to do this than the work-around suggested there?
(As a last resort) Is there a different mvvm framework that would have better support for doing this?
Right now I'm trying to make a custom control that inherits from t...
Hi,
In a Silverlight MVVMLight 4.0 application I have a listbox, a textbox and a checkbox.
The listbox's ItemsSource is bound to a list of objects in the viewmodel.
The listbox's SelectedItem is two-way bound to an object (SelectedActivity) in the viewmodel.
Both the textbox's Text and the checkbox's IsSelected properties are two-way b...
Hi guys:
I have this View:
<Grid Margin="10,0,10,10">
<StackPanel>
<wpftoolkit:Accordion
Margin="4"
HorizontalAlignment="Stretch"
Name="accordionCB"
ItemsSource="{Binding Path=ContentBlockCategories}"
SelectionMode="ZeroOrMore">
<wpftoolkit:Accordion.ItemTemplate>
<DataTemplate>
...
I am probably mixing up some responsibilities (and maybe even terminology) here, but I can't quite wrap my head around this.
Is there any relationship between the Command Pattern and the Commands found in MVVM Light (and therefore aswell in WPF)? I would really love to implement some kind of undo / redo mechanism but can't quite figure ...
As I am further digging into MVVM and MVVM-light I recognized, that there is no MVVM-light provided base class for models.
But from my understanding, messaging and raising notifications could also happen in a model. At least in communication between models I would find that messaging would come in very handy.
So I just decided to deriv...
I would like to understand how the MVVM light toolkit raises the PropertyChanged event.
I have a feeling that this may be obvious... but I can't satisfy my curiousity without 100% clarity!
I know that this event is raised for each RaisePropertyChanged called, but I'm confused as to why PropertyChanged is raised when the HasValidation...
I'm currently using MVVMLight for my WP7 app and have found that the datacontext for an EventToCommand is always the page datacontext. I'm also using the phone.codeplex.com panorama control and had set the datacontext for each PanoramaItem to a different ViewModel but this datacontext is ignored and the page data context is used instead...
Hello everybody,
I’m a starter with Silverlight and the MVVM Light Toolkit and I don’t know how to proper solve the following scenario:
I have the following views with their corresponding viewModels:
MainView , the Deault Startpage
TabControlView, view with a single Tabcontrol, placed on the MainView…
AllBugsGridView, datagrid with...
Hello all,
Please excuse this novice question, but I'm ramping up on Silverlight and MVVM Light. I created a view called MyView.xaml and a corresponding MyViewModel.cs.
MyView.xaml
<navigation:Page x:Class="Dashboard.Views.MyView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://sch...
Hi.
I am gathering data in a separate Task and I want to data bind the result to a GUI component using an ObservableCollection<>. So my code goes something like this:
private ObservableCollection<MyItem> _items;
public ObservableCollection<MyItem> Items
{
get { return _items; }
set
{
if (_items.Equals(value))
{
retur...
I am looking for a sample that demonstrates in the lightest way possible the following:
A Model that invokes a SOAP based web service; regularly polling to get the latest value (assume the SOAP service returns a boolean). The model should also support invoking a SOAP method that changes the boolean on the server.
A ViewModel that enab...
I've got a plugin that needs access to certain information in order to populate its GUI elements properly. However, this plugin should not know about all other plugins, so I want it to request this information from the application.
In situations like this, I always create an interface for data exchange, and then pass this interface to ...
I am using the Required attribute on via the WCF RIA Services Metadata class, with the Entity Framework underneath that.
I create a new entity, and let the view bind to the view model. User looks at it for awhile, clicks around, and then attempts to save it.
The scenario here is that the user did not tab or click into a fields with a ...
Josh Smith wrote a clear, consise tour of working with the TreeView control in WPF. The secret to the success is the binding of IsExpanded and IsSelected properties of the viewmodel to the treeviewitems. The paper is here.
However after a day of attempting to map his approach to the Silverlight Toolkit TreeView I'm beginning to suspec...
This is not really a question, but an assertion. Posting this so that others can avoid this problem.
If you use Mvvm-Light (and maybe other Mvvm frameworks) and have code in your ViewModel that runs on a thread other than the UI thread, VS2010 and Exression Blend will likely crash when trying to view/edit your XAML in design mode.
For ...
I need some guidance on the plumbing of an MVVM patterned app.
Here's the setup. The page is vertically divided in two. The LHS has a treeview, and the RHS will display the details on whatever item is selected from the tree.
The treeview items bind to a few different types of View Models (Customers, Vendors, Employees for example) Se...
I have a TreeView that the user navigates to select an item for display in a grid. Briefly the XAML looks like this:
<local:TreeViewEx x:Name="theTreeView" ItemsSource="{Binding theData}">
<local:TreeViewEx.ItemTemplate>
<sdk:HierarchicalDataTemplate ItemsSource="{Binding theChil...
Is it possible to Send a message in the xaml via a trigger?
thanks.
...
I want a class (called PremiseServer) in my Mvvm-Light solution (WP7) to subscribe to all property changes for classes that are derived from a base type (SysObject is the base class and it derives from ViewModel).
I have a set of classes derived from SysObject. These classes have various properties on them of differing types (Strings, ...