wpf-controls

    0热度

    2回答

    我试图简单地定义第二个堆栈面板(根堆栈面板内的两个)的所有矩形元素的填充,需要的填充为白色。由于一个stackpanel没有ItemTemplate,我试着用它替换它,然后用ItemsControl封装它。当我看到ItemsControl没有Orientation属性时,堆栈面板的封装就变成了。 无论如何,毕竟这个孩子的矩形仍然没有得到充满白色...>。 <我在做什么错?我还试图做与事件绑定一样的

    1热度

    2回答

    我试图设计一个WPF按钮,使其具有圆角和黑色边框。继多个例子在网上,我想出了以下样式: <Style x:Key="MyBlackButton" TargetType="{x:Type Button}"> <Setter Property="Background" Value="#FF282828"/> <Setter Property="Foreground" Value="

    0热度

    1回答

    我想要的风格PasswordBox在WPF,以便它可以显示提示。 我通过使用ResourceDictionary中下面的代码这样做: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/

    0热度

    1回答

    我正在将焦点集中在用于构建自定义“数字向上”控件的TextBox上。 这是自 “数字向上向下” <Style x:Key="SpinButton" TargetType="Slider" > <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Slider"> <B

    0热度

    1回答

    我正在使用LogicalTreeHelper.FindLogicalNode在RibbonWindow中搜索控件。我正在搜索的元素产生错误:不支持指定的方法。如果将Ribbon控件从XAML中删除,或者如果将其移动到TextBlock的FindLogicalNode后,则可以正常工作。有没有人解释? 这里的XAML: <RibbonWindow x:Class="WpfApplication1.M

    0热度

    1回答

    我正在试图制作一个WPF窗口,其中每个都是由图片表示的一组RadioButtons实现的控件。我用在this example提供的模板,所以模板看起来像这样: <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="RadioButton"> <Border BorderT

    0热度

    1回答

    我正在尝试使用较小的命中区域来创建按钮,以防止在工业触摸屏PC程序中出现误操作。这里是a sample, 只有the white area should response to touch and mouse operations. 我试着使用控件模板 <ControlTemplate x:Key="ButtonToTouch" TargetType="{x:Type Button}">

    -1热度

    1回答

    我尝试使用带有DependencyProperty绑定的自定义控件来处理DataGrid中的列。一切正在进行中,我选择了一排。 我的自定义控件ShiftControl.xaml: <UserControl x:Class="xRoster.UserControls.ShiftControl" xmlns="http://schemas.microsoft.com/winfx/2006

    2热度

    1回答

    我想使用DataTrigger来修改我的按钮的不透明度。 <Button x:Name="StartTreatment" Grid.Column="3" Width="160" Height="30" Content="{x:Static resources:UserMessages.TrcsConsoleViewMod

    0热度

    1回答

    我已经使用了用户控件从这个链接https://www.codeproject.com/articles/739902/how-to-easily-host-wpf-control-inside-windows-form 我只能在构造函数此用户控件加载数据,但我想从其他方法中调用它,但我失败了有什么办法? 的construcor是 public Getstarted() { Initia