Click here to Skip to main content
15,916,945 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Dynamically set properties Pin
Christian Graus15-Jun-08 11:16
protectorChristian Graus15-Jun-08 11:16 
AnswerRe: Dynamically set properties Pin
Insincere Dave15-Jun-08 12:20
Insincere Dave15-Jun-08 12:20 
GeneralRe: Dynamically set properties Pin
Christian Graus15-Jun-08 12:58
protectorChristian Graus15-Jun-08 12:58 
QuestionHorizontal TreeListView [modified] Pin
Olivier Baillard13-Jun-08 4:43
Olivier Baillard13-Jun-08 4:43 
QuestionBinding a panel to the selected item type Pin
Gian13-Jun-08 1:16
Gian13-Jun-08 1:16 
AnswerRe: Binding a panel to the selected item type Pin
Gideon Engelberth13-Jun-08 8:45
Gideon Engelberth13-Jun-08 8:45 
QuestionWPF ComboBox problems Pin
coolestnerd12-Jun-08 5:38
coolestnerd12-Jun-08 5:38 
AnswerRe: WPF ComboBox problems Pin
Jammer12-Jun-08 6:13
Jammer12-Jun-08 6:13 
Are you sure that the setting is being saved???

I do all my users settings binding in XAML:

Create a ResourceSettings.xaml file like:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:settings="clr-namespace:YourNameSpace.Properties">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary>
            <settings:Settings x:Key="settings" />
        </ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>


Then in app.xaml as a dictionary pointing to this in your merged dictionaries:
<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="SettingsResources.xaml"/>
</ResourceDictionary.MergedDictionaries>


then for each setting you wish to bind do:

PropertyToBind="{Binding Source={StaticResource settings}, Path=Default.MainTop, Mode=TwoWay}"

Don't forget to add a window_closed to your main window with:

private void Window_Closed(object sender, EventArgs e)
{
    //Stores all user settings (see XAML for bindings)
    Settings.Default.Save();
}


Cheers,

Jammer

Going where everyone here has gone before! Smile | :)
My Blog

GeneralRe: WPF ComboBox problems Pin
coolestnerd12-Jun-08 7:21
coolestnerd12-Jun-08 7:21 
QuestionClass for Updating version of Silverlight Application Pin
am 200912-Jun-08 0:40
am 200912-Jun-08 0:40 
AnswerRe: Class for Updating version of Silverlight Application Pin
Michael Sync15-Jun-08 16:15
Michael Sync15-Jun-08 16:15 
QuestionWPF ContextMenu -&gt; open with left mouse-click??? Pin
AndyGrothe11-Jun-08 20:55
AndyGrothe11-Jun-08 20:55 
AnswerRe: WPF ContextMenu -&gt; open with left mouse-click??? Pin
AndyGrothe16-Jun-08 21:57
AndyGrothe16-Jun-08 21:57 
QuestionUnexpected WPF Behaviour with Microsoft.Win32.OpenFileDialog [modified] Pin
Mitch F.11-Jun-08 18:57
Mitch F.11-Jun-08 18:57 
AnswerRe: Unexpected WPF Behaviour with Microsoft.Win32.OpenFileDialog Pin
Pete O'Hanlon18-Jun-08 8:56
mvePete O'Hanlon18-Jun-08 8:56 
GeneralRe: Unexpected WPF Behaviour with Microsoft.Win32.OpenFileDialog Pin
Mitch F.18-Jun-08 10:15
Mitch F.18-Jun-08 10:15 
QuestionUnable to play audio from client Pin
vayanan11-Jun-08 12:38
vayanan11-Jun-08 12:38 
AnswerRe: Unable to play audio from client Pin
Jammer11-Jun-08 23:12
Jammer11-Jun-08 23:12 
AnswerRe: Unable to play audio from client Pin
Jasvinder Kumar Bali2-Sep-08 21:47
Jasvinder Kumar Bali2-Sep-08 21:47 
QuestionNeed C# Code to take Screenshot of a WPF application Pin
Arun00311-Jun-08 5:25
Arun00311-Jun-08 5:25 
AnswerRe: Need C# Code to take Screenshot of a WPF application Pin
Jammer11-Jun-08 6:19
Jammer11-Jun-08 6:19 
AnswerRe: Need C# Code to take Screenshot of a WPF application Pin
Thomas Stockwell19-Jun-08 16:16
professionalThomas Stockwell19-Jun-08 16:16 
QuestionSilverlight 2 (beta2) Article Competition Pin
Michael Sync11-Jun-08 5:00
Michael Sync11-Jun-08 5:00 
AnswerRe: Silverlight 2 (beta2) Article Competition Pin
248912822-Jul-08 23:46
248912822-Jul-08 23:46 
GeneralRe: Silverlight 2 (beta2) Article Competition Pin
Michael Sync31-Jul-08 23:02
Michael Sync31-Jul-08 23:02 

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.