mekasu0124

Untitled

Feb 24th, 2024
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.90 KB | None | 0 0
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2.             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3.             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4.             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5.              xmlns:vm="using:Diary.ViewModels"
  6.             mc:Ignorable="d" d:DesignWidth="1500" d:DesignHeight="850"
  7.             x:Class="Diary.Views.UpdateAvailableView"
  8.              x:DataType="vm:UpdateAvailableViewModel"
  9.              Background="{Binding Background}">
  10.  
  11.     <Design.DataContext>
  12.         <vm:UpdateAvailableViewModel />
  13.     </Design.DataContext>
  14.  
  15.     <UserControl.Styles>
  16.         <Style Selector="Image">
  17.             <Setter Property="HorizontalAlignment" Value="Center" />
  18.             <Setter Property="VerticalAlignment" Value="Center" />
  19.             <Setter Property="Width" Value="300" />
  20.             <Setter Property="Height" Value="200" />
  21.         </Style>
  22.  
  23.         <Style Selector="Border">
  24.             <Setter Property="BorderBrush" Value="{Binding BorderColor}" />
  25.             <Setter Property="BorderThickness" Value="2" />
  26.             <Setter Property="CornerRadius" Value="20" />
  27.             <Setter Property="Padding" Value="10" />
  28.             <Setter Property="Margin" Value="10" />
  29.         </Style>
  30.  
  31.         <Style Selector="Label">
  32.             <Setter Property="Foreground" Value="{Binding FontColor}" />
  33.             <Setter Property="FontSize" Value="{Binding FontSize}" />
  34.             <Setter Property="FontFamily" Value="{Binding FontName}" />
  35.             <Setter Property="FontStyle" Value="{Binding FontStyle}" />
  36.             <Setter Property="HorizontalAlignment" Value="{Binding TextAlign}" />
  37.             <Setter Property="VerticalAlignment" Value="{Binding TextAlign}" />
  38.             <Setter Property="HorizontalContentAlignment" Value="{Binding TextAlign}" />
  39.             <Setter Property="VerticalContentAlignment" Value="{Binding TextAlign}" />
  40.             <Setter Property="Width" Value="350" />
  41.             <Setter Property="Height" Value="70" />
  42.         </Style>
  43.  
  44.         <Style Selector="TextBlock">
  45.             <Setter Property="Foreground" Value="{Binding FontColor}" />
  46.             <Setter Property="FontSize" Value="{Binding FontSize}" />
  47.             <Setter Property="FontWeight" Value="{Binding FontStyle}" />
  48.             <Setter Property="HorizontalAlignment" Value="Center" />
  49.             <Setter Property="VerticalAlignment" Value="Center" />
  50.             <Setter Property="Width" Value="350" />
  51.             <Setter Property="Height" Value="150" />
  52.             <Setter Property="TextWrapping" Value="Wrap" />
  53.             <Setter Property="TextAlignment" Value="{Binding TextAlign}" />
  54.         </Style>
  55.  
  56.         <Style Selector="Button">
  57.             <Setter Property="Foreground" Value="{Binding FontColor}" />
  58.             <Setter Property="BorderBrush" Value="{Binding BorderColor}" />
  59.             <Setter Property="BorderThickness" Value="2" />
  60.             <Setter Property="CornerRadius" Value="10" />
  61.             <Setter Property="Width" Value="200" />
  62.             <Setter Property="Height" Value="70" />
  63.             <Setter Property="HorizontalAlignment" Value="Center" />
  64.             <Setter Property="VerticalAlignment" Value="Center" />
  65.             <Setter Property="HorizontalContentAlignment" Value="Center" />
  66.             <Setter Property="VerticalContentAlignment" Value="Center" />
  67.  
  68.             <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
  69.                 <Setter Property="Foreground" Value="{Binding FontColor}" />
  70.                 <Setter Property="BorderBrush" Value="{Binding BorderColor}" />
  71.                 <Setter Property="BorderThickness" Value="2" />
  72.                 <Setter Property="CornerRadius" Value="10" />
  73.             </Style>
  74.         </Style>
  75.     </UserControl.Styles>
  76.  
  77.     <Border>
  78.         <Grid RowDefinitions="*,Auto,Auto,Auto,*">
  79.             <Image Grid.Row="0" Source="/Assets/logo.ico" />
  80.             <Label Grid.Row="1" Content="{Binding Title}" />
  81.             <TextBlock Grid.Row="2" Text="{Binding Information}" />
  82.             <Label Grid.Row="3" Content="{Binding SubInformation}" />
  83.  
  84.             <Grid ColumnDefinitions="*,*" Grid.Row="4">
  85.                 <Button Grid.Column="0" Content="Launch Update" Command="{Binding StartUpdate}" />
  86.                 <Button Grid.Column="1" Content="Launch Diary" Command="{Binding GoHome}" />
  87.             </Grid>
  88.         </Grid>
  89.     </Border>
  90. </UserControl>
  91.  
Advertisement
Add Comment
Please, Sign In to add comment