Christian Specht avatar Christian Specht committed 5db0b0c Draft

close AboutWindow with OK button, disable min/max/close buttons, set focus to OK button

Comments (0)

Files changed (1)

src/MissileSharp.Launcher/Views/AboutWindow.xaml

         Title="About MissileSharp Launcher"
         Height="230" Width="400"
         Icon="logo.ico"
+        ShowMinButton="False"
+        ShowMaxRestoreButton="False" 
+        ShowCloseButton="False"
+        FocusManager.FocusedElement="{Binding ElementName=OkButton}"
         >
     <StackPanel Margin="10">
         <Grid>
             MissileSharp is licensed under the <Hyperlink NavigateUri="https://bitbucket.org/christianspecht/missilesharp/raw/tip/License.txt">MIT License</Hyperlink>.
         </TextBlock>
         
-        <Button Height="30" Margin="0 10" Name="OkButton" Content="OK" />
+        <Button 
+            Height="30" 
+            Margin="0 10" 
+            Name="OkButton" 
+            Content="OK" 
+            Command="{Binding CloseCommand}"
+            CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
 
     </StackPanel>
 </Controls:MetroWindow>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.