Example #1
0
        public void TemplateBindingConstructor()
        {
            tlog.Debug(tag, $"TemplateBindingConstructor START");

            var testingTarget = new TemplateBinding("{Binding template}");

            Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding.");
            Assert.IsInstanceOf <TemplateBinding>(testingTarget, "Should return TemplateBinding instance.");

            tlog.Debug(tag, $"TemplateBindingConstructor END");
        }
Example #2
0
        public void ConverterParameter()
        {
            tlog.Debug(tag, $"ConverterParameter START");

            var testingTarget = new TemplateBinding("{Binding template}");

            Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding.");
            var ret = testingTarget.ConverterParameter;

            testingTarget.ConverterParameter = ret;
            tlog.Debug(tag, $"ConverterParameter END");
        }
Example #3
0
 public void Apply3()
 {
     tlog.Debug(tag, $"Apply3 START");
     try{
         var testingTarget = new TemplateBinding("{Binding template}");
         testingTarget.Apply(null, null, View.FocusableProperty); //InvalidOperationException
     }
     catch (InvalidOperationException e) {
         Assert.True(true, "Catch exception: " + e.Message.ToString());
     }
     tlog.Debug(tag, $"Apply3 END");
 }
Example #4
0
        public void Path()
        {
            tlog.Debug(tag, $"Path START");

            var testingTarget = new TemplateBinding("{Binding template}");

            Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding.");
            var ret = testingTarget.Path;

            testingTarget.Path = ret;
            tlog.Debug(tag, $"Path END");
        }
Example #5
0
 public void Clone()
 {
     tlog.Debug(tag, $"Clone START");
     try
     {
         var testingTarget = new TemplateBinding("{Binding template}");
         Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding.");
         testingTarget.Clone();
     }
     catch (Exception e)
     {
         Assert.Fail("Catch exception: " + e.Message.ToString());
     }
     tlog.Debug(tag, $"Clone END");
 }
Example #6
0
 public void Apply2()
 {
     tlog.Debug(tag, $"Apply2 START");
     try
     {
         var testingTarget = new TemplateBinding("{Binding template}");
         Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding.");
         testingTarget.Apply(null, new View(), View.FocusableProperty);
     }
     catch (Exception e)
     {
         Assert.Fail("Catch exception: " + e.Message.ToString());
     }
     tlog.Debug(tag, $"Apply2 END");
 }
Example #7
0
 public void GetSourceValue()
 {
     tlog.Debug(tag, $"GetSourceValue START");
     try
     {
         var testingTarget = new TemplateBinding("{Binding template}");
         Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding.");
         testingTarget.GetSourceValue(null, typeof(bool));
         testingTarget.GetTargetValue(null, typeof(bool));
     }
     catch (Exception e)
     {
         Assert.Fail("Catch exception: " + e.Message.ToString());
     }
     tlog.Debug(tag, $"GetSourceValue END");
 }
Example #8
0
 protected override void OnEnabled()
 {
     targetScript       = (TemplateBinding)target;
     _templatesProperty = serializedObject.FindProperty("_templates");
 }
Example #9
0
 private void OnEnable()
 {
     targetScript = (TemplateBinding)target;
 }