ESRI.ArcGIS.Mobile.Client
CheckableCommandParameter Class
Members  See Also  Send Feedback
ESRI.ArcGIS.Mobile.Client Namespace : CheckableCommandParameter Class

CheckableCommandParameter is used convey an IsChecked state from a command to its attached control (e.g., ToggleButton, MenuItem). It is passed as the CanExecuteRoutedEventArgs.Parameter property in the CanExecute handler. Using CheckableCommandParameter requires two steps: (1) Pass an instance of CheckableCommandParameter as the CommandParameter of the control (e.g., ToggleButton) and bind the controls IsChecked property to the CheckableCommandParameter.IsChecked property. (2) Update the CheckableCommandParameter.IsChecked property in your commands CanExecute handler. private void MyCommand_CanExecute(object sender, System.Windows.Input.CanExecuteRoutedEventArgs e) { e.CanExecute = ...; CheckableCommandParameter checkable = e.Parameter as CheckableCommandParameter; if (checkable != null) checkable.IsChecked = ...; }

Syntax

Visual Basic (Declaration) 
Public Class CheckableCommandParameter 
C# 
public class CheckableCommandParameter 

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.Mobile.Client.CheckableCommandParameter

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2010 All Rights Reserved.