如何显示没有白色背景的文章 [英] how to show an article with no white background

查看:61
本文介绍了如何显示没有白色背景的文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一篇文章想要在程序中显示.

如何显示没有任何白色背景的文章?

我可以用HTML做到这一点吗?(html有白色背景)

实际上,如果我能以某种方式删除HTML背景并使用框架"显示文章(以HTML格式)会更好一些,但是如果我不能以其他方式告诉我.

感谢高级!!

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!!!

推荐答案



看一下: WPF HTML支持的文本块 [
关于AT
Hi,

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

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

Regards, AT


我只是想知道为什么您不使用flowDocumentReader或使用richtextbox并将Windows背景透明无边框等...在底部的链接将使您感到更加希冀;)

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 ;)

<!-- 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


好朋友ı为您设计的礼物希望当然,您可以发展起来的比那会更加美丽.请不要忘记投票享受;)

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 ;)

<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();
        }

-->


这篇关于如何显示没有白色背景的文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆