Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Src/Bratched.Tools/RatingControl/RatingControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public RatingControl()
#if NETFX_CORE
this.DataContextChanged += RatingControl_DataContextChanged;
gridCaptureMovement.PointerMoved += gridRating_PointerMoved;
gridCaptureMovement.PointerPressed += gridRating_PointerPressed;
gridCaptureMovement.ManipulationDelta += GridCaptureMovement_ManipulationDelta;

#endif
Expand Down Expand Up @@ -568,6 +569,20 @@ private void gridRating_PointerMoved(object sender, PointerRoutedEventArgs e)

}
}

private void gridRating_PointerPressed(object sender, PointerRoutedEventArgs e)
{
if (IsEditable && IsEnabled && Visibility==Visibility.Visible && rateItems != null && rateItems.Children.Any())
{
e.Handled = true;
if (DEBUG_MODE)
System.Diagnostics.Debug.WriteLine("PointerPressed {0}", DateTime.Now);
PointerPoint p = e.GetCurrentPoint(rateItems.Children.First());
if (p != null && p.Position != null)
ChangeItemsValue(p.Position.X);

}
}
#endif

#if NETFX_CORE
Expand Down