MainWindow.xaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <sv:WindowBase x:Class="YSAI.Windows.Samples.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:YSAI.Windows.Samples"
  7. xmlns:sv="clr-namespace:YSAI.Core.Wpf;assembly=YSAI.Core.Wpf"
  8. xmlns:lang="http://wpflocalizeextension.codeplex.com"
  9. lang:LocalizeDictionary.DesignCulture="zh"
  10. lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
  11. lang:ResxLocalizationProvider.DefaultDictionary="Lang"
  12. xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
  13. IsLanguage="True"
  14. mc:Ignorable="d"
  15. Background="{DynamicResource ContentBackgroundPicture}"
  16. Title="{lang:Loc HelloWorld}" Height="450" Width="800" Icon="image\YSAI.ico" IsContentBackgroundPicture="True" WindowStartupLocation="CenterScreen">
  17. <!--MVVM绑定-->
  18. <Window.DataContext>
  19. <local:MainWindowViewModel/>
  20. </Window.DataContext>
  21. <Grid>
  22. <Grid.RowDefinitions>
  23. <RowDefinition/>
  24. <RowDefinition/>
  25. <RowDefinition/>
  26. </Grid.RowDefinitions>
  27. <Label Content="{lang:Loc Hello}" FontSize="30" FontWeight="Bold" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  28. <Label Content="{Binding LabelContent}" FontSize="30" FontWeight="Bold" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  29. <btn:ButtonControl Width="100" FontSize="13" FontWeight="Bold" Grid.Row="2" Command="{Binding Cut}" HorizontalAlignment="Center" VerticalAlignment="Center" CornerRadius="{DynamicResource WindowCornerRadius}" Background="White"
  30. IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
  31. BorderBrush="{DynamicResource Control.Border.Color}"
  32. IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
  33. Foreground="{DynamicResource Font.Content.Foreground}"
  34. Icon="{DynamicResource Lang}"
  35. Content="{lang:Loc Cut}"/>
  36. </Grid>
  37. </sv:WindowBase>