<UserControl x:Class="PipeGallery.View.SelectRangingPipeMaterialView" 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" mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366" Background="#b4000000"> <Grid> <Viewbox> <Grid Width="1366" Height="768"> <Border Width="860" Height="560" Background="White" CornerRadius="10"> <Grid Margin="10"> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="7*"/> </Grid.RowDefinitions> <Grid> <StackPanel Orientation="Horizontal" Margin="0,0,0,0"> <Button x:Name="btnReturn" Margin="10,0,20,0" Style="{StaticResource BtnReturnStyle}" /> <Grid> <Grid.RowDefinitions> <RowDefinition Height="1.1*"/> <RowDefinition Height="0.9*"/> </Grid.RowDefinitions> <TextBlock Text="选择管道材质" Foreground="#6c6c6c" FontSize="24" VerticalAlignment="Bottom"/> <TextBlock Text="Selection of pipe material" Grid.Row="1" Foreground="#bcbcbc" FontSize="14" VerticalAlignment="Top"/> </Grid> </StackPanel> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="20,0,0,0"> <Button x:Name="btnDefault" Visibility="Collapsed" Content="还原默认值" Width="110" Margin="10,0" Style="{StaticResource BtnCommonStyle}" > <Button.Background> <ImageBrush ImageSource="/PipeGallery;component/Image/tubiao_45.png" /> </Button.Background> <Button.Tag> <ImageBrush ImageSource="/PipeGallery;component/Image/tubiao_15.png" /> </Button.Tag> </Button> </StackPanel> </Grid> <Grid Grid.Row="1"> <ListBox ItemsSource="{Binding PipeMaterialInfos}" Margin="0,20" ItemContainerStyle="{StaticResource ListBoxItemStyle}"> <ListBox.ItemTemplate> <DataTemplate> <Border x:Name="bdrMain" Width="194" Height="107" BorderBrush="Transparent" Background="Transparent"> <RadioButton x:Name="rb" MouseDoubleClick="rb_MouseDoubleClick" Content="{Binding Name}" Tag="{Binding Name2}" DataContext="{Binding}" IsChecked="{Binding Path= IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="20" Style="{StaticResource RadioButtonStyle2 }" GroupName="pipe" Margin="0,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> </DataTemplate> </ListBox.ItemTemplate> <ListBox.Template> <ControlTemplate TargetType="{x:Type ListBox}"> <Grid Background="Transparent" VerticalAlignment="Top" > <ScrollViewer HorizontalScrollBarVisibility="Hidden"> <WrapPanel Width="780" IsItemsHost="True" HorizontalAlignment="Center"/> </ScrollViewer> </Grid> </ControlTemplate> </ListBox.Template> </ListBox> </Grid> </Grid> </Border> </Grid> </Viewbox> </Grid> </UserControl>