Click here to Skip to main content
15,920,801 members
Home / Discussions / WPF
   

WPF

 
Questionsilverlight 4- which rows are updated with checkbox. [modified] Pin
arkiboys5-Jan-11 22:59
arkiboys5-Jan-11 22:59 
AnswerRe: silverlight 4- which rows are updated with checkbox. Pin
Pete O'Hanlon5-Jan-11 23:38
mvePete O'Hanlon5-Jan-11 23:38 
GeneralRe: silverlight 4- which rows are updated with checkbox. Pin
arkiboys5-Jan-11 23:43
arkiboys5-Jan-11 23:43 
QuestionParent, Child & GrandChild binding in WPF & Silverlight Pin
Chazzysb5-Jan-11 4:33
Chazzysb5-Jan-11 4:33 
AnswerRe: Parent, Child & GrandChild binding in WPF & Silverlight Pin
Abhinav S6-Jan-11 1:08
Abhinav S6-Jan-11 1:08 
GeneralRe: Parent, Child & GrandChild binding in WPF & Silverlight Pin
Chazzysb6-Jan-11 3:55
Chazzysb6-Jan-11 3:55 
QuestionHow can I create layout in the following way? Pin
Pankaj Nikam4-Jan-11 23:36
professionalPankaj Nikam4-Jan-11 23:36 
AnswerRe: How can I create layout in the following way? Pin
#realJSOP6-Jan-11 2:16
professional#realJSOP6-Jan-11 2:16 
GeneralRe: How can I create layout in the following way? Pin
mbcrump12-Jan-11 4:34
mentormbcrump12-Jan-11 4:34 
QuestionValidation for Duplication of Data by using Identifier name Pin
Rocky234-Jan-11 22:42
Rocky234-Jan-11 22:42 
AnswerRe: Validation for Duplication of Data by using Identifier name Pin
Pete O'Hanlon4-Jan-11 23:34
mvePete O'Hanlon4-Jan-11 23:34 
GeneralRe: Validation for Duplication of Data by using Identifier name Pin
Rocky234-Jan-11 23:49
Rocky234-Jan-11 23:49 
GeneralRe: Validation for Duplication of Data by using Identifier name Pin
Pete O'Hanlon5-Jan-11 0:41
mvePete O'Hanlon5-Jan-11 0:41 
Questionhow to export the WindowsFormsHost content in to pdf formate Pin
Member 41595674-Jan-11 20:18
Member 41595674-Jan-11 20:18 
Questionhow to generate tree view in MVVM- silverlight Pin
silverlightnewbee4-Jan-11 17:51
silverlightnewbee4-Jan-11 17:51 
AnswerRe: how to generate tree view in MVVM- silverlight Pin
Abhinav S4-Jan-11 18:30
Abhinav S4-Jan-11 18:30 
QuestionWCF Service and event [modified] Pin
CrafterIt4-Jan-11 0:03
CrafterIt4-Jan-11 0:03 
AnswerRe: WCF Service and event Pin
Abhinav S4-Jan-11 0:30
Abhinav S4-Jan-11 0:30 
GeneralRe: WCF Service and event Pin
CrafterIt4-Jan-11 2:09
CrafterIt4-Jan-11 2:09 
AnswerRe: WCF Service and event Pin
Abhinav S4-Jan-11 18:33
Abhinav S4-Jan-11 18:33 
GeneralRe: WCF Service and event Pin
CrafterIt4-Jan-11 20:39
CrafterIt4-Jan-11 20:39 
Questiontreeview- MVVM- how to fire a command on selectedItemChanged Pin
silverlightnewbee3-Jan-11 2:12
silverlightnewbee3-Jan-11 2:12 
Hi experts,

I have a small projects based on MVVM. I am using tree view control but I am unable to fire a command when a treeview node is selected. My command is declared in a ViewModel.cs file, command is defined in Command.cs file. the command is being called in XAML page. Codes from these three files are here for your ready reference. I searched web a lot, but did not overcome my problem.


XAML----------
<navigation:Page x:Class="WOManagement.Views.WOMeasurement2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlnsBig Grin | :-D ="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:my="clr-namespace:EIPControls;assembly=EIPControls"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
xmlns:lc="clr-namespace:WOManagement.ViewModel"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:newcombo="clr-namespace:WOManagement.ViewModel"
Title="WOMeasurement2 Page" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
d:DesignHeight="659" d:DesignWidth="887">
<UserControl.Resources>
<lc:WOMeasViewModel x:Key="Measurement"></lc:WOMeasViewModel>

</UserControl.Resources>
<sdk:Page.Effect>
<DropShadowEffect/>
</sdk:Page.Effect>
<Grid x:Name="LayoutRoot" Width="888" Height="660" DataContext="{Binding Source={StaticResource Measurement}}" >


<sdk:TreeView Height="230" HorizontalAlignment="Left" Name="trvWOList" VerticalAlignment="Top" Width="315" Margin="5"
ItemsSource="{Binding Path=lstWODetails, Mode=TwoWay}">
<sdk:TreeView.ItemTemplate>
<sdk:HierarchicalDataTemplate ItemsSource="{Binding Path=lstItemCodesTree, Mode=TwoWay}">
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding strWOParent}">

</TextBlock>
<TextBlock Text="{Binding strItemCode}"></TextBlock>
<TextBlock Text="{Binding strstage}"></TextBlock>
</StackPanel>
</sdk:HierarchicalDataTemplate>
</sdk:TreeView.ItemTemplate>
</sdk:TreeView>

</Grid>
</navigation:Page>



viewModel.cs-----------------------

using System.Windows.Input;
using WOManagement.Model;
using WOManagement.Commands;
using System.Windows;

namespace WOManagement.ViewModel
{
public class WOMeasViewModel : WOMeasModel
{

public ICommand test { get { return new check(); } }


}
}


Command.cs---------------

using System;
using System.Windows;
using System.Windows.Input;
using WOManagement.ServiceReference1;
using WOManagement.ViewModel;
using System.Collections;
using System.Collections.ObjectModel;

namespace WOManagement.Commands
{
public class check : ICommand
{

public bool CanExecute(object parameter)
{
return true;
}

public event EventHandler CanExecuteChanged;

public void Execute(object parameter)
{
MessageBox.Show("hi");
}
}
}




please some one help me.
AnswerRe: treeview- MVVM- how to fire a command on selectedItemChanged Pin
silverlightnewbee3-Jan-11 2:39
silverlightnewbee3-Jan-11 2:39 
QuestionHow to create the Captcha Option in Silverlight Pin
Mayur Bheda2-Jan-11 20:07
Mayur Bheda2-Jan-11 20:07 
AnswerRe: How to create the Captcha Option in Silverlight Pin
Abhinav S2-Jan-11 20:14
Abhinav S2-Jan-11 20:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.