private void FlipView_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { if (_isMaximized) { FlipView.SetValue(Grid.RowProperty, _column); FlipView.SetValue(Grid.ColumnProperty, _row); FlipView.SetValue(Grid.ColumnSpanProperty, _columnSpan); FlipView.SetValue(Grid.RowSpanProperty, _rowSpan); } else { _column = (int)FlipView.GetValue(Grid.ColumnProperty); _row = (int)FlipView.GetValue(Grid.RowProperty); _rowSpan = (int)FlipView.GetValue(Grid.RowSpanProperty); _columnSpan = (int)FlipView.GetValue(Grid.ColumnSpanProperty); FlipView.SetValue(Grid.RowProperty, 0); FlipView.SetValue(Grid.ColumnProperty, 0); FlipView.SetValue(Grid.ColumnSpanProperty, Grid.ColumnDefinitions.Count); FlipView.SetValue(Grid.RowSpanProperty, Grid.RowDefinitions.Count); } _isMaximized = !_isMaximized; }
/// <summary> /// Gets a value indicating whether this is a looping FlipView /// </summary> /// <param name="obj">the flipView</param> /// <returns>true if the list loops</returns> public static bool GetIsLooping(FlipView obj) { return((bool)obj.GetValue(IsLoopingProperty)); }