Newer
Older
Correlator / PipeGallery / View / SelectPipeRangeView.xaml
<UserControl
    x:Class="PipeGallery.View.SelectPipeRangeView"
    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"
    d:DesignHeight="768"
    d:DesignWidth="1366"
    Background="#b4000000"
    mc:Ignorable="d">
    <Grid>
        <Viewbox>
            <Grid Width="1366" Height="768">
                <Border
                    Width="860"
                    Height="560"
                    Background="White"
                    CornerRadius="10">
                    <Grid Margin="10">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="1.5*" />
                            <RowDefinition Height="7*" />
                        </Grid.RowDefinitions>
                        <Grid>
                            <StackPanel Margin="0,0,0,0" Orientation="Horizontal">
                                <Button
                                    x:Name="btnReturn"
                                    Margin="10,0,20,0"
                                    Style="{StaticResource BtnReturnStyle}" />
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="1.1*" />
                                    </Grid.RowDefinitions>
                                    <TextBlock
                                        VerticalAlignment="Bottom"
                                        FontSize="24"
                                        Foreground="#6c6c6c"
                                        Text="选择管道范围" />
                                    <TextBlock
                                        Grid.Row="1"
                                        VerticalAlignment="Top"
                                        FontSize="16"
                                        Foreground="#bcbcbc"
                                        Text="Selection of diameter range" />
                                    <TextBlock
                                        Grid.Row="1"
                                        Margin="0,25,0,0"
                                        VerticalAlignment="Top"
                                        FontSize="16"
                                        Foreground="#bcbcbc">
                                        <Run Text="管材:" /><Run x:Name="rMaterialName" />
                                    </TextBlock>
                                </Grid>
                            </StackPanel>
                        </Grid>
                        <Grid Grid.Row="1">
                            <ListBox
                                Margin="0,0"
                                ItemContainerStyle="{StaticResource ListBoxItemStyle}"
                                ItemsSource="{Binding PipeRangeInfos}">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border
                                            x:Name="bdrMain"
                                            Width="194"
                                            Height="75"
                                            Background="Transparent"
                                            BorderBrush="Transparent">
                                            <RadioButton
                                                x:Name="rb"
                                                Margin="0,0,0,0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Content="{Binding Range}"
                                                FontSize="16"
                                                GroupName="pipe"
                                                IsChecked="{Binding Path=IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                MouseDoubleClick="rb_MouseDoubleClick"
                                                Style="{StaticResource RadioButtonStyle3}" />
                                        </Border>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                                <ListBox.Template>
                                    <ControlTemplate TargetType="{x:Type ListBox}">
                                        <Grid VerticalAlignment="Top" Background="Transparent">
                                            <ScrollViewer HorizontalScrollBarVisibility="Hidden">
                                                <WrapPanel
                                                    Width="780"
                                                    HorizontalAlignment="Center"
                                                    IsItemsHost="True" />
                                            </ScrollViewer>
                                        </Grid>
                                    </ControlTemplate>
                                </ListBox.Template>
                            </ListBox>
                        </Grid>
                    </Grid>
                </Border>
            </Grid>
        </Viewbox>
    </Grid>
</UserControl>