Changeset - 99f3d61e20d7
[Not reviewed]
Tess Snider (Malkyne) - 3 years ago 2021-07-20 20:38:53
this@malkyne.org
Modal Dialogs should no longer get stuck behind main window.
4 files changed with 4 insertions and 6 deletions:
0 comments (0 inline, 0 general)
Views/AboutView.axaml
Show inline comments
 
<Window xmlns="https://github.com/avaloniaui"
 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
        xmlns:vm="using:DesertPaintCodex.ViewModels"
 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 
        mc:Ignorable="d" d:DesignWidth="296" d:DesignHeight="550"
 
        x:Class="DesertPaintCodex.Views.AboutView"
 
        Width="296" Height="550"
 
        Width="296" Height="550" Topmost="True"
 
        SizeToContent="Height"
 
        SystemDecorations="BorderOnly"
 
        WindowStartupLocation="CenterScreen"
 
        Title="About Desert Paint Codex">
 

	
 
    <Design.DataContext>
 
        <vm:AboutViewModel />
 
    </Design.DataContext>
 

	
 
    <Window.DataContext>
 
        <vm:AboutViewModel />
 
    </Window.DataContext>
 

	
 
    <DockPanel Margin="20" LastChildFill="True">
 
        <Image DockPanel.Dock="Top" Source="{StaticResource Image_Splash}" Width="256" Height="256"/>
 
        <TextBlock DockPanel.Dock="Top" Classes="BlockHeader" Margin="0, 10, 0, 0">DESERT PAINT CODEX - T10</TextBlock>
 

	
 
        <TextBlock DockPanel.Dock="Top" Margin="0, 5, 0, 0">
 
            Authors: Afrah, Snoerr
 
        </TextBlock>
 

	
 
        <Button DockPanel.Dock="Bottom" Command="{Binding CloseDialog}">Done</Button>
 

	
 
        <Button DockPanel.Dock="Bottom" Command="{Binding OpenBrowser}"
Views/MainWindow.axaml
Show inline comments
 
<Window xmlns="https://github.com/avaloniaui"
 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
        xmlns:vm="using:DesertPaintCodex.ViewModels"
 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 
        xmlns:views="clr-namespace:DesertPaintCodex.Views"
 
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="800"
 
        Width="640" Height="800"
 
        MinWidth="600" MinHeight="500"
 
        Topmost="True"
 
        Width="640" Height="800" MinWidth="600" MinHeight="500" Topmost="True"
 
        x:Class="DesertPaintCodex.Views.MainWindow"
 
        Icon="/Assets/desert_paint_codex_icon.ico"
 
        Title="Desert Paint Codex">
 

	
 
    <Design.DataContext>
 
        <vm:MainWindowViewModel/>
 
    </Design.DataContext>
 
    
 
    <Window.DataContext>
 
        <vm:MainWindowViewModel/>
 
    </Window.DataContext>
 
    
 
    <Window.Styles>
 
        <!--
 
        <Style Selector="Menu">
 
            <Setter Property="Background" Value="#282828"/>
 
        </Style>
 
        -->
 
        <Style Selector="ContentControl">
 
            <Setter Property="Margin" Value="0 5 0 0"/>
 
        </Style>
 
        <Style Selector="TextBlock.StatusBar">
 
            <Setter Property="Margin" Value="5"/>
 
        </Style>
Views/MessageBoxView.axaml
Show inline comments
 
<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="clr-namespace:DesertPaintCodex.ViewModels"
 
        Width="300" SizeToContent="Height"
 
        Width="300" SizeToContent="Height" Topmost="True"
 
        mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="200"
 
        WindowStartupLocation="CenterOwner"
 
        x:Class="DesertPaintCodex.Views.MessageBoxView">
 

	
 
    <Design.DataContext>
 
        <vm:MessageBoxViewModel />
 
    </Design.DataContext>
 

	
 
    <DockPanel Margin="20" HorizontalAlignment="Stretch">
 
        
 
        <TextBlock DockPanel.Dock="Top" Classes="BlockHeader" TextWrapping="Wrap" Text="{Binding Title}" Margin="0, 0, 0, 15" />
 
        
 
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="15" Margin="0, 20, 0, 0">
 
            <Button Command="{Binding PickOption}" CommandParameter="0"
 
                    IsVisible="{Binding OptionAText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
 
                    Padding="20, 5">
 
                <TextBlock Text="{Binding OptionAText}"/>
 
            </Button>
 
            <Button Command="{Binding PickOption}" CommandParameter="1"
 
                    IsVisible="{Binding OptionBText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
 
                    Padding="20, 5">
 
                <TextBlock Text="{Binding OptionBText}"/>
 
            </Button>
 
            <Button Command="{Binding PickOption}" CommandParameter="2"
Views/ScreenSettingsView.axaml
Show inline comments
 
<Window xmlns="https://github.com/avaloniaui"
 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
        xmlns:vm="using:DesertPaintCodex.ViewModels"
 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 
        x:Class="DesertPaintCodex.Views.ScreenSettingsView"
 
        mc:Ignorable="d" d:DesignWidth="310" d:DesignHeight="330"
 
        Width="320" Height="330"
 
        Width="320" Height="330" Topmost="True"
 
        WindowStartupLocation="CenterScreen"
 
        Title="Screen Settings">
 

	
 
  <Design.DataContext>
 
    <vm:ScreenSettingsViewModel/>
 
  </Design.DataContext>
 
  
 
  <DockPanel Margin="20">
 
    <TextBlock DockPanel.Dock="Top" Margin="0, 0, 0, 4">Which screen is the game on?</TextBlock>
 
    
 
    <Grid DockPanel.Dock="Top" ColumnDefinitions="80,10,80,10,90" RowDefinitions="Auto" Margin="7 0 0 0">
 
      <TextBlock Text="Position" Grid.Row="0" Grid.Column="0"/>
 
      <TextBlock Text="Size" Grid.Row="0" Grid.Column="2"/>
 
    </Grid>
 
    
 
    <Button DockPanel.Dock="Bottom" Command="{Binding Save}">Ok</Button>
 
    
 
    <Grid DockPanel.Dock="Bottom" ColumnDefinitions="*,12,80,12,24" RowDefinitions="Auto,30,Auto" Margin="0, 0, 0, 30">
 
      <TextBlock VerticalAlignment="Center" TextWrapping="Wrap" TextAlignment="Right" Grid.Row="2" Grid.Column="0">
 
        Screen pixels to game pixels:
 
      </TextBlock>
 
      <NumericUpDown Minimum="1" Maximum="4" Increment="1" Value="{Binding PixelMultiplier}" Grid.Row="2" Grid.Column="2"/>
 
      <Border Classes="Help" Grid.Row="2" Grid.Column="4">
 
        <TextBlock>?</TextBlock>
0 comments (0 inline, 0 general)