So i need to print a label from a windows 8 app,(c# Xaml), and all of the samples i've found are overcomplicated for my needs. My content is a seperate page, containing a Text block and an image, which are filled when the page loads, all i need it to do is print that page. Is there a simplified method for printing ( ie, no using RichTextBox and Overflows etc) for a single simple page. For the interested, this is the page i need to print:
<Page
x:Class="Storeageapp.OutputforLabel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Storeageapp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Width="300" Height="200">
<Grid x:Name="printableArea">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="3*"/>
</Grid.RowDefinitions>
<StackPanel x:Name="header" Grid.Row="0" Grid.ColumnSpan="2" Height="60" Visibility="Collapsed">
</StackPanel>
<TextBlock x:Name="UID" Text="Hello World" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" />
<Image Source="" x:Name="scenarioImage" HorizontalAlignment="Center" Grid.Row="1" Grid.Column="0" Margin="10"/>
<StackPanel x:Name="footer" Grid.Row="4" Grid.Column="0" VerticalAlignment="Top" Visibility="Collapsed">
</StackPanel>
</Grid>
</Page>
I'd be happy if there was some way to print it as an image even but i can't figure that out. Thanks. edit: This is in a windows store app sorry, not WPF.