1. 程式人生 > 其它 >WPF 資源動態載入

WPF 資源動態載入

技術標籤:WPF


            LoadStyleResource(@"Resources/style/ResourceDictionary.xaml");

窗體動態載入樣式

  private void Window_Initialized(object sender, EventArgs e)
        {
            this.AllowsTransparency = true;
            this.Style = (Style)this.FindResource("window_Shadow");
        }