dependency-properties

    0熱度

    1回答

    我想編寫一個通用測試,可以在沒有WPF應用程序且沒有TraceLogger(偵聽器)的情況下運行該測試。 通用測試是suppost來比較接口與用戶控件的綁定,以查看是否有缺少或太多的綁定。 IVM爲視圖模型 V時的接口類型是一個視圖 V是應該結合IVM。 var names_binding = listener.bindNames.Distinct(); //this is what i wan

    1熱度

    1回答

    這是我的第一次嘗試使用擴展帶有依賴項屬性的文本框,基於我在網上找到的一個示例。 我的解決方案由2個項目組成:一個wpf應用程序和一個類庫。 這裏是我的類庫: namespace CustomTextBox { public class CustTextBox : TextBox { public string SecurityId { get { return

    0熱度

    1回答

    我有,有一個依賴屬性的用戶控件: public static readonly DependencyProperty MasterListProperty = DependencyProperty.Register("MasterList", typeof(IEnumerable<MyObject>), typeof(MyControl), new FrameworkPropertyMetadat

    0熱度

    1回答

    我想在gradle中添加第三方庫。這是顯示無法解析: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group:

    -1熱度

    1回答

    問這個的另一種方式是說: 「如何設置的目的是24的價值,所以我可以把它作爲參數傳遞給SetValue()的value參數?」 要明確:我只是想設置一個依賴屬性的值在後面的代碼 這裏是我的代碼: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.

    -1熱度

    2回答

    我使用自定義WindowsFormsHost控件在選項卡控件中包裝FastColoredTextbox winforms控件,當用戶通過DataTemplate點擊新文檔按鈕時,其選項卡動態創建。 由於在此SO question中解釋的選項卡控制的限制,我的撤消/重做邏輯保留了每個選項卡的所有選項卡的歷史記錄,導致顯示錯誤的文本。 因此,我決定修改FastColoredTextbox控件以顯示歷史

    1熱度

    1回答

    我已經創建了一個聲明瞭一個附加屬性,這將持有的DataTemplates的集合類: public class DynamicTemplatesList : DependencyObject { public static readonly DependencyProperty TemplatesProperty = DependencyProperty.RegisterA

    0熱度

    1回答

    在我自定義控件的下面的例子,爲什麼我不能在二傳手一個SelectedColor財產改變TransparentColor財產?具有回調方法的解決方案可以正常工作,但在更改其他屬性的情況下它們有什麼區別? public class MyColorPicker : Control { static MyColorPicker() { DefaultStyleKeyPro

    0熱度

    1回答

    我想根據標準規則驗證文本框的值,並且它們中的一些是Min和Max值。問題是,我需要這個值可配置(例如在設置文件中)。 我有驗證規則: public class TextBoxWithIntegerValidation : ValidationRule { private Int32RangeChecker _validRange; public Int32Ran

    0熱度

    1回答

    我想重用控件,但其中一個方案需要上下文菜單,而其他方案則不需要。這是我的嘗試。 public partial class RP8Grid : UserControl { public bool UseContextMenu { get { return (bool)GetValue(UseContextMenuProperty); } set { SetValu