优化代码

This commit is contained in:
liufei
2021-05-14 17:28:43 +08:00
parent de31210f37
commit 105b0f981e
2 changed files with 20 additions and 2 deletions

View File

@@ -99,10 +99,12 @@
<Border CornerRadius="5" BorderThickness="0">
<!--背景图片-->
<Border.Background>
<ImageBrush ImageSource="D:\壁纸\18086.jpg" Opacity="0.9"></ImageBrush>
<ImageBrush ImageSource="D:\壁纸\tmig.jpg" Opacity="1"></ImageBrush>
</Border.Background>
<Grid>
<!--<Grid.Background>
<VisualBrush Stretch="Uniform" Visual="{Binding ElementName=test}"/>
</Grid.Background>-->
<!--<Grid.Background>
<SolidColorBrush Color="Black" Opacity="0.5"/>
</Grid.Background>-->

View File

@@ -10,6 +10,8 @@ using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
namespace GeekDesk
@@ -27,6 +29,20 @@ namespace GeekDesk
{
InitializeComponent();
loadData();
//Border border = new Border();
//VisualBrush brush = new VisualBrush();
//brush.Visual = test;
//brush.Stretch = Stretch.Uniform;
//border.Background = brush;
//border.Effect = new BlurEffect()
//{
// Radius = 80,
// RenderingBias = RenderingBias.Performance
//};
//border.Margin = new Thickness(-this.Margin.Left, -this.Margin.Top, 0, 0);
//this.ClipToBounds = true;
//this.Children.Clear();
//this.Children.Add(border);
//this.DataContext = mainModel;
//menu.Items = mainModel;
//System.Diagnostics.Process.Start(@"D:\SoftWare\WeGame\wegame.exe");