コード例 #1
0
 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
     });
 }
コード例 #2
0
 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);
     }
 }