capture close function

This commit is contained in:
2023-09-27 10:41:35 +09:00
parent bf67edb4cc
commit 65c724abc2
3 changed files with 15 additions and 1 deletions

View File

@@ -20,6 +20,14 @@
</Grid.RowDefinitions>
<Border BorderThickness="{Binding FrameThickness}" BorderBrush="{Binding FrameColor}"/>
<Button x:Name="btnCapture" Grid.Row="1" Content="Capture" Click="btnCapture_Click"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding CloseButtonWidth}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button x:Name="btnClose" Grid.Column="0" Content="❎" Click="btnClose_Click"/>
<Button x:Name="btnCapture" Grid.Column="1" Content="Capture" Click="btnCapture_Click"/>
</Grid>
</Grid>
</Window>

View File

@@ -80,5 +80,10 @@ namespace Capture
this.DragMove();
}
private void btnClose_Click(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}
}
}

View File

@@ -10,6 +10,7 @@ namespace Capture
public class OptionContext
{
public int ButtonHeight { get; set; } = 20;
public int CloseButtonWidth { get; set; } = 20;
public Brush FrameColor { get; set; } = Brushes.Red;
public int FrameThickness { get; set; } = 2;
}