Exemple #1
0
        void RaysCreated(object sender, RaysEventArgs e)
        {
            RaysView raysView = new RaysView();

            e.Rays.SetObserver(raysView);
            raysView.DataContext = e.Rays;
            Binding binding = new Binding();

            binding.Source = e.Rays;
            binding.Path   = new PropertyPath("LightSpot");
            binding.Mode   = BindingMode.OneWay;
            raysView.SetBinding(RaysView.StateValueProperty, binding);
            this._rays.Add(raysView);
            this.LayoutRoot.Children.Add(raysView);
        }
 void RaysCreated(object sender, RaysEventArgs e)
 {
     RaysView raysView = new RaysView();
     e.Rays.SetObserver(raysView);
     raysView.DataContext = e.Rays;
     Binding binding = new Binding();
     binding.Source = e.Rays;
     binding.Path = new PropertyPath("LightSpot");
     binding.Mode = BindingMode.OneWay;
     raysView.SetBinding(RaysView.StateValueProperty, binding);
     this._rays.Add(raysView);
     this.LayoutRoot.Children.Add(raysView);
 }