Exemplo n.º 1
0
        public MainWindow()
        {
            var WeirdoColor = Color.FromRgb(100, 100, 0);

            TextAdvanced.OverrideMetaData();
            InitializeComponent();

            TextBase01.SetColourProperty(WeirdoColor);
            TextBase.SetMessageProperty(TextBase01, "TextBase01");

            TextBlock02.Text       = (string)TextBlock02.GetValue(TextBase.MessageProperty);
            TextBlock02.Background = new SolidColorBrush((Color)TextBlock02.GetValue(TextBase.ColourProperty));

            TextBlock03.SetValue(TextBase.MessageProperty, "TextBlock03");
            TextBlock03.SetValue(TextBase.ColourProperty, WeirdoColor);

            TextBase.SetMessageProperty(TextBasePlus11, "TextBasePlus11");
            TextBasePlus11.SetColourProperty(WeirdoColor);

            TextBase.SetMessageProperty(TextAdvanced13, "TextAdvanced13");
            TextAdvanced13.SetColourProperty(WeirdoColor);

            TextBase.SetMessageProperty(TextAdvancedPlus23, "TextAdvancedPlus23");
            TextAdvancedPlus23.SetColourProperty(WeirdoColor);
        }
Exemplo n.º 2
0
 public static void SetMessageProperty(TextBase obj, string value)
 {
     obj.SetValue(MessageProperty, value);
 }
Exemplo n.º 3
0
 public static string GetMessageProperty(TextBase obj)
 {
     return (string)obj.GetValue(MessageProperty);
 }
Exemplo n.º 4
0
 public static void SetMessageProperty(TextBase obj, string value)
 {
     obj.SetValue(MessageProperty, value);
 }
Exemplo n.º 5
0
 public static string GetMessageProperty(TextBase obj)
 {
     return((string)obj.GetValue(MessageProperty));
 }