当前位置: 首页 > news >正文

网站的权重如何策划网站

网站的权重,如何策划网站,自己做的网站别人怎么上网找到,长春搜索排名公司适用于初学者的 .NET MAUI | Microsoft Learn 记录微软Learn中用到的代码。文章比较粗糙#xff0c;大部分是项目代码粘贴。想详细学习的可到上面的链接学习#xff0c;代码可以从这里复制后直接运行。 练习中一共有两个页面#xff1a; 1、MainPage.xaml 用于添加列表中的… 适用于初学者的 .NET MAUI | Microsoft Learn 记录微软Learn中用到的代码。文章比较粗糙大部分是项目代码粘贴。想详细学习的可到上面的链接学习代码可以从这里复制后直接运行。 练习中一共有两个页面 1、MainPage.xaml 用于添加列表中的内容。主要功能有向列表中添加一项左滑删除该项点击该选项进入详情页面。 2、DetailPage.xaml 显示详细信息实际上显示的很少。返回主界面。 用到的MVVM包有 1、CommunityToolkit.Mvvm 接下来是MainPage.xaml代码 ?xml version1.0 encodingutf-8 ? ContentPage xmlnshttp://schemas.microsoft.com/dotnet/2021/mauixmlns:xhttp://schemas.microsoft.com/winfx/2009/xamlx:ClassMauiAppDemo1.MainPagexmlns:viewmodeclr-namespace:MauiAppDemo1.ViewModelx:DataTypeviewmode:MainViewModelGrid RowDefinitions100,Auto,*ColumnDefinitions.75*,.25*Padding10RowSpacing10ColumnSpacing10Image Grid.ColumnSpan2Sourcedotnet_bot.pngBackgroundwhite/Entry PlaceholderEnter taskText{Binding Text}Grid.Row1/Button TextAddCommand{Binding AddCommand}Grid.Row1Grid.Column1/CollectionView Grid.Row2 Grid.ColumnSpan2ItemsSource{Binding Items}SelectionModeNone!--CollectionView.ItemsSourcex:Array Type{x:Type x:String}x:StringApples/x:Stringx:StringBananas/x:Stringx:StringOranges/x:String/x:Array/CollectionView.ItemsSource--CollectionView.ItemTemplateDataTemplate x:DataType{x:Type x:String}SwipeViewSwipeView.RightItemsSwipeItems SwipeItem TextDeleteBackgroundColorRedCommand{Binding Source{RelativeSource AncestorType{x:Type viewmode:MainViewModel}},PathDeleteCommand}CommandParameter{Binding .}//SwipeItems/SwipeView.RightItemsGrid Padding0,5FrameFrame.GestureRecognizersTapGestureRecognizer Command{Binding Source{RelativeSource AncestorType{x:Type viewmode:MainViewModel}},PathTapCommand}CommandParameter{Binding .}//Frame.GestureRecognizersLabel Text{Binding .}FontSize24//Frame/Grid/SwipeView/DataTemplate/CollectionView.ItemTemplate/CollectionView/Grid/ContentPageusing MauiAppDemo1.ViewModel;namespace MauiAppDemo1;public partial class MainPage : ContentPage {int count 0;public MainPage(MainViewModel vm){InitializeComponent();BindingContext vm;}} using MauiAppDemo1.ViewModel;namespace MauiAppDemo1;public static class MauiProgram {public static MauiApp CreateMauiApp(){var builder MauiApp.CreateBuilder();builder.UseMauiAppApp().ConfigureFonts(fonts {fonts.AddFont(OpenSans-Regular.ttf, OpenSansRegular);fonts.AddFont(OpenSans-Semibold.ttf, OpenSansSemibold);});builder.Services.AddSingletonMainPage();builder.Services.AddSingletonMainViewModel();builder.Services.AddTransientDetailPage();builder.Services.AddSingletonDetailViewModel(); return builder.Build();} }namespace MauiAppDemo1;public partial class AppShell : Shell {public AppShell(){InitializeComponent();Routing.RegisterRoute(nameof(DetailPage),typeof(DetailPage));} }using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks;namespace MauiAppDemo1.ViewModel {/// summary/// CommunityToolkit.Mvvm/// /summarypublic partial class MainViewModel : ObservableObject{public MainViewModel(){items new ObservableCollectionstring();}[ObservableProperty]ObservableCollectionstring items;[ObservableProperty]string text;[RelayCommand]void Add(){if (string.IsNullOrWhiteSpace(Text)) return;items.Add(Text);Text string.Empty;}[RelayCommand]void Delete(string s){if (items.Contains(s)){items.Remove(s);}}[RelayCommand] async Task Tap(string s){await Shell.Current.GoToAsync(${nameof(DetailPage)}?Text{s});}}/// summary/// 基本写法/// /summary//public class MainViewModel : INotifyPropertyChanged//{// string text;// public string Text// {// get text;// set// {// textvalue;// OnPropertyChanged(nameof(Text));// }// }// public event PropertyChangedEventHandler PropertyChanged;// void OnPropertyChanged(string name)PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));//} }DetailPage.xaml ?xml version1.0 encodingutf-8 ? ContentPage xmlnshttp://schemas.microsoft.com/dotnet/2021/mauixmlns:xhttp://schemas.microsoft.com/winfx/2009/xamlx:ClassMauiAppDemo1.DetailPagexmlns:viewmodelclr-namespace:MauiAppDemo1.ViewModelx:DataTypeviewmodel:DetailViewModelTitleDetailPageVerticalStackLayout Padding20Label Text{Binding Text}FontSize25VerticalOptionsCenter HorizontalOptionsCenter /Button TextGo BackCommand{Binding GoBackCommand}//VerticalStackLayout /ContentPage using MauiAppDemo1.ViewModel;namespace MauiAppDemo1;public partial class DetailPage : ContentPage {public DetailPage(DetailViewModel vm){InitializeComponent();BindingContext vm;} } using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input;namespace MauiAppDemo1.ViewModel {[QueryProperty(Text,Text)]public partial class DetailViewModel:ObservableObject{[ObservableProperty]string text;[RelayCommand]async Task GoBack(){await Shell.Current.GoToAsync(..);}} }
http://www.pierceye.com/news/914121/

相关文章:

  • 品牌型网站制作公司想做百度推广找谁
  • 浙江建设监理协会官方网站网站建设的公司选择哪家好
  • 优秀网站及网址沙漠风网站建设6
  • 做数据表格的网站出口网站建设方案
  • 广州网站建设信息科技有限公司福建省亿力电力建设有限公司网站
  • 电子商务网站开发 ppt湛江做网站报价
  • 网站建设框架图wordpress 固定链接设置
  • 内蒙古工程建设协会网站seo文章外包
  • 网站建设免费的服务器商丘推广公司
  • 网站设计大概价格设计网络平台的公司
  • phpcms中的网站介绍页中文去掉wordpress
  • 网站的建设心得怎么做网站淘宝转换工具
  • 做网站1天转多钱wordpress 分享插件
  • 淘宝网站建设单子好接吗朝阳区办公
  • html5网站建设平台怎么给网站添加图标
  • 中文域名网站网站制作wap页面
  • wordpress站内全文检索一个人完成网站建设
  • wordpress自定义重用结构北京seo怎么优化
  • 苏州做网站专业的公司vs2008怎么做网站
  • 效果好的徐州网站建设休闲食品网站建设策划书
  • 如何发布自己的网站wordpress 4.9.6 下载
  • 织梦网站打开慢企业咨询师资格证
  • 蓬莱网站建设哪家好广州白云网站建设
  • 网站建设得花多少钱做购物网站能否生存
  • 多语言网站 用什么cms深圳Wordpress网站
  • 常州市建设工程质量监督站网站开发公司设计管理岗位述职
  • 国外网站顶部菜单设计谷歌seo文章
  • 梅州网站开发外国自适应企业网站
  • 大型网站建设动力无限哪个公司的装饰设计公司
  • 网站建设与管理自考wordpress替换默认的编辑器