Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I have a article that i want to show it in my program.

how can i show that article without any white background?

can i do this with HTML?(html has a white background)

actually if i can somehow remove the HTML background and show the article(in HTML) using "frame" will be better but if i couldn't please tell me another way.

thanks in advanced!!!
Posted
Comments
[no name] 30-Nov-11 20:27pm    
no white background?

Hi,

Take a look at: WPF HTML Supported TextBlock[^]

If you change the background to Transparent? you should be OK.

Regards, AT
 
Share this answer
 
v2
Comments
LanFanNinja 30-Nov-11 16:39pm    
Edit: Fixed link
I just wonder why you not use flowDocumentReader or use richtextbox and put windows background transparent no border etc... at the bottom the link will hellp you more ı hope ;)

HTML
<!-- This simple flow document includes a paragraph with some
     bold text in it and a list. -->
<flowdocumentreader xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <flowdocument>
    <paragraph>
      <bold>Some bold text in the paragraph.</bold>
      Some text that is not bold.
    </paragraph>

    <list>
      <listitem>
        <paragraph>ListItem 1</paragraph>
      </listitem>
      <listitem>
        <paragraph>ListItem 2</paragraph>
      </listitem>
      <listitem>
        <paragraph>ListItem 3</paragraph>
      </listitem>
    </list>

  </flowdocument>
</flowdocumentreader>

http://msdn.microsoft.com/en-us/library/aa970909.aspx
 
Share this answer
 
ok friend ı designed present for you hope it will be hellpfull for you ofcourse you can develope than will be more beautiful please dont forget to vote enjoy ;)

HTML
<window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
x:Class="Christmas.MainWindow" x:Name="Window" Title=" MainWindow" Width="Auto" Height="Auto" WindowStyle="None" AllowsTransparency="True"
ResizeMode="CanResizeWithGrip" Background="{x:Null}"> 
	
	<grid x:name="LayoutRoot" height="Auto" width="Auto" xmlns:x="#unknown">
		
		<!--here ı put 1 Button ClickEvent  will close window-->
		<Button Content="Close me" Click="button1_Click" HorizontalAlignment="Right" Width="56" OpacityMask="#FF76FF00" Height="40" VerticalAlignment="Top" >
			<Button.Background>
				<lineargradientbrush endpoint="0.5,1" startpoint="0.5,0">
					<gradientstop color="Black" offset="0" />
					<gradientstop color="#FFFF0086" offset="1" />
				</lineargradientbrush>
			</Button.Background>
		</Button>
		
		<!--here you can put your article -->
		<richtextbox margin="0,0,176,-1" background="{x:Null}" borderbrush="#FF76FF00" foreground="#FF76FF00" selectionbrush="#FF76FF00" isreadonlycaretvisible="True" fontsize="16" fontfamily="Monotype Corsiva" d:layoutoverrides="GridBox" xmlns:d="#unknown">
<flowdocument>
<paragraph><run language="tr-tr" text="hello friend wrıte here your article" /></paragraph>
<paragraph><run language="tr-tr" text="*****************************" /></paragraph>
<paragraph><run language="tr-tr" /></paragraph>
<paragraph><run language="tr-tr" /></paragraph>
<paragraph><run language="tr-tr" /></paragraph>
<paragraph><run language="tr-tr" /></paragraph>
<paragraph><run language="tr-tr" text="**************************************************************" /></paragraph>
<paragraph><run language="tr-tr" text="**********************************" /></paragraph>
<paragraph><run language="tr-tr" text="**********************************************" /></paragraph>
<paragraph><run language="tr-tr" text="******************************" /></paragraph>
<paragraph><run language="tr-tr" text="************************************" /></paragraph>
<paragraph><run language="tr-tr" text="*********" /></paragraph>
<paragraph><run language="tr-tr" text="*************************" /></paragraph>
<paragraph><run language="tr-tr" text="*************" /></paragraph>
<paragraph><run language="tr-tr" text="************************************************************************************************************************************************************" /></paragraph>
</flowdocument>
	</richtextbox>
	<!--here ı put path  you can resize window at Rıght bottom-->
	<path data="M55.5,0.5 L55.5,39.5 0.5,39.5 z" horizontalalignment="Right" height="40" margin="0,0,0,-1" stretch="Fill" stroke="Black" verticalalignment="Bottom" width="40" panel.zindex="-1" grid.row="1">
	<path.fill>
		<lineargradientbrush endpoint="0.5,1" startpoint="0.5,0">
			<gradientstop color="Black" offset="0" />
			<gradientstop color="#FFCD006C" offset="1" />
		</lineargradientbrush>
	</path.fill>
	</path>		
</grid>
</window>
<!--here is what you will put at codebehind for button clickhandler-->
<!--
	
	private void button1_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

-->
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900