36 lines
2.2 KiB
XML
36 lines
2.2 KiB
XML
<UserControl x:Class="DTS.Common.Controls.ChannelNameBuilder"
|
|
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:DTS.Common.Controls"
|
|
xmlns:strings="clr-namespace:DTS.Common.Strings"
|
|
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors"
|
|
mc:Ignorable="d"
|
|
x:Name="dtsChannelNameBuilder"
|
|
d:DesignHeight="450" d:DesignWidth="800" Loaded="ChannelNameBuilder_OnLoaded"
|
|
AutomationProperties.AutomationId="NameChannelBuilderUserControl"
|
|
>
|
|
<UserControl.Resources>
|
|
<!--<local:CodeTypeToCharacterCasingConverter x:Key="CodeTypeToCharacterCasingConverter" />-->
|
|
</UserControl.Resources>
|
|
<TextBox x:Name="MainEditBox" x:FieldModifier="public" HorizontalAlignment="Stretch" DataContext="{Binding ElementName=dtsChannelNameBuilder}"
|
|
LostFocus="MainEditBox_OnLostFocus"
|
|
GotKeyboardFocus="MainEditBox_OnGotKeyboardFocus"
|
|
MouseDoubleClick="MainEditBox_OnMouseDoubleClick"
|
|
PreviewKeyDown="MainEditBox_OnPreviewKeyDown"
|
|
AutomationProperties.AutomationId="CNB_MainEditTextBox"
|
|
behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}"
|
|
Binding.SourceUpdated="TextBoxSourceUpdated"
|
|
TextChanged="MainEditBox_OnTextChanged"
|
|
Tag="{Binding Tag}">
|
|
<TextBox.Text>
|
|
<Binding NotifyOnSourceUpdated="True" Path="ChannelName" UpdateSourceTrigger="PropertyChanged" />
|
|
</TextBox.Text>
|
|
<TextBox.InputBindings>
|
|
<KeyBinding Key="Enter"
|
|
Command="{local:UpdatePropertySourceWhenEnterPressed}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type TextBox}}}" />
|
|
</TextBox.InputBindings>
|
|
</TextBox>
|
|
</UserControl> |