91 lines
4.8 KiB
XML
91 lines
4.8 KiB
XML
<Window x:Class="WeldingCommon.Views.WDSelectScoutField"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:WeldingCommon.Views"
|
|
xmlns:behavior="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
|
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
xmlns:aurorauicomponent="clr-namespace:AuroraUIComponent;assembly=AuroraUIComponent"
|
|
xmlns:usercontrols="clr-namespace:AuroraUIComponent.UserControls;assembly=AuroraUIComponent"
|
|
d:DataContext="{d:DesignInstance Type=local:WDSelectScoutFieldViewModel}"
|
|
mc:Ignorable="d"
|
|
Name="uc"
|
|
Background="#FFAAAAAA"
|
|
SizeToContent="WidthAndHeight"
|
|
WindowStartupLocation="CenterOwner"
|
|
Title="Select Scout Field"
|
|
d:DesignHeight="600">
|
|
<Window.Resources>
|
|
<Style x:Key="ListBoxResource" TargetType="{x:Type ListBoxItem}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background">
|
|
<Setter.Value>
|
|
<ImageBrush ImageSource="pack://application:,,,/WeldingCommon;component/Resource/slash.jpg"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
<Grid>
|
|
<Rectangle SnapsToDevicePixels="True">
|
|
<Rectangle.Fill>
|
|
<Binding Path="Background" RelativeSource="{RelativeSource TemplatedParent}"/>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<ContentPresenter/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource ListBoxResource}">
|
|
<Setter Property="IsSelected" Value="{Binding Enabled, Mode=TwoWay}"/>
|
|
</Style>
|
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
|
<Setter Property="Width" Value="100"/>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<DockPanel LastChildFill="True">
|
|
<WrapPanel Margin="2" DockPanel.Dock="Top">
|
|
<Button Click="Button_Click_EditPosIdx" Content="Edit Pos Idx"/>
|
|
<Button Click="Button_Click_SelectAll" Content="Select All"/>
|
|
<Button Click="Button_Click_DeSelectAll" Content="Deselect All"/>
|
|
<Button Click="Button_Click_Invert" Content="Invert"/>
|
|
<Button Click="Button_Click_Save" Content="Save"/>
|
|
</WrapPanel>
|
|
<Grid Height="600">
|
|
<Image x:Name="BackgroundImage" Source="{Binding BackgroundImage}"/>
|
|
<ListBox x:Name="ListBox" Height="{Binding ActualHeight, ElementName=BackgroundImage}" Width="{Binding ActualWidth, ElementName=BackgroundImage}"
|
|
ItemsSource="{Binding FieldScanParamList}"
|
|
PreviewMouseLeftButtonDown="ListBox_PreviewMouseLeftButtonDown"
|
|
PreviewMouseLeftButtonUp="ListBox_PreviewMouseLeftButtonUp"
|
|
PreviewMouseMove="ListBox_PreviewMouseMove"
|
|
SelectionMode="Multiple">
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid
|
|
Rows="{Binding RowCount}"
|
|
Columns="{Binding ColumnCount}"/>
|
|
<!--아래 코드로는 바인딩이 안되는 이슈가 있음-->
|
|
<!--<UniformGrid Rows="{Binding RowCount, ElementName=uc}" Columns="{Binding ColumnCount, ElementName=uc}"/>-->
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Rectangle Stroke="DarkBlue" StrokeDashArray="5 5 1 5" StrokeThickness="1"/>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</DockPanel>
|
|
|
|
</Grid>
|
|
</Window>
|