Click here to Skip to main content
15,908,768 members
Home / Discussions / WPF
   

WPF

 
QuestionCustom SplitButton Control Styling Pin
Kevin Marois18-May-17 10:24
professionalKevin Marois18-May-17 10:24 
QuestionRe: Custom SplitButton Control Styling Pin
Gerry Schmitz18-May-17 11:34
mveGerry Schmitz18-May-17 11:34 
AnswerRe: Custom SplitButton Control Styling Pin
Kevin Marois18-May-17 12:37
professionalKevin Marois18-May-17 12:37 
GeneralRe: Custom SplitButton Control Styling Pin
Gerry Schmitz18-May-17 12:55
mveGerry Schmitz18-May-17 12:55 
GeneralRe: Custom SplitButton Control Styling Pin
Kevin Marois18-May-17 19:03
professionalKevin Marois18-May-17 19:03 
GeneralRe: Custom SplitButton Control Styling Pin
Gerry Schmitz18-May-17 19:37
mveGerry Schmitz18-May-17 19:37 
GeneralRe: Custom SplitButton Control Styling Pin
Kevin Marois19-May-17 5:04
professionalKevin Marois19-May-17 5:04 
GeneralRe: Custom SplitButton Control Styling Pin
Gerry Schmitz19-May-17 5:33
mveGerry Schmitz19-May-17 5:33 
GeneralRe: Custom SplitButton Control Styling Pin
Kevin Marois22-May-17 5:23
professionalKevin Marois22-May-17 5:23 
GeneralRe: Custom SplitButton Control Styling Pin
Gerry Schmitz22-May-17 6:15
mveGerry Schmitz22-May-17 6:15 
GeneralRe: Custom SplitButton Control Styling Pin
Gerry Schmitz22-May-17 6:35
mveGerry Schmitz22-May-17 6:35 
GeneralRe: Custom SplitButton Control Styling Pin
Kevin Marois22-May-17 6:50
professionalKevin Marois22-May-17 6:50 
GeneralRe: Custom SplitButton Control Styling Pin
Gerry Schmitz22-May-17 7:07
mveGerry Schmitz22-May-17 7:07 
QuestionTheming Question Pin
Kevin Marois5-May-17 7:29
professionalKevin Marois5-May-17 7:29 
I've got this code that changes the theme during runtime
private void ApplyTheme()
{
    ResourceDictionary resources = null;
    string fileName = string.Empty;

    switch (SelectedThemeName)
    {
        case "Black":
            fileName = "Theme_Black.xaml";
            break;

        case "Blue":
            fileName = "Theme_Blue.xaml";
            break;

    }

    if (fileName == string.Empty)
    {
        throw new Exception(string.Format("Resource dictionary for theme name {0} not found", SelectedThemeName));
    }

    fileName = "..\Themes\" + fileName;

    if (!File.Exists(fileName))
    {
        throw new Exception(string.Format("Theme name {0} not found", SelectedThemeName));
    }

    using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read))
    {
        resources = (ResourceDictionary)XamlReader.Load(fs);
    }
    Application.Current.Resources = resources;
}

The problem is that it relies on a physical file to exist at runtime. Is there a better way to do this?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

QuestionWPF MVVM ListView Bound to ObservableCollection doesnt update after i make changes Pin
Member 1288059527-Apr-17 7:25
Member 1288059527-Apr-17 7:25 
AnswerRe: WPF MVVM ListView Bound to ObservableCollection doesnt update after i make changes Pin
Richard Deeming27-Apr-17 8:26
mveRichard Deeming27-Apr-17 8:26 
GeneralRe: WPF MVVM ListView Bound to ObservableCollection doesnt update after i make changes Pin
Member 1288059527-Apr-17 9:02
Member 1288059527-Apr-17 9:02 
GeneralRe: WPF MVVM ListView Bound to ObservableCollection doesnt update after i make changes Pin
Member 1288059528-Apr-17 10:12
Member 1288059528-Apr-17 10:12 
QuestionWPF Control Template Documentation Pin
Kevin Marois20-Apr-17 5:16
professionalKevin Marois20-Apr-17 5:16 
AnswerRe: WPF Control Template Documentation Pin
CHill6020-Apr-17 5:21
mveCHill6020-Apr-17 5:21 
GeneralRe: WPF Control Template Documentation Pin
Kevin Marois20-Apr-17 6:12
professionalKevin Marois20-Apr-17 6:12 
GeneralRe: WPF Control Template Documentation Pin
CHill6020-Apr-17 7:23
mveCHill6020-Apr-17 7:23 
GeneralRe: WPF Control Template Documentation Pin
Kevin Marois20-Apr-17 7:24
professionalKevin Marois20-Apr-17 7:24 
AnswerRe: WPF Control Template Documentation Pin
Pete O'Hanlon24-Apr-17 20:31
mvePete O'Hanlon24-Apr-17 20:31 
QuestionComboBox Control Template Problem Pin
Kevin Marois19-Apr-17 12:13
professionalKevin Marois19-Apr-17 12:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.