Beispiel #1
0
        private void LayoutMarker(Marker marker, Point position)
        {
            // Update the marker's size and position
            marker.Visibility = Visibility.Visible;
            var cellRect = GetCellRect((int)position.X, (int)position.Y);

            marker.SetValue(Canvas.LeftProperty, cellRect.Left + MarkerMargin);
            marker.SetValue(Canvas.TopProperty, cellRect.Top + MarkerMargin);
            marker.Width  = cellRect.Width - (2 * MarkerMargin);
            marker.Height = cellRect.Height - (2 * MarkerMargin);
            // Tell the marker to lay itself out
            marker.Layout();
        }
 private void LayoutMarker(Marker marker, Point position)
 {
     // Update the marker's size and position
     marker.Visibility = Visibility.Visible;
     var cellRect = GetCellRect((int)position.X, (int)position.Y);
     marker.SetValue(Canvas.LeftProperty, cellRect.Left + MarkerMargin);
     marker.SetValue(Canvas.TopProperty, cellRect.Top + MarkerMargin);
     marker.Width = cellRect.Width - (2 * MarkerMargin);
     marker.Height = cellRect.Height - (2 * MarkerMargin);
     // Tell the marker to lay itself out
     marker.Layout();
 }