Files
IPyConsole/ControlLib/Content/Calculate.xaml
2024-11-25 17:20:03 +08:00

33 lines
1.3 KiB
XML

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ControlLib.Content.Calculate"
xmlns:m="clr-namespace:Model;assembly=Model"
Width="240"
Height="160"
Background="LightBlue">
<UserControl.Resources>
<m:Player x:Key="playerDS"/>
<Style x:Key="TextBoxSytle" TargetType="{x:Type TextBox}">
<Setter Property="Canvas.Left" Value="100"/>
<Setter Property="Width" Value="120"/>
</Style>
</UserControl.Resources>
<UserControl.DataContext>
<Binding Source="{StaticResource playerDS}"/>
</UserControl.DataContext>
<Canvas>
<Label Content="label " Canvas.Left="10" Canvas.Top="10" />
<TextBox Style="{StaticResource TextBoxSytle}" Name="tb_1" Text="TextBox" Canvas.Top="14"/>
<Label Content="label" Canvas.Left="10" Canvas.Top="70"/>
<TextBox Style="{StaticResource TextBoxSytle}" Name="tb_2" Text="{Binding Path=Contents[0], Mode=TwoWay}" Canvas.Top="70" />
<Button Canvas.Left="177" Canvas.Top="122">
<Button Content="Button" Click="Btn_Click"/>
</Button>
</Canvas>
</UserControl>