Ai
1 Star 0 Fork 0

摩月流云/MaterialDesignInXamlToolkit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Buttons.xaml.cs 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using MaterialDesignColors.WpfExample.Domain;
namespace MaterialDesignColors.WpfExample
{
/// <summary>
/// Interaction logic for Buttons.xaml
/// </summary>
public partial class Buttons : UserControl
{
public Buttons()
{
InitializeComponent();
FloatingActionDemoCommand = new AnotherCommandImplementation(Execute);
}
public ICommand FloatingActionDemoCommand { get; }
private void Execute(object o)
{
Console.WriteLine("Floating action button command. - " + (o ?? "NULL").ToString());
}
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
Console.WriteLine("Just checking we haven't suppressed the button.");
}
private void PopupBox_OnOpened(object sender, RoutedEventArgs e)
{
Console.WriteLine("Just making sure the popup has opened.");
}
private void PopupBox_OnClosed(object sender, RoutedEventArgs e)
{
Console.WriteLine("Just making sure the popup has closed.");
}
private void CountingButton_OnClick(object sender, RoutedEventArgs e)
{
if (CountingBadge.Badge == null || Equals(CountingBadge.Badge, ""))
CountingBadge.Badge = 0;
var next = int.Parse(CountingBadge.Badge.ToString()) + 1;
CountingBadge.Badge = next < 21 ? (object)next : null;
}
private void BasicRatingBar_ValueChanged(object sender, RoutedPropertyChangedEventArgs<int> e)
{
Debug.WriteLine($"BasicRatingBar value changed from {e.OldValue} to {e.NewValue}.");
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/Jobc/MaterialDesignInXamlToolkit.git
git@gitee.com:Jobc/MaterialDesignInXamlToolkit.git
Jobc
MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit
master

搜索帮助