2016-07-16 17 views
1

我有一個需求icici銀行我有一個檢查,我有2打印用戶名,金額數字,但textEdit應該是不可見的,並允許寫和讀。如何使textEdit透明?並應該允許寫入文本應該是可見的文字?

<Window xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" x:Class="WpfApplication11.MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 

    Title="MainWindow" Height="350" Width="525"> 
<Grid Margin="0,10,0,0"> 
    <Grid.Background> 
     <ImageBrush ImageSource="c:\users\it-prog3\documents\visual studio 2012\Projects\WpfApplication11\WpfApplication11\Images\ICICI.jpg"/> 
    </Grid.Background> 
    <dxe:TextEdit Margin="31,60,68,221" /> 
</Grid> 

回答

0

我很害怕,你不能這樣做,用的DevExpress文本編輯。我也在使用devexpress,並且有類似的要求。我做的是使用文本框。嘗試考慮使用文本框?

在XAML可以將背景屬性直接設置爲透明:

<TextBox x:Name="TextBox1" Background="Transparent" /> 

在代碼隱藏則可以使用下面的代碼背景設置爲透明:

TextBox TextBox1 = new TextBox 
{ 
    Width = 75, 
    Height = 25, 
    Background = Brushes.Transparent 
}; 
相關問題