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: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="1.5*"/>
                            <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="*"/>
                                        <RowDefinition  Height="1.1*"/>
                                    </Grid.RowDefinitions>
                                    <TextBlock  Text="选择管道范围"  Foreground="#6c6c6c" FontSize="24" VerticalAlignment="Bottom"/>
                                    <TextBlock  Text="Selection of diameter range"  Grid.Row="1" Foreground="#bcbcbc" FontSize="16" VerticalAlignment="Top"/>
                                    <TextBlock  Grid.Row="1" Foreground="#bcbcbc" FontSize="16" VerticalAlignment="Top" Margin="0,25,0,0"> 
                                        <Run Text="管材:"/><Run x:Name="rMaterialName"/>
                                    </TextBlock>
                                </Grid>
                            </StackPanel>
                        </Grid>
                        <Grid Grid.Row="1">
                            <ListBox  ItemsSource="{Binding PipeRangeInfos}" Margin="0,0" ItemContainerStyle="{StaticResource ListBoxItemStyle}">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border x:Name="bdrMain"  Width="194" Height="75" BorderBrush="Transparent" Background="Transparent">
                                            <RadioButton x:Name="rb" MouseDoubleClick="rb_MouseDoubleClick" FontSize="16" Content="{Binding Range}" IsChecked="{Binding Path= IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  Style="{StaticResource RadioButtonStyle3 }"  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>