mvvm-toolkit

Issue MonthPicker Size with MVVM Light toolkit

北战南征 提交于 2019-12-25 08:13:46
问题 I've a strange issue with my monthpicker. It has a huge width at initialization. I'm using MVVM Light Toolkit and it seems that's causing the issue. Indeed, with a standard WPF application, the same code works... Another hint, without the popup control, this code works with MVVM Light Toolkit. Here is my code: <Window x:Class="MvvmLight1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" SizeToContent=

DataBinding with MVVM Light tool kit

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 04:19:34
问题 I get some trouble with the binding using MVVM toolkit and would likr to knwo some advise if I do things correctly. First of all I have the View Model Locator which is defined as follow : public class ViewModelLocator { private static MainViewModel _main; private static ProductViewModel _product; /// <summary> /// Initializes a new instance of the ViewModelLocator class. /// </summary> public ViewModelLocator() { ////if (ViewModelBase.IsInDesignModeStatic) ////{ //// // Create design time

How To Bind a Property to Textbox using MVVM and MVVM toolkit?

牧云@^-^@ 提交于 2019-12-07 01:31:05
问题 I am new to MVVM. to learn I created a sample application to show a message in a text box while clicking on button. In my code the button command is working properly but the property is not binding to the Textbox. How to bind Property to Textbox using MVVM? My code is similar like given below. View <TextBox Name="MessageTextBox" Text="{Binding TestMessage}"/> <Button Content="Show" Name="button1" Command="{Binding ShowCommand}"> <!-- Command Handler --> </Button> View Model MyMessage

How To Bind a Property to Textbox using MVVM and MVVM toolkit?

こ雲淡風輕ζ 提交于 2019-12-05 07:13:38
I am new to MVVM. to learn I created a sample application to show a message in a text box while clicking on button. In my code the button command is working properly but the property is not binding to the Textbox. How to bind Property to Textbox using MVVM? My code is similar like given below. View <TextBox Name="MessageTextBox" Text="{Binding TestMessage}"/> <Button Content="Show" Name="button1" Command="{Binding ShowCommand}"> <!-- Command Handler --> </Button> View Model MyMessage myMessage; public MainViewModel() { myMessage=new MyMessage(); } //inside the ShowCommand Handler TestMessage=

Intellisense doesn't work for MVVM light toolkit

主宰稳场 提交于 2019-12-04 04:52:06
问题 I began to use MVVM pattern yesterday.But for working with events i needed to install MVVM light toolkit.I did that,and added library to references.At UserControl i announced that library,but when i want to use toolkit whatever i write it doesnt show any suggestions and doesnt accept what i want to write and shows this error "A value of type 'EventToCommand' cannot be added to a collection or dictionary of type 'TriggerActionCollection' " <EventTrigger RoutedEvent="TextChanged"> <mvvm

Intellisense doesn't work for MVVM light toolkit

久未见 提交于 2019-12-02 02:20:07
I began to use MVVM pattern yesterday.But for working with events i needed to install MVVM light toolkit.I did that,and added library to references.At UserControl i announced that library,but when i want to use toolkit whatever i write it doesnt show any suggestions and doesnt accept what i want to write and shows this error "A value of type 'EventToCommand' cannot be added to a collection or dictionary of type 'TriggerActionCollection' " <EventTrigger RoutedEvent="TextChanged"> <mvvm:EventToCommand Command="{Binding Test}"/> </EventTrigger> ` You have to use it like this .. Namespace to add :

How to pass parameters to command using multibinding?

会有一股神秘感。 提交于 2019-11-27 16:59:44
问题 I am using MVVM tool kit version1. I have two Text boxes textbox1 and textbox2. I need to pass these two values as parameter when pressing on button and need to show the result on a third Text Box named textbox3. my VM code similar like this public ICommand AddCommand { get { if (addCommand == null) { addCommand = new DelegateCommand<object>(CommandExecute,CanCommandExecute); } return addCommand; } } private void CommandExecute(object parameter) { var values = (object[])parameter; var a= (int