aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2018-08-04 15:27:45 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2018-08-04 15:27:45 +0300
commitdf9efa378c7741e325b0de775cf7b33634b9f8b3 (patch)
tree6b21faff08f9fbbf1e6e158ccab4ea3f81b60371 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner
parentdb9119d86fa9e2efd2c3dfab8ac2c49c2ee4da70 (diff)
downloadTango-df9efa378c7741e325b0de775cf7b33634b9f8b3.tar.gz
Tango-df9efa378c7741e325b0de775cf7b33634b9f8b3.zip
Implemented Blowers, Break Sensors in Machine Versions Module.
Removed all unnecessary Observable entities extension methods.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/blower.pngbin0 -> 1575 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/break.pngbin0 -> 1388 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs126
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml76
5 files changed, 207 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/blower.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/blower.png
new file mode 100644
index 000000000..a3797b514
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/blower.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/break.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/break.png
new file mode 100644
index 000000000..67bd5982e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Images/break.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
index 270915bd2..13f075684 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
@@ -166,10 +166,16 @@
<ItemGroup>
<Resource Include="Images\speed.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\break.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\blower.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
index f91badebe..3dd4e62a3 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
@@ -96,6 +96,34 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
set { _selectedSpeedSensorTypes = value; RaisePropertyChangedAuto(); }
}
+ private SelectedObjectCollection<HardwareBlowerType> _blowerTypes;
+ public SelectedObjectCollection<HardwareBlowerType> BlowerTypes
+ {
+ get { return _blowerTypes; }
+ set { _blowerTypes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<HardwareBlowerType> _selectedBlowerTypes;
+ public ObservableCollection<HardwareBlowerType> SelectedBlowerTypes
+ {
+ get { return _selectedBlowerTypes; }
+ set { _selectedBlowerTypes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private SelectedObjectCollection<HardwareBreakSensorType> _breakSensorTypes;
+ public SelectedObjectCollection<HardwareBreakSensorType> BreakSensorTypes
+ {
+ get { return _breakSensorTypes; }
+ set { _breakSensorTypes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<HardwareBreakSensorType> _selectedBreakSensorTypes;
+ public ObservableCollection<HardwareBreakSensorType> SelectedBreakSensorTypes
+ {
+ get { return _selectedBreakSensorTypes; }
+ set { _selectedBreakSensorTypes = value; RaisePropertyChangedAuto(); }
+ }
+
private HardwareVersion _selectedVersion;
public HardwareVersion SelectedVersion
{
@@ -159,7 +187,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
CurrentVersion = new HardwareVersion();
CreateTemplate(CurrentVersion);
- CopyParametersCommand = new RelayCommand(CopyParameters,(x) => SelectedVersion != null && SelectedHardwareObjectType != null);
+ CopyParametersCommand = new RelayCommand(CopyParameters, (x) => SelectedVersion != null && SelectedHardwareObjectType != null);
CloneCommand = new RelayCommand(CloneCurrentVersion, () => SelectedVersion != null);
}
@@ -188,6 +216,14 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
{
target = CurrentVersion.HardwareSpeedSensors.SingleOrDefault(x => x.HardwareSpeedSensorType == source);
}
+ else if (source is HardwareBlowerType)
+ {
+ target = CurrentVersion.HardwareBlowers.SingleOrDefault(x => x.HardwareBlowerType == source);
+ }
+ else if (source is HardwareBreakSensorType)
+ {
+ target = CurrentVersion.HardwareBreakSensors.SingleOrDefault(x => x.HardwareBreakSensorType == source);
+ }
target.MapPrimitivesTo(SelectedHardwareObject);
}
@@ -276,6 +312,38 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
SelectedHardwareObject = hardwareObj;
}
}
+ else if (SelectedHardwareObjectType is SelectedObject<HardwareBlowerType>)
+ {
+ var type = (SelectedHardwareObjectType as SelectedObject<HardwareBlowerType>).Data;
+ var hardwareObj = CurrentVersion.HardwareBlowers.SingleOrDefault(x => x.HardwareBlowerType == type);
+
+ if (hardwareObj != null)
+ {
+ SelectedHardwareObject = hardwareObj;
+ }
+ else
+ {
+ hardwareObj = new HardwareBlower() { HardwareBlowerType = type };
+ CurrentVersion.HardwareBlowers.Add(hardwareObj);
+ SelectedHardwareObject = hardwareObj;
+ }
+ }
+ else if (SelectedHardwareObjectType is SelectedObject<HardwareBreakSensorType>)
+ {
+ var type = (SelectedHardwareObjectType as SelectedObject<HardwareBreakSensorType>).Data;
+ var hardwareObj = CurrentVersion.HardwareBreakSensors.SingleOrDefault(x => x.HardwareBreakSensorType == type);
+
+ if (hardwareObj != null)
+ {
+ SelectedHardwareObject = hardwareObj;
+ }
+ else
+ {
+ hardwareObj = new HardwareBreakSensor() { HardwareBreakSensorType = type };
+ CurrentVersion.HardwareBreakSensors.Add(hardwareObj);
+ SelectedHardwareObject = hardwareObj;
+ }
+ }
}
}
@@ -288,6 +356,8 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
SelectedPidControlTypes = new ObservableCollection<HardwarePidControlType>();
SelectedWinderTypes = new ObservableCollection<HardwareWinderType>();
SelectedSpeedSensorTypes = new ObservableCollection<HardwareSpeedSensorType>();
+ SelectedBlowerTypes = new ObservableCollection<HardwareBlowerType>();
+ SelectedBreakSensorTypes = new ObservableCollection<HardwareBreakSensorType>();
}
else
{
@@ -296,6 +366,8 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
SelectedPidControlTypes = version.HardwarePidControls.Select(x => x.HardwarePidControlType).ToObservableCollection();
SelectedWinderTypes = version.HardwareWinders.Select(x => x.HardwareWinderType).ToObservableCollection();
SelectedSpeedSensorTypes = version.HardwareSpeedSensors.Select(x => x.HardwareSpeedSensorType).ToObservableCollection();
+ SelectedBlowerTypes = version.HardwareBlowers.Select(x => x.HardwareBlowerType).ToObservableCollection();
+ SelectedBreakSensorTypes = version.HardwareBreakSensors.Select(x => x.HardwareBreakSensorType).ToObservableCollection();
}
MotorTypes = new SelectedObjectCollection<HardwareMotorType>(Adapter.HardwareMotorTypes, SelectedMotorTypes);
@@ -303,6 +375,8 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
PidControlTypes = new SelectedObjectCollection<HardwarePidControlType>(Adapter.HardwarePidControlTypes, SelectedPidControlTypes);
WinderTypes = new SelectedObjectCollection<HardwareWinderType>(Adapter.HardwareWinderTypes, SelectedWinderTypes);
SpeedSensorTypes = new SelectedObjectCollection<HardwareSpeedSensorType>(Adapter.HardwareSpeedSensorTypes, SelectedSpeedSensorTypes);
+ BlowerTypes = new SelectedObjectCollection<HardwareBlowerType>(Adapter.HardwareBlowerTypes, SelectedBlowerTypes);
+ BreakSensorTypes = new SelectedObjectCollection<HardwareBreakSensorType>(Adapter.HardwareBreakSensorTypes, SelectedBreakSensorTypes);
}
private void OnSelectedVersionChanged()
@@ -363,6 +437,8 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
realVersion.HardwarePidControls.ToList().Where(x => !SelectedPidControlTypes.Contains(x.HardwarePidControlType)).ToList().ForEach(x => realVersion.HardwarePidControls.Remove(x));
realVersion.HardwareWinders.ToList().Where(x => !SelectedWinderTypes.Contains(x.HardwareWinderType)).ToList().ForEach(x => realVersion.HardwareWinders.Remove(x));
realVersion.HardwareSpeedSensors.ToList().Where(x => !SelectedSpeedSensorTypes.Contains(x.HardwareSpeedSensorType)).ToList().ForEach(x => realVersion.HardwareSpeedSensors.Remove(x));
+ realVersion.HardwareBlowers.ToList().Where(x => !SelectedBlowerTypes.Contains(x.HardwareBlowerType)).ToList().ForEach(x => realVersion.HardwareBlowers.Remove(x));
+ realVersion.HardwareBreakSensors.ToList().Where(x => !SelectedBreakSensorTypes.Contains(x.HardwareBreakSensorType)).ToList().ForEach(x => realVersion.HardwareBreakSensors.Remove(x));
}
else
{
@@ -376,12 +452,16 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
realVersion.HardwarePidControls.ToList().ForEach(x => x.DefferedDelete(Adapter.Context));
realVersion.HardwareWinders.ToList().ForEach(x => x.DefferedDelete(Adapter.Context));
realVersion.HardwareSpeedSensors.ToList().ForEach(x => x.DefferedDelete(Adapter.Context));
+ realVersion.HardwareBlowers.ToList().ForEach(x => x.DefferedDelete(Adapter.Context));
+ realVersion.HardwareBreakSensors.ToList().ForEach(x => x.DefferedDelete(Adapter.Context));
realVersion.HardwareDancers.Clear();
realVersion.HardwareMotors.Clear();
realVersion.HardwarePidControls.Clear();
realVersion.HardwareWinders.Clear();
realVersion.HardwareSpeedSensors.Clear();
+ realVersion.HardwareBlowers.Clear();
+ realVersion.HardwareBreakSensors.Clear();
foreach (var type in SelectedDancerTypes)
{
@@ -472,6 +552,42 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
});
}
}
+
+ foreach (var type in SelectedBlowerTypes)
+ {
+ var item = CurrentVersion.HardwareBlowers.SingleOrDefault(x => x.HardwareBlowerType == type);
+ if (item != null)
+ {
+ item.HardwareVersionGuid = realVersion.Guid;
+ realVersion.HardwareBlowers.Add(item);
+ }
+ else
+ {
+ realVersion.HardwareBlowers.Add(new HardwareBlower()
+ {
+ HardwareVersionGuid = realVersion.Guid,
+ HardwareBlowerType = type
+ });
+ }
+ }
+
+ foreach (var type in SelectedBreakSensorTypes)
+ {
+ var item = CurrentVersion.HardwareBreakSensors.SingleOrDefault(x => x.HardwareBreakSensorType == type);
+ if (item != null)
+ {
+ item.HardwareVersionGuid = realVersion.Guid;
+ realVersion.HardwareBreakSensors.Add(item);
+ }
+ else
+ {
+ realVersion.HardwareBreakSensors.Add(new HardwareBreakSensor()
+ {
+ HardwareVersionGuid = realVersion.Guid,
+ HardwareBreakSensorType = type
+ });
+ }
+ }
}
@@ -499,7 +615,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
{
using (_notification.PushTaskItem("Cloning hardware configuration..."))
{
- await Task.Factory.StartNew(() =>
+ await Task.Factory.StartNew(() =>
{
var realVersion = CurrentVersion.Clone();
realVersion.Name = name;
@@ -510,18 +626,24 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
realVersion.HardwarePidControls.ToList().Where(x => !SelectedPidControlTypes.Contains(x.HardwarePidControlType)).ToList().ForEach(x => realVersion.HardwarePidControls.Remove(x));
realVersion.HardwareWinders.ToList().Where(x => !SelectedWinderTypes.Contains(x.HardwareWinderType)).ToList().ForEach(x => realVersion.HardwareWinders.Remove(x));
realVersion.HardwareSpeedSensors.ToList().Where(x => !SelectedSpeedSensorTypes.Contains(x.HardwareSpeedSensorType)).ToList().ForEach(x => realVersion.HardwareSpeedSensors.Remove(x));
+ realVersion.HardwareBlowers.ToList().Where(x => !SelectedBlowerTypes.Contains(x.HardwareBlowerType)).ToList().ForEach(x => realVersion.HardwareBlowers.Remove(x));
+ realVersion.HardwareBreakSensors.ToList().Where(x => !SelectedBreakSensorTypes.Contains(x.HardwareBreakSensorType)).ToList().ForEach(x => realVersion.HardwareBreakSensors.Remove(x));
realVersion.HardwareMotors.ToList().ForEach(x => x.HardwareVersionGuid = realVersion.Guid);
realVersion.HardwareDancers.ToList().ForEach(x => x.HardwareVersionGuid = realVersion.Guid);
realVersion.HardwarePidControls.ToList().ForEach(x => x.HardwareVersionGuid = realVersion.Guid);
realVersion.HardwareWinders.ToList().ForEach(x => x.HardwareVersionGuid = realVersion.Guid);
realVersion.HardwareSpeedSensors.ToList().ForEach(x => x.HardwareVersionGuid = realVersion.Guid);
+ realVersion.HardwareBlowers.ToList().ForEach(x => x.HardwareVersionGuid = realVersion.Guid);
+ realVersion.HardwareBreakSensors.ToList().ForEach(x => x.HardwareVersionGuid = realVersion.Guid);
realVersion.HardwareMotors.ToList().ForEach(x => x.HardwareVersion = realVersion);
realVersion.HardwareDancers.ToList().ForEach(x => x.HardwareVersion = realVersion);
realVersion.HardwarePidControls.ToList().ForEach(x => x.HardwareVersion = realVersion);
realVersion.HardwareWinders.ToList().ForEach(x => x.HardwareVersion = realVersion);
realVersion.HardwareSpeedSensors.ToList().ForEach(x => x.HardwareVersion = realVersion);
+ realVersion.HardwareBlowers.ToList().ForEach(x => x.HardwareVersion = realVersion);
+ realVersion.HardwareBreakSensors.ToList().ForEach(x => x.HardwareVersion = realVersion);
Adapter.Context.HardwareVersions.Add(realVersion);
realVersion.Save(Adapter.Context);
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
index e22b0e71a..86e0da5b5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
@@ -263,6 +263,82 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
+
+ <StackPanel Orientation="Horizontal" Margin="0 20 0 0">
+ <Image VerticalAlignment="Center" Source="../Images/blower.png" Width="32"></Image>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold">BLOWERS</TextBlock>
+ </StackPanel>
+ <ListBox Style="{StaticResource typesList}" HorizontalContentAlignment="Stretch" ItemsSource="{Binding BlowerTypes}" Margin="60 15" SelectedItem="{Binding SelectedHardwareObjectType}">
+ <ListBox.ItemTemplate>
+ <DataTemplate DataType="{x:Type entities:HardwareBlowerType}">
+ <DockPanel>
+ <Button DockPanel.Dock="Right" Cursor="Hand" Foreground="DimGray" Height="20" FontSize="10" ToolTip="Copy this item parameters to the selected item" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.CopyParametersCommand}" CommandParameter="{Binding}">
+ <Button.Style>
+ <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignFlatButton}">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SelectedHardwareObjectType.Data.ObjectType.BaseType}" Value="{x:Type entities:HardwareBlowerType}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Button.Style>
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center">Copy Parameters</TextBlock>
+ <materialDesign:PackIcon Margin="10 0 0 0" VerticalAlignment="Center" Kind="ArrowRight" Width="16" Height="16" />
+ </StackPanel>
+ </Button.Content>
+ </Button>
+ <StackPanel Orientation="Horizontal">
+ <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsSelected}"></CheckBox>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding Data.Description}"></TextBlock>
+ </StackPanel>
+ </DockPanel>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+
+ <StackPanel Orientation="Horizontal" Margin="0 20 0 0">
+ <Image VerticalAlignment="Center" Source="../Images/break.png" Width="32"></Image>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold">BREAK SENSORS</TextBlock>
+ </StackPanel>
+ <ListBox Style="{StaticResource typesList}" HorizontalContentAlignment="Stretch" ItemsSource="{Binding BreakSensorTypes}" Margin="60 15" SelectedItem="{Binding SelectedHardwareObjectType}">
+ <ListBox.ItemTemplate>
+ <DataTemplate DataType="{x:Type entities:HardwareBreakSensorType}">
+ <DockPanel>
+ <Button DockPanel.Dock="Right" Cursor="Hand" Foreground="DimGray" Height="20" FontSize="10" ToolTip="Copy this item parameters to the selected item" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.CopyParametersCommand}" CommandParameter="{Binding}">
+ <Button.Style>
+ <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignFlatButton}">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SelectedHardwareObjectType.Data.ObjectType.BaseType}" Value="{x:Type entities:HardwareBreakSensorType}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Button.Style>
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center">Copy Parameters</TextBlock>
+ <materialDesign:PackIcon Margin="10 0 0 0" VerticalAlignment="Center" Kind="ArrowRight" Width="16" Height="16" />
+ </StackPanel>
+ </Button.Content>
+ </Button>
+ <StackPanel Orientation="Horizontal">
+ <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsSelected}"></CheckBox>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding Data.Description}"></TextBlock>
+ </StackPanel>
+ </DockPanel>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
</StackPanel>
</ScrollViewer>