init
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="DTS.Common.Controls.TestIdControl"
|
||||
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"
|
||||
mc:Ignorable="d" d:DesignWidth="800" x:Name="TestIdInfo" d:DesignHeight="703">
|
||||
<UserControl.Resources>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource PageContentTextBoxStyle}" />
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" />
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="PasswordBox" BasedOn="{StaticResource PageContentPasswordBoxStyle}" />
|
||||
<Style TargetType="Button" BasedOn="{StaticResource PageContentButton}" />
|
||||
</UserControl.Resources>
|
||||
<StackPanel Orientation="Horizontal" AutomationProperties.AutomationId="StackPanelTestIdBuilder" DataContext="{Binding ElementName=TestIdInfo}">
|
||||
<ComboBox ItemsSource="{Binding AllTestIdPrefixSuffixValues}" Width="200" SelectedItem="{Binding SelectedTestIdPrefixValueItem}"
|
||||
AutomationProperties.AutomationId="TestIdPrefixComboBox"/>
|
||||
<TextBlock Text="{Binding TestSetupLabel, FallbackValue='Awesome Sauce'}" Visibility="{Binding TestSetupLabelVisibility, FallbackValue=Collapsed}" AutomationProperties.AutomationId="TestIdTextBox"/>
|
||||
<TextBox Text="{Binding TestIdEditableText}" Width="150" Style="{StaticResource PageContentTextBoxStyleId}"
|
||||
AutomationProperties.AutomationId="TestIdTextBox"/>
|
||||
<ComboBox ItemsSource="{Binding AllTestIdPrefixSuffixValues}" Width="200" SelectedItem="{Binding SelectedTestIdSuffixValueItem}"
|
||||
AutomationProperties.AutomationId="TestIdSuffixComboBox"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
|
||||
public class ColorToSolidColorBrushConverter : IValueConverter
|
||||
{
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
// For a more sophisticated converter, check also the targetType and react accordingly..
|
||||
if (value is Color color)
|
||||
{
|
||||
return new SolidColorBrush(color);
|
||||
}
|
||||
return null;
|
||||
// You can support here more source types if you wish
|
||||
// For the example I throw an exception
|
||||
|
||||
//var type = value.GetType();
|
||||
//throw new InvalidOperationException("Unsupported type [" + type.Name + "]");
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
// If necessary, here you can convert back. Check if which brush it is (if its one),
|
||||
// get its Color-value and return it.
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Windows.Controls;
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IMainViewerView : IBaseView
|
||||
{
|
||||
//StackPanel MainShell { get; set; }
|
||||
//ContentControl MainRegion { get; set; }
|
||||
//ContentControl NavigationRegion { get; set; }
|
||||
//ContentControl HorizontalTabRegion { get; set; }
|
||||
//ContentControl VerticalTabRegion { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user