public override UIElement RestoreData() { TextPartUC tP = new TextPartUC(Text); tP.InitializeComponent(); tP.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; return tP; }
private void Text_Click(object sender, RoutedEventArgs e) { TextNote TN = new TextNote(); //Encrypt.SetComponent(TN); this.component.Add(TN); TextPartUC tP = new TextPartUC(); tP.InitializeComponent(); TN.tp = tP; tP.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; FieldPanel.Children.Add(tP); }