0
我开发了一个应用程序,其中使用了文本块。现在我要删除的影子上的文字,如给定的图像对文本块中的文本投下阴影
我用模糊的效果,但它给错误。
private async void ok_Click(object sender, RoutedEventArgs e)
{
br = new Border();
Word_art obvwa = new Word_art();
if (txtbox.Text == "")
{
var line = new MessageDialog("PLease enter the text");
await line.ShowAsync();
}
else
{
TB1 = new TextBlock();
TB1.FontSize = txtbox.FontSize;
TB1.Foreground = txtbox.Foreground;
SolidColorBrush sb = new SolidColorBrush();
var color = sb.Color;
TB1.Opacity = 60;
TB1.Text = txtbox.Text;
var blur = new GaussianBlurEffect();
blur.BlurAmount = 5.0f;
blur.Source = TB1.Text;
var sitem = stylecombo.SelectedItem as ComboBoxItem;
string sitemfm = Convert.ToString(sitem.Content);
FontFamily fm = new FontFamily(""+ sitemfm);
TB1.FontFamily = fm;
我试过Microsoft.graphics.effect程序集,但它不包含在我的项目中。
它给出了什么错误,你的代码是什么样的,你试过了什么? –
var blur = new GaussianBlurEffect(); blur.BlurAmount = 5.0f; blur.Source = bitmap; –
它给缺少的库或程序集参考 –