Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Windows;
- using System.Windows.Forms;
- using System.Windows.Forms.Integration;
- using WPFControls = System.Windows.Controls;
- namespace R722ControlWPFEnWinForms
- {
- public partial class Principal : Form
- {
- WPFControls.TextBox txtRegistroCambioColor;
- private ElipseControl elipseControl;
- public Principal()
- {
- InitializeComponent();
- txtRegistroCambioColor = new WPFControls.TextBox();
- txtRegistroCambioColor.Text = "Campo de Texto WPF\n\r\n\r";
- txtRegistroCambioColor.TextAlignment = TextAlignment.Center;
- txtRegistroCambioColor.VerticalAlignment = VerticalAlignment.Center;
- txtRegistroCambioColor.VerticalScrollBarVisibility = WPFControls.ScrollBarVisibility.Auto;
- txtRegistroCambioColor.IsReadOnly = true;
- ElementHost elhContedorCampoTexto = new ElementHost();
- elhContedorCampoTexto.Name = "elhContedorCampoTexto";
- elhContedorCampoTexto.Dock = DockStyle.Fill;
- elhContedorCampoTexto.Child = txtRegistroCambioColor;
- elhContedorCampoTexto.Size = new System.Drawing.Size(156, 253);
- elhContedorCampoTexto.RightToLeft = RightToLeft.No;
- tlpContenedor.Controls.Add(elhContedorCampoTexto, 0, 0);
- elipseControl = new ElipseControl();
- elhElipse.Child = elipseControl;
- btnCambiarColorElipse.Anchor = AnchorStyles.None;
- }
- private void btnCambiarColorElipse_Click(object sender, EventArgs e)
- {
- elipseControl.CambiarColor();
- txtRegistroCambioColor.Text += String.Format("La elipse cambió su color a {0}\n\r", elipseControl.Color);
- txtRegistroCambioColor.ScrollToEnd();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement