/// <summary>
 /// Constructor for the FilterControl
 /// </summary>
 /// <param name="tangibleObjectControl">TangibleObject for which the filter is initialized</param>
 public FilterControlViewModel(TangibleObjectControl tangibleObjectControl)
 {
     this.tangibleObjectControl = tangibleObjectControl;
     if (tangibleObjectControl == null)
         return;
     var accounts = CategoryMappings.GetAccountsFromCategory(this.tangibleObjectControl.GetCategory());
     SetToggleButtons(accounts);
 }
        /// <summary>
        /// Remove all physic objects.
        /// </summary>
        void RemovePhysicObjects()
        {
            foreach (var sprite in _physicSprites)
            {
                _tangibleCanvas.DeletePhysicsObject(sprite.Name);
            }
            _physicSprites.Clear();
            //_tangibleCanvas.Children.Remove(_physicBoundary);

            if (_physicBoundary != null)
            {
                _physicBoundary.Dispose();
                _physicBoundary = null;
            }
        }
 /// <summary>
 /// Creates physic boundary.
 /// </summary>
 /// <param name="tangibleObject">The tangible object.</param>
 /// <returns>a new instance of <see cref="TangibleObjectControl"/>.</returns>
 static TangibleObjectControl CreatePhysicBoundary(TangibleObject tangibleObject)
 {
     var control = new TangibleObjectControl();
     return control;
 }
        /// <summary>
        /// Initializes the physic boundaries.
        /// </summary>
        void InitializePhysicBoundaries()
        {
            if (_physicBoundary != null)
                return;

            _physicBoundary = CreatePhysicBoundary(_tangibleObject);

            // Add the physic boundary to the canvas.
            var startPoint = GetPhysicBoundaryStartPoint();
            // Keep track on the physic sprites.
            _physicSprites.AddRange(
                _tangibleCanvas.AddPhysicsUserControl(
                    _physicBoundary, startPoint.X, startPoint.Y, 0));

            //_tangibleCanvas.Children.Add(_physicBoundary);
        }
 /// <summary>
 /// Creates a new instance of <see cref="FilterControl"/>.
 /// </summary>
 /// <param name="tangibleObjectControl">The <see cref="TangibleObjectControl"/> instance that is
 /// the owner of the filter control.</param>
 public FilterControl(TangibleObjectControl tangibleObjectControl)
     : this()
 {
     this.DataContext = new FilterControlViewModel(tangibleObjectControl);
 }