zoukankan      html  css  js  c++  java
  • 总结补充

    1.wpf 在xaml 字符串格式化

    <TextBlock VerticalAlignment="Center" Foreground="#000080" HorizontalAlignment="Left" Text="{Binding, StringFormat='yyyy-MM-dd HH:mm:ss'}"></TextBlock>

    2.wpf mvvm消息传递

    注册:

    Messenger.Default.Register<string>(this, "WinClosed", (message) =>
    {
    this.Close();
    });

    消息发送:

    Messenger.Default.Send<string>(string.Empty, "WinClosed");

    3.wpf 自带消息弹出窗口

    MessageBox.Show("信息!", "提示", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK);

    4.wpf mvvm RideoButton的使用

    <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" >
    <Label Foreground="OrangeRed" FontWeight="ExtraBlack" >检索类型:</Label>
    <RadioButton MinWidth="100" Margin="10,0,0,0" Name="IsCheckedApplyCode" GroupName="ssif_1" IsChecked="{Binding CheckedValue, Converter={StaticResource}, ConverterParameter='1'}">1</RadioButton>
    <RadioButton MinWidth="100" Margin="10,0,0,0" Name="IsCheckedTransfusionCode" GroupName="ssif_1" IsChecked="{Binding CheckedValue, Converter={StaticResource}, ConverterParameter='2'}">2</RadioButton>
    <RadioButton MinWidth="100" Margin="10,0,0,0" Name="IsCheckedSickNo" GroupName="ssif_1" IsChecked="{Binding CheckedValue, Converter={StaticResource}, ConverterParameter='3'}">3</RadioButton>
    <RadioButton MinWidth="100" Margin="10,0,0,0" Name="IsCheckedBardCode" GroupName="ssif_1" IsChecked="{Binding CheckedValue, Converter={StaticResource}, ConverterParameter='4'}">4</RadioButton>
    </StackPanel>

    /// <summary>
    /// The <see cref="CheckedValue" /> property's name.
    /// </summary>
    public const string CheckedValuePropertyName = "CheckedValue";
    private string _CheckedValue = "1";
    /// <summary>
    /// 搜索类型
    /// </summary>
    public string CheckedValue
    {
    get
    {
    return _CheckedValue;
    }
    set
    {
    if (_CheckedValue == value)
    {
    return;
    }
    _CheckedValue = value;
    if (value == "1")
    {
    SearchTpye = Convert.ToInt32(SearchType.ApplyCode);
    }
    if (value == "2")
    {
    SearchTpye = Convert.ToInt32(SearchType.TransfusionCode);
    }
    if (value == "3")
    {
    SearchTpye = Convert.ToInt32(SearchType.ApplyNumber);
    }
    if (value == "4")
    {
    SearchTpye = Convert.ToInt32(SearchType.Barcode);
    }
    RaisePropertyChanged(CheckedValuePropertyName);
    }
    }

  • 相关阅读:
    .NET Core前后端分离快速开发框架(Core.3.0+AntdVue)
    关于框架
    什么是 https ?这应该是全网把 https 讲的最好的一篇文章了
    NET手撸绘制TypeScript类图——下篇
    及时发现问题,力争找到更好的解决办法,而不是得过且过
    一个命令永久禁用Win10驱动程序强制签名
    表达式的结果为true或false
    Parcel 搭建浏览器自动刷新的 非 SPA项目
    Gulp 搭建前端非SPA 项目, 修改文件浏览器自动刷新
    vue 里 this.$parent 作用
  • 原文地址:https://www.cnblogs.com/ganzhihui/p/10966741.html
Copyright © 2011-2022 走看看