Exemple #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);
        }
 public static void SetMessageProperty(TextBase obj, string value)
 {
     obj.SetValue(MessageProperty, value);
 }
 public static string GetMessageProperty(TextBase obj)
 {
     return (string)obj.GetValue(MessageProperty);
 }
 public static void SetMessageProperty(TextBase obj, string value)
 {
     obj.SetValue(MessageProperty, value);
 }
 public static string GetMessageProperty(TextBase obj)
 {
     return((string)obj.GetValue(MessageProperty));
 }