private void InitBindings() { TypeTextBlock.SetBinding(TextBlock.TextProperty, new Binding(nameof(TypeNameText)) { Source = this, Mode = BindingMode.TwoWay }); ItemSeparator.SetBinding(Separator.VisibilityProperty, new Binding(nameof(IsSeparatorVisible)) { Source = this, Mode = BindingMode.OneWay, Converter = new BoolToVisibilityConverter() }); OrderIndicator.SetBinding(OrderIndicator.OrderTypeProperty, new Binding(nameof(OrderType)) { Source = this, Mode = BindingMode.OneWay }); }
public void SetDefaultsForNulls() { if (SourceType == null) { SourceType = "Csv"; } if (CsvDelimiter == null) { CsvDelimiter = ";"; } if (ItemSeparator == null) { ItemSeparator = Environment.NewLine; } if (ItemSeparator.Contains("\\r\\n")) { ItemSeparator = ItemSeparator.Replace("\\r\\n", Environment.NewLine); } }