Quantcast
Channel: MVVM Light Toolkit
Viewing all 1826 articles
Browse latest View live

Commented Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost
Comments: Hi Laurent, I can confirm both. We always download the latest MVVM Light from the nuget repository. Joost

Commented Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost
Comments: As an example, I've attached a test program in which a button is only enabled when a view model is selected whose name starts with "A". With version 4.4.32.7 the button enables/disables nicely based on the selected item. With version 5.0.2.0 the button is always disabled. Hope this helps, Joost

Commented Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost
Comments: Thanks for the repro, I will check it out! Laurent

Commented Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost
Comments: Hi, Check the release notes here: http://www.mvvmlight.net/installing/changes The "Important note about issue 7659" is what you are looking for. I am working on a blog post to explain this more in details. Doing the following solves the issue: * Upgrade to MVVM Light Libs only V5.0.2 * Replace the GalaSoft.MvvmLight.Command namespace with GalaSoft.MvvmLight.CommandWpf There is more technical detail about this issue here: https://mvvmlight.codeplex.com/workitem/7659 Cheers Laurent

Edited Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost

Commented Issue: RaisePropertyChanging gone in V.5 ?! [7662]

$
0
0
Seems like RaisePropertyChanging was removed from the ViewModelBase? I've upgarded from 4.2, and besides the buttons isssue, i'm also having the following:

public class MyBase_ViewModel : ViewModelBase
{
// THIS ONE IS OK
[NotifyPropertyChangedInvocator]
protected override void RaisePropertyChanged([CallerMemberName]string property = "")
{
base.RaisePropertyChanged(property);
}

// THIS ONE IS COMPLAINING ABOUT NO METHOD TO OVERRIDE
[NotifyPropertyChangedInvocator]
protected override void RaisePropertyChanging([CallerMemberName]string property = "")
{
base.RaisePropertyChanging(property);
}
}

shall i just remove it, or are there any other implications involved ?

Comments: Hi Laurent, From my understanding that "changing" is in case you want to do something with it before it changes, and i'm not currently using it, so I don't really mind it (I was puzzled though when I updated the library around midnight and nothing seemed to work afterwards though :) If you have some code examples, you can still post it on your blog (and/or here), so future searches will be able to benefit from it. Cheers again, and keep up the good work :)

Commented Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost
Comments: Hi Laurent, Sorry for not checking the release notes and bugging you with an old issue. Thanks, Joost

Commented Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost
Comments: No problems! Cheers Laurent

Closed Issue: Bug in RelayCommand? [7664]

$
0
0
We're using a RelayCommand<T> with both an execute and canExecute delegate in our view model.
In XAML, we bind Button.Command to the command and Button.CommandParameter to the selected item of ListBox.

In version 4, whenever the user changes the SelectedItem of the ListBox, the RelayCommand<T>.CanExecute is re-evaluated with the new command parameter value.

After upgrading to version 5, the RelayCommand<T>.CanExecute is never evaluated. Not when the Window is loaded (because the command parameter is null at that moment), but also not when an item is selected in the list box.

Please fix!

Thanks,
Joost

New Post: adding extmap.xml files to SL5 build

$
0
0
Hi,
Can you please add the .extmap.xml for the Silverlight build/nuget package?

This will enable XAP Assembly Caching
<?xml version="1.0"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <assembly>
    <name>GalaSoft.MvvmLight</name>
    <version>5.0.2.32242</version>
    <publickeytoken>69ff1c9caf797bd5</publickeytoken>
    <relpath>GalaSoft.MvvmLight.dll</relpath>
    <extension downloadUri="GalaSoft.MvvmLight.zip" />
  </assembly>
</manifest>

<?xml version="1.0"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <assembly>
    <name>GalaSoft.MvvmLight.Extras</name>
    <version>5.0.2.32242</version>
    <publickeytoken>69ff1c9caf797bd5</publickeytoken>
    <relpath>GalaSoft.MvvmLight.Extras.dll</relpath>
    <extension downloadUri="GalaSoft.MvvmLight.Extras.zip" />
  </assembly>
</manifest>

Created Unassigned: commands not refreshing the ui [7665]

$
0
0
hi,

i would like to suggest you to look a this issue linked to the usage of mvvm light

https://fluent.codeplex.com/workitem/22520

Please that a look at it

New Post: CanExecute Method still can not work in WPF with latest MvvmLight version on Nuget

$
0
0
CanExecute Method still can not work in WPF with latest MvvmLight version on Nuget

New Post: CanExecute Method still can not work in WPF with latest MvvmLight version on Nuget

$
0
0
Finally, I realized that there's a new public method from RelayCommand Called RaiseCanExecuteChanged().
With this method, I am able to notify UI to update by invoke CanExecute().
Problem solved.

Created Unassigned: no use of System.Runtime.CompilerServices? [7666]

$
0
0
I added:
protected override void RaisePropertyChanged([CallerMemberName] string propertyName = "")
{
base.RaisePropertyChanged(propertyName);
}
to my first MVVM Light project.

Commented Unassigned: no use of System.Runtime.CompilerServices? [7666]

$
0
0
I added:
protected override void RaisePropertyChanged([CallerMemberName] string propertyName = "")
{
base.RaisePropertyChanged(propertyName);
}
to my first MVVM Light project.
Comments: Hi, Can you elaborate? CallerMemberName is supported everywhere (as far as I can tell) in the latest versions of MVVM Light. Thanks Laurent

Commented Unassigned: commands not refreshing the ui [7665]

$
0
0
hi,

i would like to suggest you to look a this issue linked to the usage of mvvm light

https://fluent.codeplex.com/workitem/22520

Please that a look at it

Comments: Hi, Did you see the release notes for the latest MVVM Light version? http://www.mvvmlight.net/installing/changes (Important note about issue 7659) Thanks Laurent

New Comment on "Documentation"

$
0
0
@Familyghost - great suggestion. The beauty about community projects is if you see a missing gap, you can contribute.

Commented Unassigned: commands not refreshing the ui [7665]

$
0
0
hi,

i would like to suggest you to look a this issue linked to the usage of mvvm light

https://fluent.codeplex.com/workitem/22520

Please that a look at it

Comments: Hi laurent, désolé pour la boulette :-) You can close this issue. I update all and change the namespace. It solves all my issues. Bye

New Post: Advice on choosing viewmodel communcation in a Master-Details (All-in-one) view

$
0
0
Hi laurent,

Tres bien on this library. I'm new to this toolkit and i am contemplating using it for a project.
The question is in regards to when to use Messenger vs. NavigationService.

Currently, i have a WPF app with a basic MVVM makeup, it contains a view with a viewmodel binded to it's datacontext. In the view, there exists a listview (bounded to an observablecollection<users> master - holds a list of users, this is fine) and a usercontrol (details - a template that will display more info on the user based on the selecteduser from the listview). I'm stuck at the usercontrol.

FYI Both listview and usercontrol are on the same view.

When i select the user from the list, i want to be able to use the SelectedUser property to get data that will bind to my usercontrol's DataContext. I've read a lot of articles stating messenger is the way to go and some others say navigationservice.


The reason why i think navigationservice wont work is because the view is not changing. Everything is on one screen.

What do you think?

Hope this is clear enough and thanks for your input in advance.

Created Unassigned: RaisePropertyChanged issue [7667]

$
0
0
Bonjour,

lorsque je bind une valeur sur une de mes datagrid (de syncfusion), j'obtiens une erreur sur la fonction RaisePropertyChanged et cela empêche l'ouverture de ma Vue. L'erreur indique une erreur de binding avec comme message "Paramètre incorrect". Je n'ai pas aucne autre précision sur l'erreur. Je vous donne l'extrait de code de ma propriété bindée plus bas. Je n'ai aucune idée d'où peut venir l'erreur ayant peu d'information sur celle-ci. Je précise que j'ai mis à jour le toolkit MVVMLight de la version 4.2 à la dernière 5 et également que j'ai mis à jour mes composants syncfusions. Cela marchait très bien avant ces mises à jour.

Cordialement,

Extrait de ma propriété bindée:
```
/// <summary>
/// The <see cref="Commandes" /> property's name.
/// </summary>
public const string CommandesPropertyName = "Commandes";

private ObservableCollection<Commande> _commandes = new ObservableCollection<Commande>();

/// <summary>
/// Sets and gets the Commandes property.
/// Changes to that property's value raise the PropertyChanged event.
/// </summary>
public ObservableCollection<Commande> Commandes
{
get
{
return _commandes;
}

set
{
if (_commandes == value)
{
return;
}

_commandes = value;
RaisePropertyChanged(CommandesPropertyName);
}
}
```
Viewing all 1826 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>