capture close function
This commit is contained in:
@@ -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>
|
||||
|
@@ -80,5 +80,10 @@ namespace Capture
|
||||
|
||||
this.DragMove();
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user