Files
29WxOrder/Main.Test/MainWindow.xaml
T
2026-09-02 13:45:52 +08:00

58 lines
1.8 KiB
XML

<tf:WindowBase
x:Class="Main.Test.MainWindow"
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:local="clr-namespace:Main.Test"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tf="Trade.Framework"
xmlns:views="clr-namespace:Main.Test.Views"
xmlns:vm="clr-namespace:Main.Test.ViewModels"
Title="MainWindow"
Width="800"
Height="450"
DataContext="{tf:DISource Type=vm:MainViewModel}"
NonClientAreaContent=""
NonClientAreaHeight="200"
ResizeMode="CanResizeWithGrip"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Grid Margin="0,0,0,0">
<DataGrid
Height="Auto"
d:ItemsSource="{d:SampleData ItemCount=10}"
ItemsSource="{Binding Data}"
Style="{StaticResource DefaultDataGridStyle}">
<DataGrid.Columns>
<DataGridTextColumn
Width="1*"
MinWidth="100"
Binding="{Binding Code, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Header="编码"
IsReadOnly="True" />
<DataGridTextColumn
Width="1*"
MinWidth="100"
Binding="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Header="名称"
IsReadOnly="True" />
<DataGridTextColumn
Width="1*"
MinWidth="100"
Binding="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Header="值"
IsReadOnly="True" />
<DataGridTextColumn
Width="1*"
MinWidth="100"
Binding="{Binding Qty, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
CellStyle="{DynamicResource DefaultNumberCellStyle}"
Header="数字"
HeaderStyle="{DynamicResource DefaultNumberCellHeaderStyle}"
IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</tf:WindowBase>