-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c64fa8
commit 6ed13c1
Showing
5 changed files
with
122 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
KeyVaultExplorer/Views/Pages/PropertiesDialogs/CreateNewKeyVersion.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<UserControl | ||
x:Class="KeyVaultExplorer.CreateNewKeyVersion" | ||
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:KeyVaultExplorer.ViewModels" | ||
d:DesignHeight="450" | ||
d:DesignWidth="800" | ||
x:DataType="vm:CreateNewKeyVersionViewModel" | ||
mc:Ignorable="d"> | ||
Welcome to Avalonia! | ||
</UserControl> |
31 changes: 31 additions & 0 deletions
31
KeyVaultExplorer/Views/Pages/PropertiesDialogs/CreateNewKeyVersion.axaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Input; | ||
using Avalonia.Markup.Xaml; | ||
using Avalonia.Threading; | ||
|
||
|
||
using KeyVaultExplorer.ViewModels; | ||
|
||
namespace KeyVaultExplorer; | ||
|
||
public partial class CreateNewKeyVersion : UserControl | ||
{ | ||
public CreateNewKeyVersion() | ||
{ | ||
InitializeComponent(); | ||
DataContext = new CreateNewKeyVersionViewModel(); | ||
} | ||
|
||
private void InputField_OnAttachedToVisualTree(object sender, VisualTreeAttachmentEventArgs e) | ||
{ | ||
// We will set the focus into our input field just after it got attached to the visual tree. | ||
if (sender is InputElement inputElement) | ||
{ | ||
Dispatcher.UIThread.InvokeAsync(() => | ||
{ | ||
inputElement.Focus(NavigationMethod.Unspecified, KeyModifiers.None); | ||
}); | ||
} | ||
} | ||
} |