Skip to content

Instantly share code, notes, and snippets.

@yavor87
Last active January 21, 2019 15:08
Show Gist options
  • Save yavor87/798a3b0fb4453b00d8e0b64978bf410a to your computer and use it in GitHub Desktop.
Save yavor87/798a3b0fb4453b00d8e0b64978bf410a to your computer and use it in GitHub Desktop.
<ContentPage xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
Title="Contoso">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Menu" Clicked="OpenPopup" />
</ContentPage.ToolbarItems>
<telerikPrimitives:RadPopup.Popup>
<telerikPrimitives:RadPopup x:Name="popup" IsModal="false" Placement="Right"
VerticalOffset="10" OutsideBackgroundColor="#6F000000">
<telerikPrimitives:RadBorder CornerRadius="2"
BackgroundColor="White">
<Grid Padding="20">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="20" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<Label Text="Please rate your experience" />
<telerikInput:RadShapeRating Grid.Row="1" />
<Button Grid.Row="2" Padding="2" HorizontalOptions="End" Text="Send" Clicked="ClosePopup" />
</Grid>
</telerikPrimitives:RadBorder>
</telerikPrimitives:RadPopup>
</telerikPrimitives:RadPopup.Popup>
<StackLayout>
<!-- Place new controls here -->
</StackLayout>
</ContentPage>
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void OpenPopup(object sender, EventArgs e)
{
popup.IsOpen = true;
}
private void ClosePopup(object sender, EventArgs e)
{
popup.IsOpen = false;
}
}
private void OpenFeedbackMenu(object sender, EventArgs e)
{
popup.Content = new FeedbackMenu();
popup.IsOpen = true;
}
private void OpenButtonMenu(object sender, EventArgs e)
{
popup.Content = new ButtonMenu();
popup.IsOpen = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment