| 12345678910111213141516171819202122232425262728293031323334353637 |
- <sv:WindowBase x:Class="YSAI.Windows.Samples.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:YSAI.Windows.Samples"
- xmlns:sv="clr-namespace:YSAI.Core.Wpf;assembly=YSAI.Core.Wpf"
- xmlns:lang="http://wpflocalizeextension.codeplex.com"
- lang:LocalizeDictionary.DesignCulture="zh"
- lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
- lang:ResxLocalizationProvider.DefaultDictionary="Lang"
- xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
- IsLanguage="True"
- mc:Ignorable="d"
- Background="{DynamicResource ContentBackgroundPicture}"
- Title="{lang:Loc HelloWorld}" Height="450" Width="800" Icon="image\YSAI.ico" IsContentBackgroundPicture="True" WindowStartupLocation="CenterScreen">
- <!--MVVM绑定-->
- <Window.DataContext>
- <local:MainWindowViewModel/>
- </Window.DataContext>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Label Content="{lang:Loc Hello}" FontSize="30" FontWeight="Bold" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- <Label Content="{Binding LabelContent}" FontSize="30" FontWeight="Bold" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- <btn:ButtonControl Width="100" FontSize="13" FontWeight="Bold" Grid.Row="2" Command="{Binding Cut}" HorizontalAlignment="Center" VerticalAlignment="Center" CornerRadius="{DynamicResource WindowCornerRadius}" Background="White"
- IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
- BorderBrush="{DynamicResource Control.Border.Color}"
- IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
- Foreground="{DynamicResource Font.Content.Foreground}"
- Icon="{DynamicResource Lang}"
- Content="{lang:Loc Cut}"/>
- </Grid>
- </sv:WindowBase>
|