BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
<
Button Foreground="White" x:Name="export" Background="Black" Visibility="{Binding Export}"> <Button.Flyout> <MenuFlyout> <MenuFlyoutItem Text="Png" Command="{Binding SelectedDiagram.Export}" CommandParameter="Png"/> <MenuFlyoutItem Text="Jpeg" Command="{Binding SelectedDiagram.Export}" CommandParameter="Jpeg"/> <MenuFlyoutItem Text="Tiff" Command="{Binding SelectedDiagram.Export}" CommandParameter="Tiff"/> <MenuFlyoutItem Text="Gif" Command="{Binding SelectedDiagram.Export}" CommandParameter="Gif"/> <MenuFlyoutItem Text="JpegXR" Command="{Binding SelectedDiagram.Export}" CommandParameter="JpegXR"/> </MenuFlyout> </Button.Flyout> <Button.Style> <Style TargetType="ButtonBase" BasedOn="{StaticResource DiagramBuilderPathBasedAppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="OpenFileAppBarButton"/> <Setter Property="AutomationProperties.Name" Value="Export"/> <Setter Property="Content" Value="M45.963548,8.269645L62.665147,25.065546 45.963548,39.871244 45.963548,31.963644C45.963548,31.963644 17.120617,24.075571 9.909945,39.871244 9.9099454,35.922571 12.530199,16.167482 45.963548,16.167483z M0,0L41.778571,0 41.778571,4.1795139 41.778571,8.3590277 37.598714,8.3590277 37.598714,4.1795139 4.1798577,4.1795139 4.1798577,45.954649 37.598714,45.954649 37.598714,41.775137 41.778571,41.775137 41.778571,45.954649 41.778571,50.134165 37.598714,50.134165 0,50.134165 0,45.954649 0,4.1795139z"/> </Style> </Button.Style> </Button>Hi Sandeep,
Some of the features will be available only in winRt 8.1, to toggle those we use conditional compilations in project setting. Kindly refer the screen shot from attachment.
In the provided sample we have missed those conditional compilation, so that export and print feature is not enabled. We have added that, now we can print and export the diagram page. Below code snippet represent enabling feature for winRt 8.1.
#if SyncfusionFramework4_5_1
MenuFlyout menu = new MenuFlyout();
Binding bind = new Binding { Path = new PropertyPath("SelectedDiagram.Export") };
List<string> formats = new List<string> { "Png", "Jpeg", "Gif", "Tiff", "Jpegxr" };
foreach (var item in formats)
{
MenuFlyoutItem menuItem = new MenuFlyoutItem
{
Text = item,
CommandParameter = item
};
menuItem.SetBinding(MenuFlyoutItem.CommandProperty, bind);
menu.Items.Add(menuItem);
}
export.Flyout = menu;
#endif
So the modification which you have made in your sample is no more needed, after setting conditional compilations. Now print and export feature will be enabled by default.
Kindly find the modified sample from attachment.
Note: As we have implemented print and export feature only for windows 8.1, it will not work in windows 8.0.
Regards,
Parthiban
Hi Sandeep,
Thanks for your update.
Please let us know, if you require any further assist on this.
Regards,
Parthiban