2025-08-15 15:25:44 +08:00

59 lines
2.4 KiB
XML

<UserControl x:Class="DI_Electrical.Views.Dialog.DialogInput"
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:DI_Electrical.Views.Dialog"
xmlns:local2="clr-namespace:DI_Electrical.Views"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:prism="http://prismlibrary.com/"
mc:Ignorable="d" >
<prism:Dialog.WindowStyle>
<Style TargetType="Window">
<!-- 关键:设置窗口根据内容自动调整尺寸 -->
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
<Setter Property="WindowState" Value="Normal"/>
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="ResizeMode" Value="NoResize"/>
</Style>
</prism:Dialog.WindowStyle>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="35" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<local2:customWindowTitleBar />
<Label Grid.Row="1" Content="{Binding TextRemark}" Height="auto" VerticalAlignment="Bottom" Margin="10,0,0,0" Width="auto" />
<TextBox Grid.Row="2"
Style="{StaticResource sysTextAreaInfo}"
Text="{Binding TextInfo, Mode=TwoWay}" />
<Border
Grid.Row="3"
Height="30"
Background="{StaticResource ColorPrimary}">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<telerik:RadButton
Margin="5"
Command="{Binding OKCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
Content="提交"
Style="{StaticResource sysBtn}" />
<telerik:RadButton
Margin="5"
Command="{Binding CloseCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
Content="取消"
Style="{StaticResource sysBtn2}" />
</StackPanel>
</Border>
</Grid>
</UserControl>