><UserControl x:Class="OCSD.Controls.OCSDMultiSelector" > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" > xmlns:d="http://schemas.microsoft.com/expression/blend/2008" > xmlns:local="clr-namespace:OCSD.Controls" > mc:Ignorable="d" > x:Name="MultiSelector"> > <UserControl.Resources> > <ResourceDictionary> > <ResourceDictionary.MergedDictionaries> > <ResourceDictionary Source="../Themes/OCSDMultiselectorStyleDictionary.xaml"/> > </ResourceDictionary.MergedDictionaries> > </ResourceDictionary> > </UserControl.Resources> > <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> > <Grid VerticalAlignment="Center"> > <Grid.ColumnDefinitions> > <ColumnDefinition></ColumnDefinition> > <ColumnDefinition></ColumnDefinition> > </Grid.ColumnDefinitions> > <Label Grid.Column="0" x:Name="lblText" VerticalContentAlignment="Center" Content="{Binding LabelText, ElementName=MultiSelector}"></Label> > <ComboBox Grid.Column="1" > Margin="5,5,5,5" Name="cbContainer" DropDownOpened="cbContainer_DropDownOpened" > DropDownClosed="cbContainer_DropDownClosed" > > <ComboBoxItem> > <TreeView Loaded="tree_Loaded" > CheckBox.Checked="tree_Checked" > CheckBox.Unchecked ="tree_Checked" > x:Name="tree" > ItemContainerStyle="{StaticResource TreeViewItemStyle}" > ItemsSource="{Binding Mode=OneTime}" > ItemTemplate="{StaticResource CheckBoxItemTemplate}" > BorderBrush="Transparent" > /> > </ComboBoxItem> > </ComboBox> > </Grid> > </StackPanel> ></UserControl> >>
>>><ctrl:OCSDMultiSelector LabelText ="Route Manager:" x:Name="multiSelectorRouteManager" SelectedItems="{Binding SelectedRouteManagers, Mode=TwoWay}"/> >>>>>>
>>>public IList SelectedRouteManagers >>>{ >>> get >>> { >>> return _selectedRouteManagers; >>> } >>> >>> set >>> { >>> if (_selectedRouteManagers != value) >>> { >>> _selectedRouteManagers = value; >>> OnPropertyChanged("SelectedRouteManagers"); >>> } >>> } >>>} >>>private IList _selectedRouteManagers = new WFRouteManagerList(); >>>>>>
>>>protected override bool CanExecute() >>>{ >>> return View.Scope.Sites.Count > 0 >>> && ((ViewWorkflow)View).WorkflowContext.SelectedRouteManagers.Count > 0 >>> && ((ViewWorkflow)View).WorkflowContext.SelectedLOBs.Count > 0; >>>} >>>