UCSnapInfoView.xaml
5.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<UserControl x:Class="OS.Spin.View.MainWindowControls.UCSnapInfoView"
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:OS.Spin.View.MainWindowControls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" x:Name="FlawsView" AllowDrop="True">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Style/ScrollViewDictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid x:Name="Panel" >
<!--<ScrollViewer x:Name="BaseScroll" Template="{StaticResource MyScrollViewer}"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">-->
<ListBox x:Name="Flaws" ItemsSource="{Binding ElementName=FlawsView, Path=AllFlaws, IsAsync=True}" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="7"
VerticalAlignment="Top" HorizontalAlignment="Left" IsItemsHost="False" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<!--<Border BorderThickness="1" BorderBrush="DarkGray">-->
<Grid Width="193" Height="310">
<Grid.RowDefinitions>
<RowDefinition Height="180"/>
<RowDefinition Height="13"/>
<RowDefinition Height="97"/>
<RowDefinition Height="13"/>
</Grid.RowDefinitions>
<Canvas x:Name="Snap" Grid.Row="0" HorizontalAlignment="Center" Tag="{Binding Path=Id}" VerticalAlignment="Center" Width="196" Height="187" MouseDown="Snap_MouseDown">
<Canvas.Background>
<ImageBrush ImageSource="../images/组 17 拷贝 4.png" Stretch="Fill"/>
</Canvas.Background>
<TextBlock Width="115.5" Height="114" Block.TextAlignment="Center" Canvas.Left="40" Canvas.Top="32" Padding="5.5,5.5,0,0"><InlineUIContainer>
<Image Stretch="Fill" Source="{Binding Path=SnapInfo}" x:Name="logo"/>
</InlineUIContainer></TextBlock>
</Canvas>
<StackPanel Orientation="Vertical" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="196" Height="97" x:Name="stack">
<StackPanel.Background>
<ImageBrush ImageSource="../images/形状 1 拷贝 5.png" Stretch="Fill"/>
</StackPanel.Background>
<StackPanel Orientation="Horizontal" Width="196" Height="32.333333">
<TextBlock Foreground="White" FontSize="19" Width="70" Text="编号" Block.TextAlignment="Center" Padding="0,4,0,0"/>
<TextBlock Foreground="White" FontSize="19" x:Name="textBlockOne" Block.TextAlignment="Center" Text="{Binding Path=Id}" Padding="0,4,0,0"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Width="196" Height="32.333333">
<TextBlock Foreground="White" FontSize="19" Width="70" Text="维度" Block.TextAlignment="Center" Padding="0,4,0,0"/>
<TextBlock Foreground="White" FontSize="19" x:Name="textBlockTwo" Block.TextAlignment="Center" Padding="0,4,0,0">
<TextBlock.Text>
<Binding Path="CenterY">
<Binding.Converter>
<local:DoubleToStringConverter>
</local:DoubleToStringConverter>
</Binding.Converter>
</Binding>
</TextBlock.Text>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Width="196" Height="32.333333">
<TextBlock Foreground="White" FontSize="19" Width="70" Text="瑕疵" Block.TextAlignment="Center" Padding="0,4,0,0"/>
<TextBlock Foreground="White" FontSize="19" x:Name="textBlockThree" Block.TextAlignment="Center" Text="{Binding Path=FlawName}" Padding="0,4,0,0"/>
</StackPanel>
</StackPanel>
<!--<Grid.Background>
<ImageBrush ImageSource="/images/clothselect/底图.png" Stretch="Fill"/>
</Grid.Background>-->
</Grid>
<!--</Border>-->
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.Background>
<ImageBrush ImageSource="../images/底图.png" Stretch="Fill"/>
</ListBox.Background>
</ListBox>
<!--</ScrollViewer>-->
<!--<Grid.Background>
<ImageBrush ImageSource="/images/clothselect/底图.png" Stretch="Fill"/>
</Grid.Background>-->
</Grid>
</UserControl>