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