Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lhughey opened this issue Nov 3, 2018 · 1 comment
Open

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

lhughey opened this issue Nov 3, 2018 · 1 comment

Comments

@lhughey
Copy link

lhughey commented Nov 3, 2018

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

<controls:QuickInnerMenuView x:Name="myMenu" MenuOrientations="RightToLeft"/>

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
Copy link
Author

lhughey commented Nov 3, 2018

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

`

<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>

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant