我想爲我新建的用戶控件設置一個自定義樣式,但是我收到錯誤:「無法將屬性'屬性'中的值轉換爲類型的對象'System.Windows.DependencyProperty'。」 我想我已經建立了依賴屬性,但它似乎不是這種情況,所以我做了一些研究,並補充說: public static readonly DependencyProperty ImageSourceProperty =
Dep
在WPF應用程序中,我有一個BackgroundWorker線程創建對象。我們來調用對象foo。 後臺工作代碼: SomeClass foo = new SomeClass();
// Do some operation on foo
// Set some dependency property on the main class to foo
this.Dispatcher.Begin