public FrameworkElement CreateSubGraphBorder(BorderViewModel borderViewModel) { return new Border { BorderBrush = new SolidColorBrush(Colors.Black), BorderThickness = new Thickness(1), Padding = new Thickness(10, 0, 0, 0), Child = new TextBlock { Text = borderViewModel.Label } }; }
public FrameworkElement CreateSubGraphBorder(BorderViewModel borderViewModel) { return(new Border { BorderBrush = new SolidColorBrush(Colors.Black), BorderThickness = new Thickness(1), Padding = new Thickness(10, 0, 0, 0), Child = new TextBlock { Text = borderViewModel.Label } }); }
private static void PropertyChangedCallback_Name(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is CustomBorder customBorder) { if (e.NewValue != null) { if (e.NewValue is string name) { if (customBorder.DataContext is BorderViewModel borderViewModel) { borderViewModel.Name = name + " " + nameof(BorderViewModel); } else { BorderViewModel borderViewModel1 = new BorderViewModel(); borderViewModel1.Name = name + " " + nameof(BorderViewModel); customBorder.DataContext = borderViewModel1; } } } } }
public FrameworkElement CreateSubGraphBorder(BorderViewModel borderViewModel) { return new ContentPresenter { Content = borderViewModel }; }
private void TypeComboBox_Selected(object sender, RoutedEventArgs e) { if (!IsLoaded) { return; } if (TypeComboBox.SelectedIndex < 1) { MainPresenter.Content = null; return; } if (!IsEditing) { //Create a new model. switch ((TaskTypes)TypeComboBox.SelectedIndex) { case TaskTypes.MouseClicks: CurrentTask = MouseClicksViewModel.Default(); break; case TaskTypes.KeyStrokes: CurrentTask = KeyStrokesViewModel.Default(); break; case TaskTypes.Delay: CurrentTask = DelayViewModel.Default(); break; case TaskTypes.Progress: CurrentTask = ProgressViewModel.Default(); break; case TaskTypes.Border: CurrentTask = BorderViewModel.Default(); break; case TaskTypes.Shadow: CurrentTask = ShadowViewModel.Default(); break; } } switch ((TaskTypes)TypeComboBox.SelectedIndex) { case TaskTypes.MouseClicks: MainPresenter.Content = new MouseClicksPanel { DataContext = CurrentTask }; break; case TaskTypes.KeyStrokes: MainPresenter.Content = new KeyStrokesPanel { DataContext = CurrentTask }; break; case TaskTypes.Delay: MainPresenter.Content = new DelayPanel { DataContext = CurrentTask }; break; case TaskTypes.Progress: MainPresenter.Content = new ProgressPanel { DataContext = CurrentTask }; break; case TaskTypes.Border: MainPresenter.Content = new BorderPanel { DataContext = CurrentTask }; break; case TaskTypes.Shadow: MainPresenter.Content = new ShadowPanel { DataContext = CurrentTask }; break; } }
public CustomBorder() { BorderViewModel borderViewModel1 = new BorderViewModel(); borderViewModel1.Name = BaseName + " " + nameof(BorderViewModel); }
public FrameworkElement CreateSubGraphBorder(BorderViewModel borderViewModel) { return(new ContentPresenter { Content = borderViewModel }); }
public BordesPage(List <string> borders) { BindingContext = new BorderViewModel(borders); InitializeComponent(); }