-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor fixes - started on checkbox token input form
- Loading branch information
1 parent
ae29408
commit d545b2a
Showing
11 changed files
with
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ public enum TokenInputForm | |
{ | ||
Text, | ||
Folder, | ||
Selection | ||
Selection, | ||
Checkbox | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<local:TokenInputControl x:Class="LaubPlusCo.VisualStudio.HelixTemplates.Dialogs.Dialogs.TokenCheckboxInput" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:LaubPlusCo.VisualStudio.HelixTemplates.Dialogs.Dialogs" | ||
mc:Ignorable="d" d:DesignWidth="400"> | ||
<Grid Margin="0,5,0,0"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
</Grid.ColumnDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition /> | ||
<RowDefinition /> | ||
</Grid.RowDefinitions> | ||
<StackPanel Orientation="Horizontal" Grid.Row="1"> | ||
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Left" Name="TokenInputCheckbox" /> | ||
<Label FontWeight="DemiBold" Width="Auto" HorizontalAlignment="Left" MaxWidth="430" Name="TokenDisplayNameLabel" /> | ||
</StackPanel> | ||
</Grid> | ||
</local:TokenInputControl> |
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,39 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
using LaubPlusCo.Foundation.HelixTemplating.Manifest; | ||
|
||
namespace LaubPlusCo.VisualStudio.HelixTemplates.Dialogs.Dialogs | ||
{ | ||
/// <summary> | ||
/// Interaction logic for TokenCheckboxInput.xaml | ||
/// </summary> | ||
public partial class TokenCheckboxInput : TokenInputControl | ||
{ | ||
public TokenCheckboxInput(TokenDescription tokenDescription) | ||
{ | ||
InitializeComponent(); | ||
TokenDescription = tokenDescription; | ||
} | ||
|
||
public override string TokenValue | ||
{ | ||
get => TokenInputCheckbox.IsChecked.HasValue && TokenInputCheckbox.IsChecked.Value ? bool.TrueString : bool.FalseString; | ||
set => TokenInputCheckbox.IsChecked = bool.TryParse(value, out bool val) && val; | ||
} | ||
|
||
public override Label DisplayNameLabel => TokenDisplayNameLabel; | ||
public override Control InputControl => TokenInputCheckbox; | ||
} | ||
} |
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
Binary file not shown.
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