예제 #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");
        }
예제 #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");
        }
예제 #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");
 }
예제 #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");
        }
예제 #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");
 }
예제 #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");
 }
예제 #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");
 }
예제 #8
0
 protected override void OnEnabled()
 {
     targetScript       = (TemplateBinding)target;
     _templatesProperty = serializedObject.FindProperty("_templates");
 }
예제 #9
0
 private void OnEnable()
 {
     targetScript = (TemplateBinding)target;
 }