XAM-Consulting / SlideOverKit

Easily Create Awesome Slideover's in Xamarin.Forms
Apache License 2.0
394 stars 120 forks source link

XAML duplicate sliders oddity? How to call via XAML? #90

Open lhughey opened 6 years ago

lhughey commented 6 years ago

Can someone show me how they are able to get the RightToLeft Slider working using only XAML? I'd like to invoke the SliderMenu from XAML but i've been unsuccessful. I removed the following line from the .cs codebhind SlideMenu = new QuickInnerMenuView(MenuOrientation.RightToLeft);

And replaced it with

`

`

then changed the codebehind to call the XAML quickinnerMenuView

SlideMenu = new QuickInnerMenuView(MenuOrientation.RightToLeftSlideMenu = myMenu;

It immediately threw the error that I needed the input the HeightRequest, which is odd considering i'm calling the same object which has that property defined in its constructor. I'm now dealing with a duplicate sliders on the page. I had originally planned on constructing the entire SliderMenuView from XAML, but i once again ran into multiple items.

Can someone show me how they are able to get the RightToLeft Slider working using only XAML? I have complicated screen that would work best keeping the design consistent with XAML.

lhughey commented 6 years ago

My attempt at getting rendering a SliderMenuView from XAML (from scratch) is below

` <?xml version="1.0" encoding="UTF-8"?> <slideOverKit:MenuContainerPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:slideOverKit="clr-namespace:SlideOverKit;assembly=SlideOverKit" x:Class="SlideOverKit.MoreSample.InnerMenuPage"> <slideOverKit:SlideMenuView HorizontalOptions="End" MenuOrientations="RightToLeft" IsFullScreen="False" BackgroundViewColor="Transparent" BackgroundColor="Red" WidthRequest="200" HeightRequest="500" DraggerButtonWidth="50" TopMargin="30" x:Name="myMenu">

</slideOverKit:SlideMenuView> </slideOverKit:MenuContainerPage>

`