Пример #1
0
 protected void ApplyDataBindingToThisInstance(DataBindingValues dataBinding)
 {
     foreach (var binding in _bindings)
     {
         string value;
         if (dataBinding.TryGetValue(binding.DataName, out value))
         {
             binding.Invoke(value);
         }
         else
         {
             binding.Invoke(null);
         }
     }
 }
Пример #2
0
        public ParseResult Initialize(XmlDocument content, PreviewNotificationData data)
        {
            ParseResult result = _parser.ParseToast(content.GetXml(), CurrFeatureSet);

            if (result.IsOkForRender())
            {
                _lastDataBindingValues = new DataBindingValues(data);
                result.Toast.ApplyDataBinding(_lastDataBindingValues);

                if (result.IsOkForRender())
                {
                    InitializeContent(result.Toast);
                }
            }

            return(result);
        }
Пример #3
0
 internal virtual void ApplyDataBinding(DataBindingValues dataBinding)
 {
     ApplyDataBindingToThisInstance(dataBinding);
 }