Closed mrxten closed 7 years ago
ex. Vertical orientation - works changed to horizontal orientation - works changed back to vertical - does not works.
@mrxten Sorry, I don't know your situation much. Could you paste some code?
Try rotate phone. After rotating vertical -> horizontal -> vertical your effects will not work in any elements. ex.
Main.page.cs
public class Main()
{
private readonly View _horizontalView = new HorizontalView();
private readonly View _verticalView = new VerticalView();
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
Content = Width > Height ? _horizontalView : _verticalView;
}
}
VerticalView.xaml
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:partials="clr-namespace:VisuPad2.Views.Dashboard.Partials;assembly=VisuPad2"
xmlns:extensions="clr-namespace:VisuPad2.Extensions;assembly=VisuPad2"
x:Class="VisuPad2.Views.Dashboard.Orientation.VerticalView">
<Grid effects:AddCommand.On="True"
effects:AddCommand.EffectColor="LightGray"
effects:AddCommand.EnableRipple="True"
effects:AddCommand.Command="{Binding SomeCommand}">
<!--something-->
</Grid>
</ContentView>
HorizontalView.xaml
<!--something-->
@mrxten Thank you for your code. I turned out cause of this issue. I Released Fixed Version 0.2.3. Please try it.
Yes, it works! Thanks.
My page has different ContentViews for both orientations. I added ripple effect for both. After changing Content in a page to another ContentView ripple effect ceases to work.