| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <UserControl x:Class="ivf_tl_Operate.CustomUserControls.CustomHouseInfo"
- 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:ivf_tl_Operate.CustomUserControls"
- mc:Ignorable="d"
- Name="_CustomHouseInfo">
- <!--Background="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CustomHouseInfo}, Path=ExDishSource,Converter={StaticResource HouseInfoBackgroundConvert}}"-->
- <!-- M4-03-1:圆形造型强约束(需求6.1)=大圆培养皿+圆周16well+圆心舱号。
- 16well 极坐标几何(.xaml.cs:24-91 半径115/16等分/偏移90°)与内部 Canvas 固定 360×955 绝对坐标
- 一律不动——保几何正确性优先,不在控件内拆相对单位。
- 自适应做法="内部固定画布 + 外部等比缩放":此处用 Viewbox(Stretch=Uniform)包住固定画布,
- 使整控件作为一个等比单元随舱格(MainPageView 舱区 * 列宽/行高)与顶层 Viewbox(M4-01-1)等比缩放,
- 圆形皿在自适应竖屏下不变形/不错位(关联 V-079/V-M4-10)。MouseDown 点击事件经 Viewbox 正常冒泡,进详情保持。 -->
- <Viewbox Stretch="Uniform">
- <Canvas MouseDown="Canvas_MouseDown" Height="955" Width="360" >
- <Canvas.Background>
- <MultiBinding Converter="{StaticResource HouseInfoBackgroundConvert1}">
- <Binding ElementName="_CustomHouseInfo" Path="ExDishSource"/>
- <Binding ElementName="_CustomHouseInfo" Path="ExHouseSource.pressureAlarm"/>
- <Binding ElementName="_CustomHouseInfo" Path="ExHouseSource.temperatureAlarm"/>
- </MultiBinding>
- </Canvas.Background>
- <Rectangle x:Name="maskHouse" Panel.ZIndex="100" Height="955" Width="360" Fill="Black" Opacity="0"/>
- <StackPanel Width="363">
- <TextBlock Margin="0 5 0 0" Text="{DynamicResource C0322}" HorizontalAlignment="Center" FontSize="36" FontWeight="Medium" Foreground="Red"
- Visibility="{Binding ElementName=_CustomHouseInfo,Converter={StaticResource Int0ToCollapsedConvert}, Path=ExHouseSource.temperatureAlarm}"/>
- <TextBlock Margin="0 5 0 0" Text="{DynamicResource C0321}" HorizontalAlignment="Center" FontSize="36" FontWeight="Medium" Foreground="Red"
- Visibility="{Binding ElementName=_CustomHouseInfo,Converter={StaticResource Int0ToCollapsedConvert}, Path=ExHouseSource.pressureAlarm}"/>
- </StackPanel>
- <Canvas x:Name="_canvasOpen" Canvas.Left="28" Canvas.Top="143.5" Width="304" Height="304"
- Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:CustomHouseInfo}}, Path=ExHouseSource.houseDoorState, Converter={StaticResource HouseDoorStateConvert}, ConverterParameter=1}">
- <Canvas.Background>
- <ImageBrush ImageSource="/ivf_tl_Operate;component/Resources/Image/open.png"></ImageBrush>
- </Canvas.Background>
- <TextBlock x:Name="_openNum" Width="50" Canvas.Left="125" Canvas.Top="168" Foreground="#6E7276" FontSize="32" TextAlignment="Center"
- Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:CustomHouseInfo}}, Path=HouseSn}"></TextBlock>
- </Canvas>
- <Canvas x:Name="_canvas" Canvas.Left="28" Canvas.Top="143.5" Width="304" Height="304"
- Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CustomHouseInfo}, Path=ExHouseSource.houseDoorState, Converter={StaticResource HouseDoorStateConvert}, ConverterParameter=2}">
- <TextBlock Canvas.Left="102" Canvas.Top="100" x:Name="_Num" Width="100" Foreground="#6E7276" FontSize="80" TextAlignment="Center"
- Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CustomHouseInfo}, Path=HouseSn}"/>
- <Ellipse Canvas.Left="65" Canvas.Top="65" x:Name="_ellis" Width="174" Height="174" StrokeThickness="13" Stroke="#DDE3EA"/>
- </Canvas>
- <Grid Canvas.Top="533.5" Width="360" Height="421">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Image Grid.Row="0" Grid.Column="0" Margin="0 0 0 0" Width="39" Height="39" Source="/ivf_tl_Operate;component/Resources/Image/user_photo.png" HorizontalAlignment="Right" VerticalAlignment="Center" />
- <TextBlock Grid.Row="0" Grid.Column="1" Margin="10 0 0 0" FontSize="36" FontWeight="Medium" Foreground="#6E7276" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExDishSource.wife}">
- <!--<Run Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExDishSource.husband}"/><Run Text="/"/><Run Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExDishSource.wife}"/>-->
- </TextBlock>
- <!--<Image Grid.Row="1" Grid.Column="0" Margin="0 0 0 0" Width="39" Height="39" Source="/ivf_tl_Operate;component/Resources/Image/user_photo.png" HorizontalAlignment="Right" VerticalAlignment="Center" />
- <TextBlock Grid.Row="1" Grid.Column="1" Margin="10 0 0 0" FontSize="36" FontWeight="Medium" Foreground="#6E7276" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExHouseSource.StartTime}"/>-->
- <Image Grid.Row="1" x:Name="DurationPic2" Grid.Column="0" Margin="0 0 0 0" Width="39" Height="39" Source="/ivf_tl_Operate;component/Resources/Image/house_time.png" HorizontalAlignment="Right" VerticalAlignment="Center" />
- <TextBlock Grid.Row="1" x:Name="DurationTime2" Grid.Column="1" Margin="10 0 0 0" FontSize="36" FontWeight="Medium" Foreground="#6E7276" HorizontalAlignment="Left" VerticalAlignment="Center"
- Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExHouseSource.FaYuTime}"/>
- <Image Grid.Row="2" Grid.Column="0" Margin="0 0 0 0" Width="39" Height="39" Source="/ivf_tl_Operate;component/Resources/Image/house_temp.png" HorizontalAlignment="Right" VerticalAlignment="Center" />
- <TextBlock Grid.Row="2" Grid.Column="1" Margin="10 0 0 0" FontSize="36" FontWeight="Medium" Foreground="#6E7276" HorizontalAlignment="Left" VerticalAlignment="Center"
- Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExHouseSource.TemperatureSring}">
- </TextBlock>
- <Image Grid.Row="3" Grid.Column="0" Margin="0 0 0 0" Width="39" Height="39" Source="/ivf_tl_Operate;component/Resources/Image/house_pressure.png" HorizontalAlignment="Right" VerticalAlignment="Center" />
- <TextBlock Grid.Row="3" Grid.Column="1" Margin="10 0 0 0" FontSize="36" FontWeight="Medium" Foreground="#6E7276" HorizontalAlignment="Left" VerticalAlignment="Center"
- Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExHouseSource.PressureString}">
- </TextBlock>
- <TextBlock Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="82 0 0 0" FontSize="28" FontWeight="Medium" Foreground="#6E7276" HorizontalAlignment="Left" VerticalAlignment="Center"
- Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExHouseSource.pressureDesc}">
- </TextBlock>
-
- <TextBlock Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Margin="82 0 0 0" FontSize="28" FontWeight="Medium" Foreground="#6E7276" HorizontalAlignment="Left" VerticalAlignment="Center"
- Text="{Binding RelativeSource={RelativeSource AncestorType=local:CustomHouseInfo}, Path=ExHouseSource.houseDesc}"/>
- </Grid>
- </Canvas>
- </Viewbox>
- </UserControl>
|