45 lines
2.0 KiB
XML
45 lines
2.0 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
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:vm="using:GazpromApp.ViewModels"
|
|
x:Name="Window"
|
|
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="180"
|
|
Width="400" Height="180"
|
|
x:Class="GazpromApp.Views.ErrorView"
|
|
x:DataType="vm:ErrorViewModel"
|
|
Title="{Binding Title}"
|
|
Icon="/Assets/ic_fluent_error_circle_24_filled (1) (Custom).png"
|
|
WindowStartupLocation="CenterOwner"
|
|
Closing="Window_OnClosing"
|
|
Closed="Window_OnClosed">
|
|
<Design.DataContext>
|
|
<vm:ErrorViewModel/>
|
|
</Design.DataContext>
|
|
<Grid x:Name="Root" Margin="16"
|
|
ColumnDefinitions="50, *" RowDefinitions="50, *, Auto">
|
|
<Image Grid.Row="0" Grid.Column="0"
|
|
IsVisible="{Binding IsErrorVisible}"
|
|
Source="avares://GazpromApp/Assets/ic_fluent_error_circle_24_filled (Custom).png"/>
|
|
<Image Grid.Row="0" Grid.Column="0"
|
|
IsVisible="{Binding IsWarnVisible}"
|
|
Source="avares://GazpromApp/Assets/ic_fluent_warning_24_filled (Custom).png"/>
|
|
<Image Grid.Row="0" Grid.Column="0"
|
|
IsVisible="{Binding IsInfoVisible}"
|
|
Source="avares://GazpromApp/Assets/ic_fluent_info_24_filled (Custom).png"/>
|
|
<Panel Grid.Row="0" Grid.Column="1" Grid.RowSpan="2">
|
|
<StackPanel Margin="8">
|
|
<TextBlock Text="{Binding Title}" FontSize="20" MaxLines="2" TextWrapping="Wrap"/>
|
|
<TextBlock Text="{Binding Message}" MaxLines="3" TextWrapping="Wrap"/>
|
|
</StackPanel>
|
|
</Panel>
|
|
<Panel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Content="ОК"
|
|
Command="{Binding OkCommand}"
|
|
CommandParameter="{Binding #Window}"/>
|
|
</StackPanel>
|
|
</Panel>
|
|
</Grid>
|
|
</Window>
|