🏆 作者简介,愚公搬代码
🏆《头衔》:华为云特约编辑,华为云云享专家,华为开发者专家,华为产品云测专家,CSDN博客专家,阿里云专家博主,腾讯云优秀博主,掘金优秀博主,51CTO博客专家等。
🏆《近期荣誉》:2022年CSDN博客之星TOP2,2022年华为云十佳博主等。
🏆《博客内容》:.NET、Java、Python、Go、Node、前端、IOS、Android、鸿蒙、Linux、物联网、网络安全、大数据、人工智能、U3D游戏、小程序等相关领域知识。
🏆🎉欢迎 👍点赞✍评论⭐收藏
🚀前言
后台框架模板是一种基于特定技术栈及架构思路开发的、可用于快速搭建后台系统的模板。它提供了一系列预定义的功能、UI样式和组件,可以作为开发者快速搭建后台系统的起点。通常情况下,后台框架模板会包含以下组件:用户管理、权限管理、数据管理、统计分析、日志处理等。常见的后台框架模板包括Laravel Admin、Ant Design Pro、vue-element-admin等。
WPF是一种Microsoft .NET框架的应用程序开发技术,它提供了一种基于 XAML 语言的创新性的用户界面体验。在WPF上开发管理系统,可以采用MVVM等模式进行设计。而针对WPF管理系统开发,也有一些后台框架模板可以参考。以下是几个常见的WPF管理系统后台框架模板:
-
MaterialDesignInXamlToolkit:这是一个开源的WPF UI框架,提供了现代化的UI元素及控件,可以用于快速构建美观的应用程序界面。
-
MahApps.Metro:这是一个WPF UI框架,提供了许多现代化的UI样式及控件,可以用于快速构建美观的应用程序界面,同时对于响应式布局也有较好的支持。
-
DevExpress WPF Controls:这是一个商业级别的WPF UI框架,提供了许多内置的UI样式、控件及工具,可以用于构建高性能、美观的应用程序界面。
这些框架模板都提供了一些基本的UI样式、控件、模板和MVVM设计模式等工具,可以帮助开发者快速搭建WPF管理系统。
本文主要是用到前面知识手写后台框架模板:
🚀一、常用框架页面布局案例
🔎1.实际效果图
🔎2.源码
<Window x:Class="Zhaoxi.AppLayout.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Zhaoxi.AppLayout"
mc:Ignorable="d" FontFamily="Microsoft YaHei" FontWeight="ExtraLight"
Title="MainWindow" Height="650" Width="1100"
WindowStyle="None" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Background="Transparent">
<Border Background="#F7F9FA" CornerRadius="5" Margin="5" MouseLeftButtonDown="WinMove_ButtonDown">
<Border.Effect>
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Opacity="0.3" Color="Gray"/>
</Border.Effect>
<DockPanel>
<StackPanel DockPanel.Dock="Left" Background="White" Width="220" >
<TextBlock Text="Food Delivery" FontSize="20" FontWeight="Bold"
HorizontalAlignment="Center" Margin="0,30"/>
<Border Height="30" BorderBrush="Chocolate" BorderThickness="2,0,0,0" Margin="10">
<TextBlock Text="Dashboard" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="Chocolate"/>
</Border>
<Border Height="30" Margin="10">
<TextBlock Text="Restaurants" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="#444"/>
</Border>
<Border Height="30" Margin="10">
<TextBlock Text="Customers" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="#444"/>
</Border>
</StackPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="80"/>
<RowDefinition Height="140"/>
</Grid.RowDefinitions>
<Grid Background="White" Margin="1,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="" FontFamily="./Assets/Fonts/#iconfont" FontSize="26" Margin="20,0"
Foreground="#777" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border Grid.Column="1" Margin="0,5" BorderBrush="#CCC" BorderThickness="1" CornerRadius="20">
<Grid>
<Border Width="20" Height="20" Background="#EEE" CornerRadius="10" HorizontalAlignment="Left" Margin="10,0,0,0"/>
<TextBlock Text="Search for Restaurants and Cusiones" VerticalAlignment="Center" Margin="40,0,0,0" Foreground="#999"/>
</Grid>
</Border>
<TextBlock Text="" FontFamily="./Assets/Fonts/#iconfont" Grid.Column="2"
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20,0"
FontSize="26" Foreground="#777"/>
<StackPanel Grid.Column="3" Orientation="Horizontal" Margin="0,0,10,0">
<Border Width="35" Height="35" Background="#EEE" CornerRadius="17" Margin="10,0"/>
<TextBlock Text="Adminstrator" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
<Grid HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Row="1" Width="280" Margin="20,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border BorderBrush="#EEE" BorderThickness="0,0,0,1" Grid.ColumnSpan="3"/>
<TextBlock Text="Today" Foreground="#444" FontWeight="Bold" Margin="0,15"/>
<TextBlock Text="Today" Grid.Column="1" TextAlignment="Center" Foreground="#999" Margin="0,15"/>
<TextBlock Text="Today" Grid.Column="2" TextAlignment="Right" Foreground="#999" Margin="0,15"/>
</Grid>
<UniformGrid Grid.Row="2" Columns="5" Margin="20">
<Border Background="White" CornerRadius="5" Padding="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Total Sales" Foreground="#999" VerticalAlignment="Center"/>
<TextBlock Text="2,00,000" Grid.Row="1" VerticalAlignment="Center" FontSize="14" FontWeight="Bold"/>
<TextBlock Text="+5%" Foreground="Green" Grid.Row="2" VerticalAlignment="Center"/>
<TextBlock Text="Details" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="2"/>
</Grid>
</Border>
<Border Background="White" CornerRadius="5" Padding="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Total Sales" Foreground="#999" VerticalAlignment="Center"/>
<TextBlock Text="2,00,000" Grid.Row="1" VerticalAlignment="Center" FontSize="14" FontWeight="Bold"/>
<TextBlock Text="+5%" Foreground="Green" Grid.Row="2" VerticalAlignment="Center"/>
<TextBlock Text="Details" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="2"/>
</Grid>
</Border>
<Border Background="White" CornerRadius="5" Padding="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Total Sales" Foreground="#999" VerticalAlignment="Center"/>
<TextBlock Text="2,00,000" Grid.Row="1" VerticalAlignment="Center" FontSize="14" FontWeight="Bold"/>
<TextBlock Text="+5%" Foreground="Green" Grid.Row="2" VerticalAlignment="Center"/>
<TextBlock Text="Details" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="2"/>
</Grid>
</Border>
<Border Background="White" CornerRadius="5" Padding="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Total Sales" Foreground="#999" VerticalAlignment="Center"/>
<TextBlock Text="2,00,000" Grid.Row="1" VerticalAlignment="Center" FontSize="14" FontWeight="Bold"/>
<TextBlock Text="+5%" Foreground="Green" Grid.Row="2" VerticalAlignment="Center"/>
<TextBlock Text="Details" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="2"/>
</Grid>
</Border>
<Border Background="White" CornerRadius="5" Padding="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Total Sales" Foreground="#999" VerticalAlignment="Center"/>
<TextBlock Text="2,00,000" Grid.Row="1" VerticalAlignment="Center" FontSize="14" FontWeight="Bold"/>
<TextBlock Text="+5%" Foreground="Green" Grid.Row="2" VerticalAlignment="Center"/>
<TextBlock Text="Details" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="2"/>
</Grid>
</Border>
</UniformGrid>
</Grid>
</DockPanel>
</Border>
</Window>
🚀感谢:给读者的一封信
亲爱的读者,
我在这篇文章中投入了大量的心血和时间,希望为您提供有价值的内容。这篇文章包含了深入的研究和个人经验,我相信这些信息对您非常有帮助。
如果您觉得这篇文章对您有所帮助,我诚恳地请求您考虑赞赏1元钱的支持。这个金额不会对您的财务状况造成负担,但它会对我继续创作高质量的内容产生积极的影响。
我之所以写这篇文章,是因为我热爱分享有用的知识和见解。您的支持将帮助我继续这个使命,也鼓励我花更多的时间和精力创作更多有价值的内容。
如果您愿意支持我的创作,请扫描下面二维码,您的支持将不胜感激。同时,如果您有任何反馈或建议,也欢迎与我分享。
再次感谢您的阅读和支持!
最诚挚的问候, “愚公搬代码”