Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Windows.Controls;
- using System.Windows.Media;
- namespace R722ControlWPFEnWinForms
- {
- /// <summary>
- /// Interaction logic for ElipseControl.xaml
- /// </summary>
- public partial class ElipseControl : UserControl
- {
- public ElipseControl()
- {
- InitializeComponent();
- }
- public string Color
- {
- get
- {
- if (Elipse.Fill == (Brush)grdPrincipal.Resources["Rojo"])
- {
- return "Red";
- }
- else
- {
- return "Blue";
- }
- }
- }
- public void CambiarColor()
- {
- if (Elipse.Fill == (Brush)grdPrincipal.Resources["Rojo"])
- {
- Elipse.Fill = (Brush)grdPrincipal.Resources["Azul"];
- }
- else
- {
- Elipse.Fill = (Brush)grdPrincipal.Resources["Rojo"];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement