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);
    }
    }

  • 相关阅读:
    【gulp】Gulp的安装和配置 及 系列插件
    python函数:装饰器、修正、语法糖、有参装饰器、global与nonlocal
    python函数:函数参数、对象、嵌套、闭包与名称空间、作用域
    python函数:函数阶段练习
    python函数:函数使用原则、定义与调用形式
    python文件操作:文件指针移动、修改
    python文件操作:文件处理与操作模式
    python文件操作:文件处理案例
    python文件操作:字符编码与文件处理
    python基础:数据类型二
  • 原文地址:https://www.cnblogs.com/ganzhihui/p/10966741.html
Copyright © 2011-2022 走看看