We are attempting to use MVVM Light in a Xamarin.iOS project, and when installing the toolkit through NuGet the "GalaSoft.MvvmLight.Platform" DLL only downloads in Xamarin.iOS projects targeting the older MonoTouch10 runtime, but not the newer 64-bit compatible Xamarinios10 runtime. Can the package be updated to support and target the newer runtime? Thanks!
↧
Created Unassigned: MonoTouch10 vs. Xamarinios10 [7679]
↧
Commented Unassigned: MonoTouch10 vs. Xamarinios10 [7679]
We are attempting to use MVVM Light in a Xamarin.iOS project, and when installing the toolkit through NuGet the "GalaSoft.MvvmLight.Platform" DLL only downloads in Xamarin.iOS projects targeting the older MonoTouch10 runtime, but not the newer 64-bit compatible Xamarinios10 runtime. Can the package be updated to support and target the newer runtime? Thanks!
Comments: Hi, I was just in the process of porting. I copied the DLLs at this location: http://1drv.ms/1ylP1TS I also ported my Xamarin Evolve sample (Flowers) to the new Unified API. The sample can be found here: http://1drv.ms/1xt11xu I will update the Nuget package ASAP. I have a few other things I want to take care in this release. In the mean time, the DLLs here should help you to port your app. Cheers Laurent
Comments: Hi, I was just in the process of porting. I copied the DLLs at this location: http://1drv.ms/1ylP1TS I also ported my Xamarin Evolve sample (Flowers) to the new Unified API. The sample can be found here: http://1drv.ms/1xt11xu I will update the Nuget package ASAP. I have a few other things I want to take care in this release. In the mean time, the DLLs here should help you to port your app. Cheers Laurent
↧
↧
Commented Unassigned: MonoTouch10 vs. Xamarinios10 [7679]
We are attempting to use MVVM Light in a Xamarin.iOS project, and when installing the toolkit through NuGet the "GalaSoft.MvvmLight.Platform" DLL only downloads in Xamarin.iOS projects targeting the older MonoTouch10 runtime, but not the newer 64-bit compatible Xamarinios10 runtime. Can the package be updated to support and target the newer runtime? Thanks!
Comments: Blog announcement: http://blog.galasoft.ch/posts/2015/01/porting-mvvmlight-to-the-xamarin-ios-unified-api-64-bits/
Comments: Blog announcement: http://blog.galasoft.ch/posts/2015/01/porting-mvvmlight-to-the-xamarin-ios-unified-api-64-bits/
↧
Commented Unassigned: MonoTouch10 vs. Xamarinios10 [7679]
We are attempting to use MVVM Light in a Xamarin.iOS project, and when installing the toolkit through NuGet the "GalaSoft.MvvmLight.Platform" DLL only downloads in Xamarin.iOS projects targeting the older MonoTouch10 runtime, but not the newer 64-bit compatible Xamarinios10 runtime. Can the package be updated to support and target the newer runtime? Thanks!
Comments: Thanks Laurent, this will work perfectly for us. As you recommended on your blog, we will switch back to the nuget package when you have that up.
Comments: Thanks Laurent, this will work perfectly for us. As you recommended on your blog, we will switch back to the nuget package when you have that up.
↧
New Post: MVVM for us VB.net Lovers
Hello, so what happened to that templates? can I get it somewhere?
Thanks
Thanks
↧
↧
New Post: RelayCommand.CanExecute should be virtual
Imagine I want to implement a Command on top RelayCommand and I want to overrie CanExecute in certain cases.
↧
New Post: IDialogService.cs
Hi,
I'm just starting out with MVVM Light, and after watching Laurent's Evolve and Pluralsight videos, I am attempting to create a Xamarin Forms application with an Azure Mobile Services backend. In general I am grasping the concepts but struggling a bit with the correct approach to the architecture. I may well have some more questions regarding that! :)
Anyway, being a newbie, I have hit a problem that has confused me a little. I have used the implementation of the IDialogService contained in the Flowers.Forms example. When I compile my solution, I get an error stating that a method of the interface has not been implemented correctly.
Error 3 'Courses.Forms.Helpers.DialogService' does not implement interface member 'GalaSoft.MvvmLight.Views.IDialogService.ShowMessage(string, string, string, string, System.Action<bool>)'. 'Courses.Forms.Helpers.DialogService.ShowMessage(string, string, string, string, System.Action<bool>)' cannot implement 'GalaSoft.MvvmLight.Views.IDialogService.ShowMessage(string, string, string, string, System.Action<bool>)' because it does not have the matching return type of 'System.Threading.Tasks.Task<bool>'. C:\Users\Steven\documents\visual studio 2013\Projects\PinSheet\PinSheet\PinSheet\Helper\DialogService.cs 8 18 PinSheet
If I peek at the IDialogService, I can see, as the error suggests, that method should return a Task<bool>.
So, is the interface correct and should the implementation return Task<bool> or is it incorrect?
5.0.2.32240 is the version of the GalaSoft.MvvmLight PCL assembly from NuGet.
Any help would be appreciated and apologies if this is a silly question.
Thanks
Steven
I'm just starting out with MVVM Light, and after watching Laurent's Evolve and Pluralsight videos, I am attempting to create a Xamarin Forms application with an Azure Mobile Services backend. In general I am grasping the concepts but struggling a bit with the correct approach to the architecture. I may well have some more questions regarding that! :)
Anyway, being a newbie, I have hit a problem that has confused me a little. I have used the implementation of the IDialogService contained in the Flowers.Forms example. When I compile my solution, I get an error stating that a method of the interface has not been implemented correctly.
Error 3 'Courses.Forms.Helpers.DialogService' does not implement interface member 'GalaSoft.MvvmLight.Views.IDialogService.ShowMessage(string, string, string, string, System.Action<bool>)'. 'Courses.Forms.Helpers.DialogService.ShowMessage(string, string, string, string, System.Action<bool>)' cannot implement 'GalaSoft.MvvmLight.Views.IDialogService.ShowMessage(string, string, string, string, System.Action<bool>)' because it does not have the matching return type of 'System.Threading.Tasks.Task<bool>'. C:\Users\Steven\documents\visual studio 2013\Projects\PinSheet\PinSheet\PinSheet\Helper\DialogService.cs 8 18 PinSheet
If I peek at the IDialogService, I can see, as the error suggests, that method should return a Task<bool>.
So, is the interface correct and should the implementation return Task<bool> or is it incorrect?
5.0.2.32240 is the version of the GalaSoft.MvvmLight PCL assembly from NuGet.
Any help would be appreciated and apologies if this is a silly question.
Thanks
Steven
↧
New Post: IDialogService.cs
Hi,
Yes the interface in the Nuget package changed since Evolve. Normally you should have used the DLLs from the References folder instead of Nuget, these contained the "old" interface that is implemented in the code.
In order to avoid confusion, I re-uploaded a corrected version of the Flowers.Forms sample, which is compatible with the updated IDialogService. Please re-download it from
http://1drv.ms/1yNA7qU
Cheers
Laurent
Yes the interface in the Nuget package changed since Evolve. Normally you should have used the DLLs from the References folder instead of Nuget, these contained the "old" interface that is implemented in the code.
In order to avoid confusion, I re-uploaded a corrected version of the Flowers.Forms sample, which is compatible with the updated IDialogService. Please re-download it from
http://1drv.ms/1yNA7qU
Cheers
Laurent
↧
New Post: IDialogService.cs
Hi Laurent,
thank you so much for responded to my question and updating the example.
I was actually just coming on here to add a comment saying that I had found confirmation on the change log that you had deliberately added the Task<bool>.
Cheers
Steven
thank you so much for responded to my question and updating the example.
I was actually just coming on here to add a comment saying that I had found confirmation on the change log that you had deliberately added the Task<bool>.
Cheers
Steven
↧
↧
New Post: Binaries for Visual Studio Express developers (without NuGet)
Have you discovered this yet?: http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx It's basically VS Pro for free.
↧
New Post: RaisePropertyChanged Through Attributes?
It's here: https://github.com/Fody/PropertyChanged
↧
New Post: Binaries for Visual Studio Express developers (without NuGet)
CADbloke wrote:
But for now, I am limited to Visual Basic 2010 Express which does not support NuGet or other add-ins so I need binaries (I will not undergo this library source code compiling).
Have you discovered this yet?: http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx It's basically VS Pro for free.Very good, I did not know about it. Question is if it is not somewhat time-limited (it will not work after half a year for example).
But for now, I am limited to Visual Basic 2010 Express which does not support NuGet or other add-ins so I need binaries (I will not undergo this library source code compiling).
↧
Commented Issue: Use EventToCommand on Storyboards [6979]
I want to be able to use an EventToCommand trigger action on a storyboard so I can invoke a command on my view model when the storyboard completes. Right now this throws a XamlParseException with the message:
Cannot attach type "EventToCommand" to type "Storyboard". Instances of type "EventToCommand" can only be attached to objects of type "FrameworkElement"
Comments: Really awesome if this could be implemented.
Cannot attach type "EventToCommand" to type "Storyboard". Instances of type "EventToCommand" can only be attached to objects of type "FrameworkElement"
Comments: Really awesome if this could be implemented.
↧
↧
Created Unassigned: MVVMLight WPF template for App.xaml causing Blend 2013 to crash. [7680]
I've come across a problem with the default template used for the App.xaml when adding MVVM Light to an existing/new project via NuGet.
The problem occurs in Blend when you try and create a ResourceDictionary within Blend, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
STEPS TO RECREATE:
1. Create new WPF project.
2. Install MVVMLight package via NuGet.
3. Open project in Blend 2013.
4. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResoruceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
The problem occurs in Blend when you try and create a ResourceDictionary within Blend, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
STEPS TO RECREATE:
1. Create new WPF project.
2. Install MVVMLight package via NuGet.
3. Open project in Blend 2013.
4. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResoruceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
↧
Edited Unassigned: MVVMLight WPF template for App.xaml causing Blend 2013 to crash. [7680]
I've come across a problem with the default template used for the App.xaml when adding MVVM Light to an existing/new project via NuGet.
The problem occurs in Blend when you try and create a new ResourceDictionary, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
STEPS TO RECREATE:
1. Create new WPF project.
2. Install MVVMLight package via NuGet.
3. Open project in Blend 2013.
4. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResourceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
The problem occurs in Blend when you try and create a new ResourceDictionary, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
STEPS TO RECREATE:
1. Create new WPF project.
2. Install MVVMLight package via NuGet.
3. Open project in Blend 2013.
4. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResourceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
↧
Edited Unassigned: MVVMLight WPF template for App.xaml causing Blend 2013 to crash. [7680]
I've come across a problem with the default template used for the App.xaml when adding MVVM Light to an existing/new project via NuGet.
The problem occurs in Blend when you try and create a new ResourceDictionary, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
__STEPS TO RECREATE:__
1. Create new WPF project.
1. Install MVVMLight package via NuGet.
1. Open project in Blend 2013.
1. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResourceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
The problem occurs in Blend when you try and create a new ResourceDictionary, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
__STEPS TO RECREATE:__
1. Create new WPF project.
1. Install MVVMLight package via NuGet.
1. Open project in Blend 2013.
1. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResourceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
↧
Edited Unassigned: MVVMLight WPF template for App.xaml causing Blend 2013 to crash. [7680]
I've come across a problem with the default template used for the App.xaml when adding MVVM Light to an existing/new project via NuGet.
The problem occurs in Blend when you try and create a new ResourceDictionary, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
__STEPS TO RECREATE:__
1. Create new WPF project.
1. Install MVVMLight package via NuGet.
1. Open project in Blend 2013.
1. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResourceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
This seems to be a problem with Blend, rather than MVVMLight - but is it worth updating the default app.xaml in the NuGet package?
The problem occurs in Blend when you try and create a new ResourceDictionary, either via the [Add New Item] method, or using the [New] button in a Create Color Resource dialog.
__STEPS TO RECREATE:__
1. Create new WPF project.
1. Install MVVMLight package via NuGet.
1. Open project in Blend 2013.
1. Select menu FILE -> ADD ITEM, and select ResourceDictionary.
Blend throws and exception at this point, and exits.
The error seems to occur when Blend attempts to add the new file to a MergedDictionary entry in App.xaml.
The error appears to be caused by the <vm:ViewModelLocator ...> entry, as commenting this out resolves the problem.
__WORKAROUND:__
When MVVM Light is installed by the PackageManager, it writes this into the app.xaml:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</Application.Resources>
</Application>
```
It's this default app.xaml that is causing Blend to crash.
However, by nesting the <vm:ViewModelLocator ...> resource in a ResourceDictionary:
```
<Application x:Class="ProjectName.App"
StartupUri="MainWindow.xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
d1p1:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:ProjectName.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
```
... Blend no longer throws an exception, and the new resourcedictionary is added to the App.xaml.
This seems to be a problem with Blend, rather than MVVMLight - but is it worth updating the default app.xaml in the NuGet package?
↧
↧
Commented Unassigned: MonoTouch10 vs. Xamarinios10 [7679]
We are attempting to use MVVM Light in a Xamarin.iOS project, and when installing the toolkit through NuGet the "GalaSoft.MvvmLight.Platform" DLL only downloads in Xamarin.iOS projects targeting the older MonoTouch10 runtime, but not the newer 64-bit compatible Xamarinios10 runtime. Can the package be updated to support and target the newer runtime? Thanks!
Comments: Hi, I've downloaded the Xamarin Evolve Flowers example from the link above, but I have a compiler error (Xamarin Studio): /Flowers/Flowers.Forms/Flowers.Forms/Flowers.Forms/Helpers/DialogService.cs(18,18): Error CS0738: `Flowers.Forms.Helpers.DialogService' does not implement interface member `GalaSoft.MvvmLight.Views.IDialogService.ShowMessage(string, string, string, string, System.Action<bool>)' and the best implementing candidate `Flowers.Forms.Helpers.DialogService.ShowMessage(string, string, string, string, System.Action<bool>)' return type `System.Threading.Tasks.Task' does not match interface member return type `System.Threading.Tasks.Task<bool>' (CS0738) (Flowers.Forms) Thanks, Claudiu
Comments: Hi, I've downloaded the Xamarin Evolve Flowers example from the link above, but I have a compiler error (Xamarin Studio): /Flowers/Flowers.Forms/Flowers.Forms/Flowers.Forms/Helpers/DialogService.cs(18,18): Error CS0738: `Flowers.Forms.Helpers.DialogService' does not implement interface member `GalaSoft.MvvmLight.Views.IDialogService.ShowMessage(string, string, string, string, System.Action<bool>)' and the best implementing candidate `Flowers.Forms.Helpers.DialogService.ShowMessage(string, string, string, string, System.Action<bool>)' return type `System.Threading.Tasks.Task' does not match interface member return type `System.Threading.Tasks.Task<bool>' (CS0738) (Flowers.Forms) Thanks, Claudiu
↧
New Post: Binaries for Visual Studio Express developers (without NuGet)
Hi,
I would also recommend using the VS13 community edition. It is essentially Visual Studio Pro 13 and is free. The Express editions are not supported anymore.
I can possibly give you the DLLs but I do not compile on Visual Studio 2010 anymore and I don't test VS10 anymore either. That would be without any guarantee that it will work. If that's OK with you, fine.
Cheers
Laurent
I would also recommend using the VS13 community edition. It is essentially Visual Studio Pro 13 and is free. The Express editions are not supported anymore.
I can possibly give you the DLLs but I do not compile on Visual Studio 2010 anymore and I don't test VS10 anymore either. That would be without any guarantee that it will work. If that's OK with you, fine.
Cheers
Laurent
↧
Commented Unassigned: MonoTouch10 vs. Xamarinios10 [7679]
We are attempting to use MVVM Light in a Xamarin.iOS project, and when installing the toolkit through NuGet the "GalaSoft.MvvmLight.Platform" DLL only downloads in Xamarin.iOS projects targeting the older MonoTouch10 runtime, but not the newer 64-bit compatible Xamarinios10 runtime. Can the package be updated to support and target the newer runtime? Thanks!
Comments: Hi Claudiu, Weird, I though I updated that already. I will check it out. Thanks for the report, Laurent
Comments: Hi Claudiu, Weird, I though I updated that already. I will check it out. Thanks for the report, Laurent
↧