MainWindow.axaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <Window xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:vm="using:avaloniaPr.ViewModels"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  7. x:Class="avaloniaPr.Views.MainWindow"
  8. x:DataType="vm:MainWindowViewModel"
  9. Icon="/Assets/avalonia-logo.ico"
  10. Title="avaloniaPr">
  11. <Window.Styles>
  12. <Style Selector="TextBlock.TBLMain">
  13. <Setter Property="FontSize" Value="20"/>
  14. <Setter Property="Foreground" Value="Black"/>
  15. </Style>
  16. <Style Selector="TextBlock.centerTB">
  17. <Setter Property="FontSize" Value="30"/>
  18. <Setter Property="Foreground" Value="Black"/>
  19. <Setter Property="HorizontalAlignment" Value="Center"/>
  20. <Setter Property="VerticalAlignment" Value="Center"/>
  21. <Setter Property="FontWeight" Value="ExtraBold"/>
  22. </Style>
  23. <Style Selector="TextBox.TBMain">
  24. <Setter Property="FontSize" Value="15"/>
  25. <Setter Property="Margin" Value="0,20,0,0"/>
  26. </Style>
  27. <Style Selector="TextBox.TBCalculator">
  28. <Setter Property="FontSize" Value="30"/>
  29. <Setter Property="Margin" Value="10,20,10,20"/>
  30. <Setter Property="Width" Value="80"/>
  31. <Setter Property="Height" Value="80"/>
  32. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  33. <Setter Property="VerticalContentAlignment" Value="Center"/>
  34. </Style>
  35. <Style Selector="TextBlock.TBLCalculator">
  36. <Setter Property="FontSize" Value="40"/>
  37. <Setter Property="Margin" Value="0,40,0,0"/>
  38. <Setter Property="Width" Value="80"/>
  39. <Setter Property="Height" Value="80"/>
  40. <Setter Property="TextAlignment" Value="Center"/>
  41. </Style>
  42. <Style Selector="Button.ButtonStyle">
  43. <Setter Property="FontSize" Value="20"/>
  44. <Setter Property="Width" Value="300"/>
  45. <Setter Property="Height" Value="40"/>
  46. <Setter Property="Margin" Value="0,20,0,0"/>
  47. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  48. <Setter Property="Background" Value="#4c5866"/>
  49. <Setter Property="Foreground" Value="Black"/>
  50. <Setter Property="HorizontalAlignment" Value="Center"/>
  51. <Setter Property="VerticalAlignment" Value="Center"/>
  52. </Style>
  53. </Window.Styles>
  54. <Design.DataContext>
  55. <!-- This only sets the DataContext for the previewer in an IDE,
  56. to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
  57. <vm:MainWindowViewModel/>
  58. </Design.DataContext>
  59. <ContentControl Content="{Binding US}"></ContentControl>
  60. </Window>