3using System.Windows.Controls;
4using System.Windows.Input;
19 if (this.ItemsView.View is GridView GridView)
21 GridView.Columns[0].Header = TypeHeader;
22 GridView.Columns[1].Header = ValueHeader;
26 this.Label.Content = Header;
27 this.OkButton.ToolTip = OkTooltip;
30 this.ItemsView.Items.Add(
new Item(
Item));
43 public string Localized => this.s.
Localized;
47 private void CancelButton_Click(
object Sender, RoutedEventArgs e)
49 this.DialogResult =
false;
52 private void OkButton_Click(
object Sender, RoutedEventArgs e)
54 this.DialogResult =
true;
61 if (this.ItemsView.SelectedItem is Item Item)
62 return Item.LocalizedString;
68 private void ItemsView_SelectionChanged(
object Sender, SelectionChangedEventArgs e)
70 this.OkButton.IsEnabled = !(this.ItemsView.SelectedItem is
null);
73 private void ItemsView_MouseDoubleClick(
object Sender, MouseButtonEventArgs e)
75 if (!(this.ItemsView.SelectedItem is
null))
76 this.DialogResult =
true;
Interaction logic for SelectItemDialog.xaml
void InitializeComponent()
InitializeComponent
Represents a localized string
string Unlocalized
Unlocalized string.
string Localized
Localized (human readable) string.