Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic print function not working (Read 1269 times)
kelum
Full Member
***
Offline


I Love MindFusion!

Posts: 100
Joined: Mar 25th, 2017
print function not working
Apr 5th, 2017 at 5:25am
Print Post  

I added print button as following and

Code
Select All
                    <Button Margin="1" Padding="2" HorizontalContentAlignment="Left"
                            Style="{StaticResource ToolBarButtonBaseStyle}"
                            Command="{x:Static ApplicationCommands.Print}"
                            CommandTarget="{Binding ElementName=MyDesigner}">
                        <Button.Content>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Image Source="/Layout/Images/Print.png" Width="16"/>
                                <TextBlock Margin="3,0,3,0" Text="Print" VerticalAlignment="Center" Grid.Column="1"/>
                            </Grid>
                        </Button.Content>
                    </Button> 



on XML file and in code behind of Main Window added following code to print

Code
Select All
public MainWindow()
{
   InitializeComponent();

   CommandBindings.Add(new CommandBinding(ApplicationCommands.Print, Print_Executed));
}

        private void Print_Executed(object sender, EventArgs e)
        {
            flowchart.PrintOptions.DocumentName = "Flowchart";
            flowchart.PrintOptions.EnableImages = false;
            flowchart.PrintOptions.EnableInterior = true;
            flowchart.PrintOptions.EnableShadows = true;
            flowchart.PrintOptions.Scale = 100;
            flowchart.Print();
        }  



this is executing without any error and then showing print wizard but its not printing the layout.

what else should I look for ?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3176
Joined: Oct 19th, 2005
Re: print function not working
Reply #1 - Apr 5th, 2017 at 8:34am
Print Post  
Print works correctly for me, are you sure everything is fine with the printer - it's loaded with paper, turned on, accessible over the network, not jammed, etc?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint